claude-context is a free, open source machine learning infrastructure project written in TypeScript and released under MIT. It has 12,537 GitHub stars, 923 forks and 146 open issues, and was last pushed 2 months ago. On this registry it ranks #15 of 57 tracked projects in Machine Learning Infrastructure, with 5 head-to-head comparisons available. It gained 9 stars over the last 3 tracked days.

What is claude-context?

What it is

Claude Context is an open-source Model Context Protocol (MCP) plugin that adds semantic code search to Claude Code and other AI coding agents. It is written in TypeScript, licensed under MIT, and published to npm as @zilliz/claude-context-core and @zilliz/claude-context-mcp. The project lives in the AI coding agent ecosystem, where it plugs into MCP-compatible clients such as Claude Code, OpenAI Codex CLI, Cursor, and Gemini CLI. A companion VS Code extension is distributed through the Visual Studio Marketplace as zilliz.semanticcodesearch.

The concrete problem it solves is context cost and context discovery. Loading entire directories into an agent for every request is expensive and slow, and multi-round file discovery wastes turns before any work begins. Claude Context instead indexes the codebase into a vector database and retrieves only the relevant code for each request, so the agent receives deep context from millions of lines without scanning the whole tree. The README frames this as keeping costs manageable for large repositories while still giving the agent the code it needs.

Key capabilities

  • Semantic code search across an entire codebase, returning relevant code directly into the agent's context.
  • MCP server integration, added to Claude Code through the claude mcp add command line interface.
  • Vector database storage of the codebase, with only related code pulled into context per request.
  • Embedding-based retrieval using an OpenAI embedding model.
  • Merkle-tree based indexing, as indicated by the repository topics.
  • Support for multiple MCP clients, including Claude Code, OpenAI Codex CLI, Cursor, and Gemini CLI.
  • Distribution as both npm packages and a VS Code extension.

Who uses it and how

  • Developers running Claude Code who add the MCP server and query their repository through semantic search instead of manual file browsing.
  • Teams working on large codebases where loading whole directories per request is too costly, and selective retrieval is preferred.
  • Users of OpenAI Codex CLI, who configure the server in ~/.codex/config.toml under the mcp_servers key.
  • Users of Cursor and Gemini CLI, which the topics list as supported agent environments.
  • VS Code users who install the zilliz.semanticcodesearch extension for semantic code search inside the editor.

Getting started

Install requires Node.js 20 or later. The MCP server is run through npx @zilliz/claude-context-mcp@latest, configured with an OpenAI API key for embeddings and a Milvus or Zilliz Cloud vector database address and token; a free vector database is available from Zilliz Cloud.

When to use it — and when not to

Claude Context is a fit when a repository is large enough that full-directory context loading is wasteful, and when the agent client already speaks MCP. A self-hoster must operate a vector database and supply an OpenAI API key for embeddings, so there are external dependencies and per-request embedding costs to account for. The repository carries 146 open issues, which suggests active development rather than a fully settled surface.

project readme (upstream, from github) — read inline

🆕 Looking for persistent memory for Claude Code? Check out memsearch Claude Code plugin — a markdown-first memory system that gives your AI agent long-term memory across sessions.

Your entire codebase as Claude's context

License Node.js Documentation VS Code Marketplace npm - core npm - mcp Twitter DeepWiki discord zilliztech/claude-context | Trendshift

Claude Context is an MCP plugin that adds semantic code search to Claude Code and other AI coding agents, giving them deep context from your entire codebase.

🧠 Your Entire Codebase as Context: Claude Context uses semantic search to find all relevant code from millions of lines. No multi-round discovery needed. It brings results straight into the Claude's context.

💰 Cost-Effective for Large Codebases: Instead of loading entire directories into Claude for every request, which can be very expensive, Claude Context efficiently stores your codebase in a vector database and only uses related code in context to keep your costs manageable.


🚀 Demo

img

Model Context Protocol (MCP) allows you to integrate Claude Context with your favorite AI coding assistants, e.g. Claude Code.

Quick Start

Prerequisites

Get a free vector database on Zilliz Cloud 👈

Claude Context needs a vector database. You can sign up on Zilliz Cloud to get an API key.

Copy your Personal Key to replace your-zilliz-cloud-api-key in the configuration examples.

Get OpenAI API Key for embedding model

You need an OpenAI API key for the embedding model. You can get one by signing up at OpenAI.

