Uses Google's Gemini embedding models (like gemini-embedding-001) to generate semantic embeddings for codebase indexing and search.
Stores and queries code embeddings in Milvus vector database (local or Zilliz Cloud) for semantic codebase search capabilities.
Uses locally-hosted Ollama embedding models (like nomic-embed-text) to generate semantic embeddings for codebase indexing and search without sending data to external services.
Uses OpenAI's embedding models (like text-embedding-3-small) to generate semantic embeddings for codebase indexing and search.
@zilliz/claude-context-mcp
Model Context Protocol (MCP) integration for Claude Context - A powerful MCP server that enables AI assistants and agents to index and search codebases using semantic search.
📖 New to Claude Context? Check out the main project README for an overview and setup instructions.
🚀 Use Claude Context as MCP in Claude Code and others
Model Context Protocol (MCP) allows you to integrate Claude Context with your favorite AI coding assistants, e.g. Claude Code.
Quick Start
Prerequisites
Before using the MCP server, make sure you have:
API key for your chosen embedding provider (OpenAI, VoyageAI, Gemini, or Ollama setup)
Milvus vector database (local or cloud)
💡 Setup Help: See the main project setup guide for detailed installation instructions.
Prepare Environment Variables
Embedding Provider Configuration
Claude Context MCP supports multiple embedding providers. Choose the one that best fits your needs:
📋 Quick Reference: For a complete list of environment variables and their descriptions, see the Environment Variables Guide.
OpenAI provides high-quality embeddings with excellent performance for code understanding.
Available Models:
See getSupportedModels in openai-embedding.ts for the full list of supported models.
Getting API Key:
Visit OpenAI Platform
Sign in or create an account
Generate a new API key
Set up billing if needed
VoyageAI offers specialized code embeddings optimized for programming languages.
Available Models:
See getSupportedModels in voyageai-embedding.ts for the full list of supported models.
Getting API Key:
Visit VoyageAI Console
Sign up for an account
Navigate to API Keys section
Create a new API key
Google's Gemini provides competitive embeddings with good multilingual support.
Available Models:
See getSupportedModels in gemini-embedding.ts for the full list of supported models.
Getting API Key:
Visit Google AI Studio
Sign in with your Google account
Go to "Get API key" section
Create a new API key
Ollama allows you to run embeddings locally without sending data to external services.
Setup Instructions:
Install Ollama from ollama.ai
Pull the embedding model:
ollama pull nomic-embed-textEnsure Ollama is running:
ollama serve
Get a free vector database on Zilliz Cloud
Claude Context needs a vector database. You can sign up on Zilliz Cloud to get an API key.

