Claude Context

by zilliztech

Community Productivity & Workflow 12k likes

Claude Context adds semantic, vector-backed code search to Claude Code, so an agent retrieves the relevant functions instead of scanning whole files.

Add to Claude Code

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@latest

Source: https://github.com/zilliztech/claude-context

About

Claude Context indexes an entire codebase into a vector database (via Zilliz Cloud/Milvus) using hybrid search that combines BM25 keyword matching with dense embeddings, then lets an agent query it with a natural-language question instead of grep-style pattern matching or loading whole directories into context. The project reports roughly 40% lower token usage than context-stuffing approaches at equivalent retrieval quality: you're paying for relevant functions, not entire files.

It's a four-tool MCP server: index a codebase, search it, check indexing progress, and clear an index when you want to rebuild it. Setup needs an OpenAI API key for embeddings plus a Zilliz Cloud endpoint and token for the vector store, after which you tell Claude Code to "index this codebase" and start asking things like "find functions that handle user authentication."

Key features

  • Hybrid search combining BM25 keyword matching with dense vector embeddings
  • Roughly 40% lower token usage than loading full files or directories into context
  • Indexes an entire codebase once, then serves many natural-language searches against it
  • Reports live indexing progress so you know when a large repo is ready to query
  • Backed by Milvus/Zilliz Cloud as the vector store
  • Works with Claude Code and other MCP-compatible coding agents

Use cases

  • Asking an agent to find every function that handles authentication across a large repo
  • Cutting context costs on a big codebase by retrieving only relevant code, not whole files
  • Re-indexing after a large refactor to keep semantic search results accurate
  • Onboarding an agent onto an unfamiliar codebase without manually pointing it at files

Available tools

index_codebase

Indexes a directory using hybrid BM25 + dense vector search.

search_code

Runs a natural-language semantic search over an indexed codebase.

get_indexing_status

Reports current indexing progress and completion status.

clear_index

Removes the search index for a specific codebase.

Frequently asked questions

Do I need to pay for a vector database separately?

You need a Zilliz Cloud endpoint and token (it has a free tier) plus an OpenAI API key for generating embeddings.

Does the index update automatically as I edit files?

No. The server exposes an indexing-status tool and a clear_index tool for rebuilding, so re-indexing after significant changes is a deliberate step, not automatic.