Your API key will look like this: it always starts with sk-.
Copy your key and use it in the configuration examples below as your-openai-api-key.

Configure MCP for Claude Code

System Requirements:

  • Node.js >= 20.0.0
Configuration

Use the command line interface to add the Claude Context MCP server:

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

See the Claude Code MCP documentation for more details about MCP server management.

Other MCP Client Configurations

OpenAI Codex CLI

Codex CLI uses TOML configuration files:

  1. Create or edit the ~/.codex/config.toml file.

  2. Add the following configuration:

# IMPORTANT: the top-level key is `mcp_servers` rather than `mcpServers`.
[mcp_servers.claude-context]
command = "npx"
args = ["@zilliz/claude-context-mcp@latest"]
env = { "OPENAI_API_KEY" = "your-openai-api-key", "MILVUS_TOKEN" = "your-zilliz-cloud-api-key" }
# Optional: override the default 10s startup timeout
startup_timeout_ms = 20000
  1. Save the file and restart Codex CLI to apply the changes.
Gemini CLI

Gemini CLI requires manual configuration through a JSON file:

  1. Create or edit the ~/.gemini/settings.json file.
  2. Add the following configuration:
{
  "mcpServers": {
    "claude-context": {
      "command": "npx",
      "args": ["@zilliz/claude-context-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "MILVUS_TOKEN": "your-zilliz-cloud-api-key"
      }
    }
  }
}
  1. Save the file and restart Gemini CLI to apply the changes.
Qwen Code

Create or edit the ~/.qwen/settings.json file and add the following configuration:

{
  "mcpServers": {
    "claude-context": {
      "command": "npx",
      "args": ["@zilliz/claude-context-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "MILVUS_ADDRESS": "your-zilliz-cloud-public-endpoint",
        "MILVUS_TOKEN": "your-zilliz-cloud-api-key"
      }
    }
  }
}
Cursor

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server

Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.

{
  "mcpServers": {
    "claude-context": {
      "command": "npx",
      "args": ["-y", "@zilliz/claude-context-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "MILVUS_ADDRESS": "your-zilliz-cloud-public-endpoint",
        "MILVUS_TOKEN": "your-zilliz-cloud-api-key"
      }
    }
  }
}
Void

Go to: Settings -> MCP -> Add MCP Server

Add the following configuration to your Void MCP settings:

{
  "mcpServers": {
    "code-context": {
      "command": "npx",
      "args": ["-y", "@zilliz/claude-context-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "MILVUS_ADDRESS": "your-zilliz-cloud-public-endpoint",
        "MILVUS_TOKEN": "your-zilliz-cloud-api-key"
      }
    }
  }
}
Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "claude-context": {
      "command": "npx",
      "args": ["@zilliz/claude-context-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "MILVUS_ADDRESS": "your-zilliz-cloud-public-endpoint",
        "MILVUS_TOKEN": "your-zilliz-cloud-api-key"
      }
    }
  }
}
Windsurf

Windsurf supports MCP configuration through a JSON file. Add the following configuration to your Windsurf MCP settings:

{
  "mcpServers": {
    "claude-context": {
      "command": "npx",
      "args": ["-y", "@zilliz/claude-context-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "MILVUS_ADDRESS": "your-zilliz-cloud-public-endpoint",
        "MILVUS_TOKEN": "your-zilliz-cloud-api-key"
      }
    }
  }
}
VS Code

The Claude Context MCP server can be used with VS Code through MCP-compatible extensions. Add the following configuration to your VS Code MCP settings:

{
  "mcpServers": {
    "claude-context": {
      "command": "npx",
      "args": ["-y", "@zilliz/claude-context-mcp@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "MILVUS_ADDRESS": "your-zilliz-cloud-public-endpoint",
        "MILVUS_TOKEN": "your-zilliz-cloud-api-key"
      }
    }
  }
}
Cherry Studio

Cherry Studio allows for visual MCP server configuration through its settings interface. While it doesn't directly support manual JSON conf

readme truncated — read the full docs on github

Frequently asked questions

Is claude-context free to use?

claude-context is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does claude-context do?

Code search MCP for Claude Code. Make entire codebase the context for any coding agent.

What is claude-context written in?

claude-context is primarily written in TypeScript. Its source is publicly available at https://github.com/zilliztech/claude-context, and it has 12,537 GitHub stars.