Claude Context — Semantic Code Search MCP for AI Coding Agents
Make your entire codebase the context for any coding agent with semantic code search.
- Source repo
- zilliztech/claude-context
- Stars
- ★ 13k
- Last updated
- 9d ago
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- TypeScript
- FA score
- 59/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changesCodex · Claude Code · OpenAI API
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer working on a large or unfamiliar codebase wants to quickly locate functions implementing specific behavior without manual grep.
- Not a fit if
- Users wanting zero-config setup without managing a vector database and API keys
- Projects outside Node.js 20+ or unwilling to depend on an external vector database
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-24+3.6 ★/day over 7 days
- Source review
- 59/100 · Major gaps
What does this agent do, and when should you use it?
Claude Context is an MCP plugin that adds semantic code search to Claude Code and other AI coding assistants, providing deep context from your entire codebase. It indexes code into a vector database and retrieves only relevant snippets, reducing token usage and cost while maintaining retrieval quality. The repository is a monorepo containing the core indexing engine (@zilliz/claude-context-core), the MCP server (@zilliz/claude-context-mcp), and a VS Code extension. It supports hybrid search (BM25 + dense vectors), incremental indexing via Merkle trees, and AST-based code chunking. Deployment requires an OpenAI embedding API key and a Milvus or Zilliz Cloud vector database. The MCP server follows the standard MCP protocol with stdio transport, integrating with multiple clients such as Claude Code, Codex CLI, Cursor, and more.
Claude Context takes a codebase directory as input, splits files into chunks, generates embeddings using OpenAI models, and stores them in a Milvus/Zilliz Cloud vector database. It exposes MCP tools: index_codebase, search_code, clear_index, and get_indexing_status. On search, it performs hybrid retrieval (BM25 + dense vectors) to return relevant code snippets with file paths, line numbers, and content. Core classes include Context, MilvusVectorDatabase, and OpenAIEmbedding. The MCP server runs via npx @zilliz/claude-context-mcp, and configuration uses environment variables OPENAI_API_KEY, MILVUS_ADDRESS, and MILVUS_TOKEN.
- A developer working on a large or unfamiliar codebase wants to quickly locate functions implementing specific behavior without manual grep.
- An engineering team wants to reduce token costs when using Claude Code on big repos by loading only relevant code into context.
- A team using multiple AI coding assistants (e.g., Cursor, Gemini CLI) needs a standardized MCP-based semantic search across tools.
- A developer maintaining a fast-moving codebase needs incremental indexing to keep the semantic index up to date efficiently.
- A VS Code user wants to search code using natural language within the IDE and see results with line numbers directly.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Environment variables
OPENAI_API_KEYMILVUS_TOKEN- Runtime
- Node.js 20+
How do you install or deploy this agent?
Prerequisites: Node.js >= 20; obtain an OpenAI API key; set up a Zilliz Cloud instance (or Milvus) and get the public endpoint and API token.
For Claude Code, run:
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@latestFor other clients (Codex CLI, Gemini CLI, Cursor, etc.), see the README sections with configuration snippets.
How do you use this agent?
- Start Claude Code in your project directory (
cd your-project && claude). - Type
Index this codebaseto index. - Check status with
Check the indexing status. - Ask questions like
Find functions that handle user authentication.
You can also use the core package programmatically in TypeScript:
import { Context, MilvusVectorDatabase, OpenAIEmbedding } from '@zilliz/claude-context-core';
const embedding = new OpenAIEmbedding({ apiKey: 'your-openai-api-key', model: 'text-embedding-3-small' });
const vectorDatabase = new MilvusVectorDatabase({ address: 'your-zilliz-cloud-public-endpoint', token: 'your-zilliz-cloud-api-key' });
const context = new Context({ embedding, vectorDatabase });
const stats = await context.indexCodebase('./your-project', (progress) => {});
const results = await context.semanticSearch('./your-project', 'vector database operations', 5);Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
What are this agent's strengths and limitations?
- Hybrid search (BM25 + dense vectors) yields relevant and context-rich results.
- Incremental indexing with Merkle trees reduces re-indexing overhead.
- AST-based code chunking improves understanding and supports many languages.
- MCP protocol allows integration with many AI coding tools, including Claude Code, Codex, Cursor.
- Evaluation shows ~40% token reduction with equivalent retrieval quality, saving costs.
- Requires external vector database (Zilliz Cloud or Milvus) and OpenAI API key, not fully local.
- Setup involves multiple configuration steps and API key management.
- Potential vendor lock-in with Zilliz Cloud, though Milvus offers an open-source alternative.
- Node.js-only runtime may limit adoption in non-Node.js environments.
How does this agent compare with similar options?
Claude Context is compared with other coding tools like Serena, Context7, or DeepWiki in the FAQ; unlike these, it emphasizes hybrid search and incremental indexing for codebase context.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Claude Context — Semantic Code Search MCP for AI Coding Agents This agent | 59 · Major gaps | MCP serverFree + model costs | ★ 13k | 9d ago | TypeScript | Codex · Claude Code · OpenAI API |
| CocoIndex Code | 66 · Some gaps | CLIFree + model costs | ★ 3k | 7d ago | Python | Codex · Claude Code · OpenAI API |
| Compartment | 73 · Some gaps | CLIFree | ★ 470 | 2d ago | Python | Codex · Claude Code |
| AOCI-CODE — a Git-versioned cognition index for coding agents | 82 · Good | CLIFree + model costs | ★ 3.2k | today | Go | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
Tools are scoped to indexing, searching, status lookup, and clearing for an explicit absolute path. The README says code is sent to the selected embedding service and stored in Milvus/Zilliz; the FAQ describes a local Ollama/Milvus option, so data flows are partly disclosed. Deductions: clearing is available but no recovery mechanism is shown; the material does not describe sensitive-file safeguards or transmission and retention controls; default and configured inclusion rules combine, while external effects and privilege boundaries are only lightly explained. The re-index confirmation requirement appears in tool text but there is no general confirmation or rollback mechanism. Dependency security and source verification evidence are limited.
AGENTS.md and CLAUDE.md agree on architecture and error handling, and the README, FAQ, and MCP entry point support the main capabilities. The materials describe a clear error for unindexed searches, status lookup, and troubleshooting steps. Deductions: Node ranges conflict (README says 20+, repository guidance says <24, while CI includes 24), and MCP examples use latest; the supplied material does not establish dependency availability or supply-chain review, and only part of error handling is visible.
The README covers Claude Code, several MCP clients, VS Code, and library use; the FAQ describes multiple projects and local deployment. Tool descriptions specify indexing and search scenarios, absolute-path requirements, and the unindexed-codebase flow. Deductions: capability boundaries are mainly described at overview level, and workspace discovery and background sync depend on client/configuration details that are not fully specified in the tool guidance.
The README, documentation tree, FAQ, troubleshooting guide, and examples provide clear information architecture, multi-client setup instructions, examples, and an explicit MIT license. Deductions: some limitations are documented, such as separate indexes for path aliases and phase-based progress, but there is no systematic limitations list; package metadata shows version 0.1.15 and a release workflow but no changelog; contribution guidance and repository authorship exist, while maintenance commitments and update paths are only partly clear.
The product offers hybrid semantic code search, incremental indexing, and clearly named MCP tools for multiple coding workflows; the README claims an evaluation showing about 40% fewer tokens. Deductions: that benefit is a project claim, and the supplied material does not fully explain data/indexing costs or retrieval-quality tradeoffs; evidence about output format and result interpretation across scenarios is limited.
Core claims can be traced to the README, MCP tool definitions, FAQ, package metadata, and CI/release configuration, with architecture descriptions corroborated by the tool entry point. Deductions: runtime-version ranges conflict across sources, the evaluation is summarized without its method or data in the supplied material, and several performance, support, and automatic-behavior claims lack independent corroboration.
- Indexing reads project files, sends embedding requests to the configured service, and writes vectors to the configured database. Confirm the target path, exclusion rules, and service data-handling terms before use.
- The README Node.js requirement differs from repository guidance and the CI matrix; installation examples use @latest, so verify the version used for deployment.
FAQ
Can I use a fully local deployment setup?
Does it support multiple projects / codebases?
What files does Claude Context decide to embed?
Can I avoid using Zilliz Cloud?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.