Get the FREE Ultimate OpenClaw Setup Guide →

claude-context

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zilliztech-claude-context npx -y @zilliz/claude-context-mcp@latest \
  --env MILVUS_TOKEN="your-zilliz-cloud-api-key" \
  --env OPENAI_API_KEY="your-openai-api-key"

How to use

Claude Context MCP provides an integration that feeds Claude-based coding assistants with your entire codebase as semantic context. This enables code search and embedding-based retrieval to influence code completion, search, and analysis tasks performed by Claude Code and related agents. The MCP server is exposed as a ready-to-run node package that, when started, connects your OpenAI embedding/LLM workflow to a Milvus-backed vector database containing your repository's code, so Claude can fetch highly relevant snippets without loading the whole codebase into memory. You can configure the MCP server through various tools (e.g., Codex CLI, Gemini CLI, Qwen Code, Cursor, Void, Claude Desktop, Windsurf) by pointing them to the claude-context MCP server with the appropriate environment variables and the npx command provided in the README. Typical usage involves supplying your OpenAI API key and Milvus token, then enabling the MCP server in the client tooling so Claude receives contextually relevant code snippets during interactions.

How to install

Prerequisites:

  • Node.js 20.x (>= 20.0.0 and < 24.0.0 as recommended by Claude Context)
  • npm (comes with Node.js)
  • An OpenAI API key (for embedding model)
  • A Milvus-compatible vector store token/key (MILVUS_TOKEN)

Installation steps:

  1. Ensure your environment has Node.js 20.x installed. Verify with: node -v npm -v
  2. Install or run the MCP server via npx (no local install required): npx -y @zilliz/claude-context-mcp@latest

    This will start the MCP server for Claude Context contextual code search

  3. Set required environment variables (examples): OPENAI_API_KEY=sk-your-openai-api-key MILVUS_TOKEN=your-zilliz-cloud-api-key
  4. Connect your MCP-enabled client (e.g., Claude Code, Codex CLI, Gemini, Qwen, Cursor, Void, Claude Desktop, Windsurf) by configuring them to use the claude-context MCP server with the provided command and environment variables.
  5. (Optional) If you maintain a local configuration file for a client, follow the provider-specific instructions to point to the MCP server using: command = "npx" and args = ["-y", "@zilliz/claude-context-mcp@latest"] with env containing OPENAI_API_KEY and MILVUS_TOKEN.

Additional notes

Tips and caveats:

  • Node.js compatibility: Node.js versions >= 24 may not be compatible with Claude Context MCP; use a 20.x version as recommended and documented in the README.
  • Keep OPENAI_API_KEY and MILVUS_TOKEN secure; do not commit them to public repos.
  • The MCP server relies on a Milvus vector store; ensure your Milvus instance or cloud service is accessible and the MILVUS_TOKEN is valid.
  • Some client tools (Codex CLI, Gemini, Qwen, Cursor, Void, Claude Desktop) provide sample JSON or TOML configurations; you can adapt the provided snippet to point to your MCP server and credentials.
  • If startup timeout is an issue, you can adjust startup_timeout_ms in client configs where supported (as shown in the Codex CLI example).
  • When using -y with npx in scripting, ensure your environment supports non-interactive installs; otherwise omit -y and rely on the default latest tag per client guidance.

Related MCP Servers

Sponsor this space

Reach thousands of developers