MCPcopy
hub / github.com/zilliztech/claude-context

github.com/zilliztech/claude-context @v0.1.11 sqlite

repository ↗ · DeepWiki ↗ · release v0.1.11 ↗
648 symbols 1,647 edges 75 files 238 documented · 37%
README

🆕 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 configuration, you can add a new server via the GUI:

  1. Navigate to Settings → MCP Servers → Add Server.
  2. Fill in the server details:
  3. Name: claude-context
  4. Type: STDIO
  5. Command: npx
  6. Arguments: ["@zilliz/claude-context-mcp@latest"]
  7. Environment Variables:
    • OPENAI_API_KEY: your-openai-api-key
    • MILVUS_ADDRESS: your-zilliz-cloud-public-endpoint
    • MILVUS_TOKEN: your-zilliz-cloud-api-key
  8. Save the configuration to activate the server.

Cline

Cline uses a JSON configuration file to manage MCP servers. To integrate the provided MCP server configuration:

  1. Open Cline and click on the MCP Servers icon in the top navigation bar.

  2. Select the Installed tab, then click Advanced MCP Settings.

  3. In the cline_mcp_settings.json file, 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"
      }
    }
  }
}
  1. Save the file.

Augment

To configure Claude Context MCP in Augment Code, you can use either the graphical interface or manual configuration.

A. Using the Augment Code UI

  1. Click the hamburger menu.

  2. Select Settings.

  3. Navigate to the Tools section.

  4. Click the + Add MCP button.

  5. Enter the following command:

npx @zilliz/claude-context-mcp@latest

  1. Name the MCP: Claude Context.

  2. Click the Add button.


B. Manual Configuration

  1. Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
  2. Select Edit Settings
  3. Under Advanced, click Edit in settings.json
  4. Add the server configuration to the mcpServers array in the augment.advanced object
"augment.advanced": { 
  "mcpServers": [ 
    { 
      "name": "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"
      }
    }
  ]
}

Roo Code

Roo Code utilizes a JSON configuration file for MCP servers:

  1. Open Roo Code and navigate to Settings → MCP Servers → Edit Global Config.

  2. In the mcp_settings.json file, 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"
      }
    }
  }
}
  1. Save the file to activate the server.

Zencoder

Zencoder offers support for MCP tools and servers in both its JetBrains and VS Code plugin versions.

  1. Go to the Zencoder menu (...)
  2. From the dropdown menu, select Tools
  3. Click on the Add Custom MCP
  4. Add the name (i.e. Claude Context and server configuration from below, and make sure to hit the Install button
{
    "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"
    }
}

  1. Save the server by hitting the Install button.

LangChain/LangGraph

For LangChain/LangGraph integration examples, see this example.

Other MCP Clients

The server uses stdio transport and follows the standard MCP protocol. It can be integrated with any MCP-compatible client by running:

npx @zilliz/claude-context-mcp@latest

Usage in Your Codebase

  1. Open Claude Code

cd your-project-directory claude

  1. Index your codebase:

Index this codebase

  1. Check indexing status:

Check the indexing status

  1. Start searching:

Find functions that handle user authentication

🎉 That's it! You now have semantic code search in Claude Code.


Environment Variables Configuration

For more detailed MCP environment variable configuration, see our Environment Variables Guide.

Using Different Embedding Mod

Extension points exported contracts — how you extend this code

Splitter (Interface)
(no doc) [5 implementers]
packages/core/src/splitter/index.ts
IndexedRepository (Interface)
(no doc)
packages/chrome-extension/src/storage/indexedRepoManager.ts
MilvusWebConfig (Interface)
(no doc)
packages/vscode-extension/src/config/configManager.ts
ContextMcpConfig (Interface)
(no doc)
packages/mcp/src/config.ts
VectorDatabase (Interface)
(no doc) [4 implementers]
packages/core/src/vectordb/types.ts
VectorDocument (Interface)
(no doc)
packages/chrome-extension/src/stubs/milvus-vectordb-stub.ts
PluginConfig (Interface)
(no doc)
packages/vscode-extension/src/config/configManager.ts
CodebaseSnapshotV1 (Interface)
(no doc)
packages/mcp/src/config.ts

Core symbols most depended-on inside this repo

get
called by 134
packages/core/src/utils/env-manager.ts
split
called by 53
packages/core/src/splitter/index.ts
set
called by 35
packages/core/src/utils/env-manager.ts
makeRequest
called by 17
packages/core/src/vectordb/milvus-restful-vectordb.ts
addDebugInfo
called by 16
packages/chrome-extension/src/options.ts
showStatus
called by 15
packages/vscode-extension/src/webview/scripts/semanticSearch.js
saveCodebaseSnapshot
called by 14
packages/mcp/src/snapshot.ts
ensureInitialized
called by 13
packages/core/src/vectordb/milvus-vectordb.ts

Shape

Method 414
Function 111
Class 70
Interface 52
Enum 1

Languages

TypeScript90%
Python10%

Modules by API surface

packages/core/src/context.ts54 symbols
packages/mcp/src/snapshot.ts35 symbols
packages/vscode-extension/src/webview/scripts/semanticSearch.js31 symbols
packages/chrome-extension/src/background.ts31 symbols
packages/core/src/vectordb/milvus-restful-vectordb.ts28 symbols
packages/core/src/vectordb/milvus-vectordb.ts25 symbols
packages/core/src/vectordb/types.ts22 symbols
packages/core/src/vectordb/zilliz-utils.ts21 symbols
packages/chrome-extension/src/stubs/milvus-vectordb-stub.ts18 symbols
packages/vscode-extension/src/config/configManager.ts17 symbols
packages/core/src/sync/synchronizer.ts17 symbols
packages/core/src/embedding/ollama-embedding.ts16 symbols

Dependencies from manifests, versioned

@google/genai1.9.0 · 1×
@modelcontextprotocol/sdk1.12.1 · 1×
@types/chrome0.0.246 · 1×
@types/fs-extra11.0.0 · 1×
@types/jest30.0.0 · 1×
@types/mock-fs4.13.4 · 1×
@types/node20.0.0 · 1×
@types/vscode1.74.0 · 1×
@typescript-eslint/eslint-plugin8.31.1 · 1×
@vscode/vsce3.4.0 · 1×
@zilliz/claude-context-coreworkspace:* · 1×

For agents

$ claude mcp add claude-context \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact