# Claude Context

> MCP plugin that gives Claude Code semantic search over your whole codebase

- Category: Retrieval & Knowledge (RAG) / Code Indexing & Search
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/zilliztech/claude-context
- Website: https://github.com/zilliztech/claude-context/tree/master/docs
- Canonical page: https://ai-tldr.dev/tools/claude-context/

## In short

Claude Context is an MCP plugin from Zilliz that adds semantic code search to Claude Code and other AI coding agents. It sits in the Code Indexing & Search category of the Retrieval & Knowledge (RAG) tools and is open-source, written in TypeScript and licensed MIT. To get started: add the MCP server to Claude Code.

## 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.

1. 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.

```bash
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
```

2. Index 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.

```text
Index this codebase
```

3. Check 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.

```text
Check the indexing status
```

4. Search 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.

```text
Where is the user authentication handled in this codebase?
```

## 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
