Cipher is an open source memory layer tool designed for coding assistants. It accomplishes this by Model Context Protocol (MCP) The protocol integrates seamlessly with a wide range of programming tools and AI assistants, such as Claude Code, Cursor, and Windsurf.Cipher's core function is to store and manage contextual information during the coding process, helping developers maintain continuity in complex projects. It supports multiple environment configurations and is suitable for individual developers or teams. The project is open source on GitHub, allowing the community to contribute code and feature improvements. Users can quickly deploy and use it through simple command line operations or API mode.
Function List
- Provides a persistent memory layer that stores contextual information about programming interactions.
- Supports the MCP protocol and is compatible with tools such as Claude Code, Cursor, Windsurf and others.
- Provides a command line interface (CLI) that supports interactive mode and single-command operations.
- Supports API and MCP server modes to meet different development needs.
- Flexible configuration using environment variables and YAML files.
- Supports API keys for a wide range of AI models, such as OpenAI, Anthropic, and OpenRouter.
- Provides Docker deployment options to simplify the installation and runtime process.
- Allow community contributions and support open source collaborative development.
Using Help
Installation process
Cipher has a simple installation process, supports global or local installation, and offers Docker deployment options. Below are the detailed steps:
Install via npm
- global installation: Run the following command in a terminal to install the command line tools for Cipher:
npm install -g @byterover/cipher
This installs Cipher globally for developers who need to use it frequently.
- local installation: If it is used only in a specific project, go to the project directory and run it:
npm install @byterover/cipher
Cloning and Configuration via Git
- clone warehouse: Clone the Cipher project locally from GitHub:
git clone https://github.com/campfirein/cipher.git cd cipher
- Copying configuration files: Copy the sample environment configuration file and edit it:
cp .env.example .env
Open with a text editor
.env
file, add the necessary API keys, for example:OPENAI_API_KEY=your_openai_api_key ANTHROPIC_API_KEY=your_anthropic_api_key OPENROUTER_API_KEY=your_openrouter_api_key
If you use the local Ollama model, which can be configured:
OLLAMA_BASE_URL=http://localhost:11434/v1
- Installation of dependencies: Run in the project directory:
npm install
Deployment via Docker
- Ensure that Docker and Docker Compose are installed.
- Run it in the project directory:
docker-compose up -d
This will start the Cipher service.
- Tests that the service is functioning properly:
curl http://localhost:3000/health
If the return status is normal, the service is started.
Usage
Cipher provides several modes of operation, including interactive mode, single command, API server mode, and MCP server mode. The following are the specific operation methods:
interactive mode
- Enter it in the terminal:
cipher
This leads to an interactive command line interface where the developer can enter commands or questions and Cipher stores the context and provides a response.
- Example: Enter "Document common causes of CORS errors in Vite + Express local development" and Cipher will store the information in memory for subsequent queries.
single command
- Run a single command to store specific information:
cipher "Add this to memory as common causes of 'CORS error' in local dev with Vite + Express."
This will store the specified content directly into the memory layer.
API server mode
- Start the API server:
cipher --mode api
- Use HTTP requests to interact with the Cipher, e.g. via the
curl
or other tools to call API endpoints.
MCP server model
- Start the MCP server to support compatible tools:
cipher --mode mcp
- configure Claude Code maybe Cursor to connect to Cipher's MCP server address (default).
http://localhost:3000
).
Main Functions
Storing and retrieving context
At the heart of Cipher is its dual memory system, capable of storing programming concepts and reasoning patterns. For example, when using Claude Code, the content of each developer interaction is automatically stored in the Cipher's memory layer. When needed, run the following command to retrieve it:
cipher "Retrieve context about CORS error causes"
Cipher returns the relevant context to help developers get back to work quickly.
Configuring Environment Variables
The developer can modify the .env
File Adjustment Log Level or other settings, for example:
CIPHER_LOG_LEVEL=info
NODE_ENV=production
This ensures that Cipher is stable in production environments.
Integration of third-party tools
Cipher integrates with tools such as Claude Code, Cursor, etc. via the MCP protocol. Once configured, the tools automatically send interaction data to Cipher for storage. For example, if you enable the MCP client in Claude Code and set the server address to the Cipher's MCP address, the data can be synchronized in real time.
caveat
- Make sure to configure at least one API key (
OPENAI_API_KEY
(must be provided for embedding). - Docker deployment requires a stable network environment to ensure smooth image downloads.
- Community contributors can refer to the GitHub
Contributing Guide
Submit code.
application scenario
- Individual Developer Program Management
When working on complex projects, developers often need to record code snippets or debugging information. cipher provides a persistent memory layer to store the context of the debugging process for easy retrieval at any time. - Teamwork Development
Development teams can share project context using Cipher's MCP server model. Team members access the Unified Memory Layer through Claude Code or Cursor for more efficient collaboration. - Learning and teaching
Programming beginners or instructors can use Cipher to record problems and solutions during code learning. For example, record the causes and solutions of CORS errors for easy review. - AI Assistant Enhancement
Cipher provides memory support for AI coding assistants, enhancing their ability to handle long contexts. For example, Claude Code users can utilize Cipher to store the context of multiple rounds of conversations, ensuring that the AI assistant provides more accurate advice.
QA
- What programming tools does Cipher support?
Cipher supports the use of the MCP protocol with Claude Code, Cursor, Windsurf, Gemini CLI, AWS Kiro, VS Code, and Roo Code and other tool integrations. - Is an API key required?
Yes, at least one OpenAI API key is required for embedding functionality. Other API keys (such as Anthropic or OpenRouter) is optional. - How do I debug the Cipher service?
(of a computer) runcurl http://localhost:3000/health
Check the status of the service, or in the.env
Setting in the fileCIPHER_LOG_LEVEL=debug
View detailed logs. - What is the difference between Docker deployment and direct installation?
Docker deployments are good for quick-start and isolated environments, and direct installs are good for developers who need deep customization.