Claude Context is an MCP server that adds semantic code search to AI coding agents such as Claude Code, Cursor, Gemini CLI, and other MCP-compatible clients. Rather than loading whole directories into the model on each request, it indexes a codebase into a vector database and retrieves only the relevant code for a given natural-language query, which the project reports cuts token usage by roughly 40% at equivalent retrieval quality. It is aimed at developers working in large codebases where feeding the full source into the model is slow and expensive.
Retrieval uses hybrid search combining BM25 keyword matching with dense vector embeddings. Code is split using an AST-based chunker (with a character-based fallback) and re-indexed incrementally using Merkle trees so only changed files are reprocessed. The agent drives it through a small set of tools: indexcodebase, searchcode, clearindex, and getindexing_status. A typical workflow is to ask the agent to index the project, then query it in plain language (e.g. "find functions that handle user authentication").
The project ships as a monorepo with three parts: a core indexing/search library (@zilliz/claude-context-core), the MCP server (@zilliz/claude-context-mcp), and a VS Code extension. It requires Node.js 20 or higher and connects to a Milvus / Zilliz Cloud vector database.
Supported building blocks:
- Embedding providers: OpenAI, VoyageAI, Ollama, Gemini
- Vector databases: Milvus or Zilliz Cloud
- Code splitters: AST-based (with automatic fallback) and LangChain character-based
- Languages: TypeScript, JavaScript, Python, Java, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, Scala, and Markdown