Copy your Personal Key to replace your-zilliz-cloud-api-key in the configuration examples.
Embedding Batch Size
You can set the embedding batch size to optimize the performance of the MCP server, depending on your embedding model throughput. The default value is 100.
Custom File Processing (Optional)
You can configure custom file extensions and ignore patterns globally via environment variables:
These settings work in combination with tool parameters - patterns from both sources will be merged together.
Usage with MCP Clients
Use the command line interface to add the Claude Context MCP server:
See the Claude Code MCP documentation for more details about MCP server management.
Codex CLI uses TOML configuration files:
Create or edit the
~/.codex/config.tomlfile.Add the following configuration:
Save the file and restart Codex CLI to apply the changes.
Gemini CLI requires manual configuration through a JSON file:
Create or edit the
~/.gemini/settings.jsonfile.Add the following configuration:
Save the file and restart Gemini CLI to apply the changes.
Create or edit the ~/.qwen/settings.json file and add the following configuration:
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
OpenAI Configuration (Default):
VoyageAI Configuration:
Gemini Configuration:
Ollama Configuration:
Go to: Settings -> MCP -> Add MCP Server
Add the following configuration to your Void MCP settings:
Add to your Claude Desktop configuration:
Windsurf supports MCP configuration through a JSON file. Add the following configuration to your Windsurf MCP settings:
The Claude Context MCP server can be used with VS Code through MCP-compatible extensions. Add the following configuration to your VS Code MCP settings:
Cherry Studio allows for visual MCP server configuration through its settings interface. While it doesn't directly support manual JSON configuration, you can add a new server via the GUI:
Navigate to Settings → MCP Servers → Add Server.
Fill in the server details:
Name:
claude-contextType:
STDIOCommand:
npxArguments:
["@zilliz/claude-context-mcp@latest"]Environment Variables:
OPENAI_API_KEY:your-openai-api-keyMILVUS_TOKEN:your-zilliz-cloud-api-key
Save the configuration to activate the server.
Cline uses a JSON configuration file to manage MCP servers. To integrate the provided MCP server configuration:
Open Cline and click on the MCP Servers icon in the top navigation bar.
Select the Installed tab, then click Advanced MCP Settings.
In the
cline_mcp_settings.jsonfile, add the following configuration:
Save the file.
To configure Claude Context MCP in Augment Code, you can use either the graphical interface or manual configuration.
A. Using the Augment Code UI
Click the hamburger menu.
Select Settings.
Navigate to the Tools section.
Click the + Add MCP button.
Enter the following command:
npx @zilliz/claude-context-mcp@latestName the MCP: Claude Context.
Click the Add button.
B. Manual Configuration
Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
Select Edit Settings
Under Advanced, click Edit in settings.json
Add the server configuration to the
mcpServersarray in theaugment.advancedobject
Roo Code utilizes a JSON configuration file for MCP servers:
Open Roo Code and navigate to Settings → MCP Servers → Edit Global Config.
In the
mcp_settings.jsonfile, add the following configuration:
Save the file to activate the server.
Zencoder offers support for MCP tools and servers in both its JetBrains and VS Code plugin versions.
Go to the Zencoder menu (...)
From the dropdown menu, select
ToolsClick on the
Add Custom MCPAdd the name (i.e.
Claude Contextand server configuration from below, and make sure to hit theInstallbutton
Save the server by hitting the
Installbutton.
For LangChain/LangGraph integration examples, see this example.
The server uses stdio transport and follows the standard MCP protocol. It can be integrated with any MCP-compatible client by running:
Features
🔌 MCP Protocol Compliance: Full compatibility with MCP-enabled AI assistants and agents
🔍 Hybrid Code Search: Natural language queries using advanced hybrid search (BM25 + dense vector) to find relevant code snippets
📁 Codebase Indexing: Index entire codebases for fast hybrid search across millions of lines of code
🔄 Incremental Indexing: Efficiently re-index only changed files using Merkle trees for auto-sync
🧩 Intelligent Code Chunking: AST-based code analysis for syntax-aware chunking with automatic fallback
🗄️ Scalable: Integrates with Zilliz Cloud for scalable vector search, no matter how large your codebase is
🛠️ Customizable: Configure file extensions, ignore patterns, and embedding models
⚡ Real-time: Interactive indexing and searching with progress feedback
Available Tools
1. index_codebase
Index a codebase directory for hybrid search (BM25 + dense vector).
Parameters:
path(required): Absolute path to the codebase directory to indexforce(optional): Force re-indexing even if already indexed (default: false)splitter(optional): Code splitter to use - 'ast' for syntax-aware splitting with automatic fallback, 'langchain' for character-based splitting (default: "ast")customExtensions(optional): Additional file extensions to include beyond defaults (e.g., ['.vue', '.svelte', '.astro']). Extensions should include the dot prefix or will be automatically added (default: [])ignorePatterns(optional): Additional ignore patterns to exclude specific files/directories beyond defaults (e.g., ['static/', '*.tmp', 'private/']) (default: [])
2. search_code
Search the indexed codebase using natural language queries with hybrid search (BM25 + dense vector).
Parameters:
path(required): Absolute path to the codebase directory to search inquery(required): Natural language query to search for in the codebaselimit(optional): Maximum number of results to return (default: 10, max: 50)extensionFilter(optional): List of file extensions to filter results (e.g., ['.ts', '.py']) (default: [])
3. clear_index
Clear the search index for a specific codebase.
Parameters:
path(required): Absolute path to the codebase directory to clear index for
4. get_indexing_status
Get the current indexing status of a codebase. Shows progress percentage for actively indexing codebases and completion status for indexed codebases.
Parameters:
path(required): Absolute path to the codebase directory to check status for
Contributing
This package is part of the Claude Context monorepo. Please see:
Main Contributing Guide - General contribution guidelines
MCP Package Contributing - Specific development guide for this package
Related Projects
@zilliz/claude-context-core - Core indexing engine used by this MCP server
VSCode Extension - Alternative VSCode integration
Model Context Protocol - Official MCP documentation
License
MIT - See LICENSE for details