Overview
Claude Context is an MCP plugin from Zilliz that adds semantic code search to Claude Code and other AI coding agents. Instead of making the agent read folders file by file, it lets the agent find all relevant code across millions of lines in one step and pulls those results straight into the model's context.
It works by indexing your codebase into a vector database such as Milvus or the managed Zilliz Cloud. Embeddings are produced by a provider you choose, and only the related code is sent to the model on each request. For large projects this keeps token usage and cost much lower than loading entire directories every time.
What it does
- Semantic, natural-language code search that finds relevant snippets by meaning rather than exact keywords
- Hybrid search that combines BM25 keyword matching with dense vector search for better results
- Incremental indexing that uses Merkle trees to re-index only the files that changed
- Pluggable embedding providers: OpenAI, VoyageAI, Ollama, and Gemini
- Stores vectors in Milvus or the fully managed Zilliz Cloud service
- Works across many MCP clients including Claude Code, Cursor, Gemini CLI, Codex CLI, Windsurf, and Claude Desktop
Getting started
Claude Context runs as an MCP server. You need Node.js 20 or later, a vector database (a free Zilliz Cloud account works), and an embedding API key such as an OpenAI key. The quickest path is to register the server with the Claude Code CLI.
Add the MCP server to Claude Code
Use the Claude Code CLI to register Claude Context, passing your embedding key and vector database connection as environment variables. The server is run on demand via npx, so there is nothing to install globally.
claude mcp add claude-context \
-e OPENAI_API_KEY=sk-your-openai-api-key \
-e MILVUS_ADDRESS=your-zilliz-cloud-public-endpoint \
-e MILVUS_TOKEN=your-zilliz-cloud-api-key \
-- npx @zilliz/claude-context-mcp@latestIndex your codebase
Once the server is connected, ask your agent to index the project. The index_codebase tool builds a hybrid (BM25 + dense vector) index of your code in the vector database.
Index this codebaseCheck the indexing status
Indexing large repositories takes time. Ask the agent to report progress; the get_indexing_status tool shows a percentage while indexing and a completion status when done.
Check the indexing statusSearch your code in natural language
After indexing finishes, ask questions in plain language. The search_code tool returns the most relevant snippets and feeds them into the agent's context so it can answer with real code from your project.
Where is the user authentication handled in this codebase?Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Give Claude Code deep context on a large codebase without manually copying files into the prompt
- Cut token costs by retrieving only the code that is relevant to each request instead of loading whole directories
- Help an AI agent quickly locate where a feature, function, or bug lives across millions of lines
- Add the same semantic code search to other MCP clients like Cursor, Windsurf, Gemini CLI, or Codex CLI
How Claude Context compares
Claude Context alongside other open-source code indexing & search tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| CodeGraph | ★ 70.4k | Builds a local SQLite knowledge graph of a codebase with a Rust tree-sitter kernel, keeps it in sync through a file watcher, and serves symbols, call paths and blast radius to coding agents over MCP. |
| GitNexus | ★ 47.2k | Indexes a codebase into a knowledge graph of dependencies, call chains and execution flows, then exposes it to Claude Code, Cursor and Codex through MCP tools. |
| Claude Context | ★ 12.5k | MCP plugin that gives Claude Code semantic search over your whole codebase |
| Semble | ★ 6k | A CPU-only code search library and MCP server that indexes a repository with tree-sitter chunking, Model2Vec embeddings and BM25, so an agent retrieves the few relevant snippets instead of grepping and reading whole files. |
