Zen MCP is a powerful server that enhances your AI tools by connecting them to multiple AI models, enabling collaborative workflows across different providers while maintaining continuous conversation context. This server acts as middleware between your preferred CLI tools (like Claude Code, Gemini CLI, or Codex CLI) and various AI models from providers including OpenAI, Anthropic, Google, and more.
1. Get API Keys (at least one required):
2. Choose an Installation Method:
Option A: Clone and Automatic Setup (Recommended)
git clone https://github.com/BeehiveInnovations/zen-mcp-server.git
cd zen-mcp-server
# Handles everything: setup, config, API keys from system environment
./run-server.sh
Option B: Instant Setup with uvx
// Add to ~/.claude/settings.json or .mcp.json
{
"mcpServers": {
"zen": {
"command": "bash",
"args": ["-c", "for p in $(which uvx 2>/dev/null) $HOME/.local/bin/uvx /opt/homebrew/bin/uvx /usr/local/bin/uvx uvx; do [ -x \"$p\" ] && exec \"$p\" --from git+https://github.com/BeehiveInnovations/zen-mcp-server.git zen-mcp-server; done; echo 'uvx not found' >&2; exit 1"],
"env": {
"PATH": "/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin:~/.local/bin",
"GEMINI_API_KEY": "your-key-here",
"DISABLED_TOOLS": "analyze,refactor,testgen,secaudit,docgen,tracer",
"DEFAULT_MODEL": "auto"
}
}
}
}
Once installed, you can use Zen MCP from your preferred AI CLI tool by including "zen" in your prompts:
"Use zen to analyze this code for security issues with gemini pro"
"Debug this error with o3 and then get flash to suggest optimizations"
"Plan the migration strategy with zen, get consensus from multiple models"
"clink with cli_name=\"gemini\" role=\"planner\" to draft a phased rollout plan"
Zen activates any provider that has valid credentials in your .env file. You can customize behavior by setting environment variables in your .env file or in your CLI tool's MCP configuration.
Zen MCP comes with several powerful tools that extend your AI workflows:
To optimize context window usage, some tools are disabled by default. You can enable additional tools by removing them from the DISABLED_TOOLS environment variable:
# Default configuration
DISABLED_TOOLS=analyze,refactor,testgen,secaudit,docgen,tracer
# To enable specific tools, remove them from the list
# Example: Enable analyze tool
DISABLED_TOOLS=refactor,testgen,secaudit,docgen,tracer
# To enable ALL tools
DISABLED_TOOLS=
Multi-model Code Review:
"Perform a codereview using gemini pro and o3, then use planner to create a fix strategy"
Collaborative Debugging:
"Debug this race condition with max thinking mode, then validate the fix with precommit"
Architecture Planning:
"Plan our microservices migration, get consensus from pro and o3 on the approach"
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "gemini" '{"command":"python","args":["-m","gemini_mcp_server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"gemini": {
"command": "python",
"args": [
"-m",
"gemini_mcp_server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"gemini": {
"command": "python",
"args": [
"-m",
"gemini_mcp_server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect