zilliztech /
claude-context
Semantic code search for coding agents, served over MCP from a vector database
- 12.6k stars
- 53 stars since 3 Oct
- TypeScript
- Updated 3 months ago
- Some experience
- Coding agents & dev tools
Coding agents often find the right files by trial and error, or you paste big chunks of a project into the prompt. Both cost tokens and time on large codebases. Claude Context gives the agent a search tool that finds code by what it does, not only by matching keywords.
It runs as an MCP server. You ask your agent to index the project. The code is turned into embeddings with an OpenAI embedding model and stored in a Milvus-compatible vector database, such as Zilliz Cloud. When you ask for something like 'functions that handle user authentication', the agent calls the search tool and gets back only the matching code.
The README contrasts this with loading whole directories into context on every request. It works with many clients besides Claude Code, including Codex CLI, Gemini CLI, Cursor, Windsurf and Cline. The default setup needs two outside accounts: an OpenAI key for embeddings and a Zilliz Cloud key for the database.
What it does
Semantic code search
Finds relevant code by meaning across a large codebase and returns it straight into the agent's context.
Index and status commands
You tell the agent to index the codebase, then check the indexing status before you start searching.
Works with many MCP clients
The README has setup steps for Claude Code, Codex CLI, Gemini CLI, Cursor, Windsurf, VS Code, Claude Desktop, Cline, Roo Code and more.
Vector database storage
Code is stored in a vector database (Zilliz Cloud or Milvus), so only related snippets go into the prompt.
Published npm packages
The MCP server and a core library are on npm, and the badges also point to a VS Code extension.
What you could build
- Search a large unfamiliar codebase for code that handles a given feature, such as authentication.
- Give Claude Code or Cursor project-wide context without pasting whole directories into prompts.
- Cut token use on big repositories by retrieving only related code for each request.
- Add the same code search tool to several MCP-compatible agents with one server.
- Wire the core library into a LangChain or LangGraph retrieval setup.
Get started
Get a Zilliz Cloud endpoint and API key plus an OpenAI API key, then register the MCP server with your client using the command below. Open your project in the agent, say 'Index this codebase', check the indexing status, then search in plain language. Requires Node.js 20 or newer.
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@latestCommands are copied from the project's README. Read it on GitHub for the full setup.
More in Coding agents & dev tools
rea
MCP server that lets AI agents reverse engineer apps, binaries and websites locally