1. Setting up the MCP Server in Terminal
Starting Cipher as an MCP Server
To run cipher as an MCP server, you need to provide all required environment variables for the agent to function properly:Note: The--agent
flag is optional and defaults tomemAgent/cipher.yml
if not provided.
Required Environment Variables
For cipher to function as an MCP server, you only need these required variables:Note: By default, cipher uses in-memory storage for vectors, cache, and database. All other configuration options are optional and have sensible defaults. For advanced configuration options including external databases, Redis, vector stores, and knowledge graphs, see the Configuration pages.
Additional Environment Variables (Optional)
Beyond the required API keys, you can customize cipher’s behavior by exporting additional environment variables to your MCP server configuration, which can be found in the .env.example file.Custom Agent Configuration
Beside, you can create a customcipher.yml
configuration file and use the --agent
flag to specify your own agent configuration:
custom-cipher.yml
):
Example Setup
Create a shell script to start cipher with required variables:2. In Cursor
Cursor IDE uses anmcp.json
configuration file to connect to MCP servers. Here’s how to set up cipher integration:
Configuration Location
Create or edit yourmcp.json
file in your Cursor settings:
3. In Codex
Codex uses a TOML configuration file to connect to MCP servers. Here’s how to set up cipher integration:Configuration Location
Open or create the configuration file at~/.codex/config.toml
and add the cipher server configuration:
Additional Environment Variables (Optional)
You can add more environment variables for advanced configuration:4. In Claude Desktop
Claude Desktop uses theclaude_desktop_config.json
file for MCP server configuration. The setup is similar to Cursor but with a different file location.
Configuration Schema
5. Claude Code
Claude Code is Anthropic’s official CLI for Claude that supports MCP server integration. Here’s how to set up cipher with Claude Code:Prerequisites
Install Claude Code if you haven’t already. Follow the instructions at the official documentation.Configuration Methods
Claude Code offers multiple ways to configure MCP servers:Method 1: CLI Wizard (Recommended)
Use the built-in CLI wizard to add cipher:Method 2: JSON Configuration
Add cipher using JSON configuration:Method 3: Direct Configuration File Editing
Edit the.mcp.json
file in your project root or user config directory:
Managing MCP Servers
Using Cipher with Claude Code
Once configured, start Claude Code and you’ll see the MCP tools icon indicating cipher is available:6. Gemini CLI
Gemini CLI supports MCP (Model Context Protocol) servers, allowing you to connect cipher as an external tool. Here’s how to configure cipher with Gemini CLI:Prerequisites
Install Gemini CLI:Configuration
Add cipher to your Gemini CLIsettings.json
file:
Usage
Once configured, cipher’s tools will be automatically available in your Gemini CLI sessions:7. Aggregator Mode
Cipher can operate in aggregator mode, acting as a comprehensive MCP server hub that connects multiple MCP servers through a single integration point. This provides enhanced tools, memory persistence, and transport flexibility.Configuration
Add Cipher in aggregator mode to your MCP client configuration:Custom MCP Servers
You can extend the aggregator with your own MCP servers by adding them to themcpServers
section in cipher.yml
. Cipher supports all three MCP transport types:
stdio (Local Process):