code-context-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Code Context MCP
A multi-provider embedding MCP server with local Milvus for semantic code search. Works with Claude Code, Cursor, Windsurf, and other MCP-compatible IDEs.
Features
Multi-provider embeddings: Local Qwen (free), OpenAI, or DeepSeek
Dimension mismatch detection: Warns before indexing if dimensions don't match
Zero cloud dependency: Use local Qwen for completely offline operation
Dual deployment: Docker or local with pnpm
Related MCP server: mcp-context
Architecture
┌─────────────────┐ ┌────────────────────┐ ┌─────────────────┐
│ Your Codebase │────▶│ Embedding Provider │────▶│ Local Milvus │
│ │ │ (Qwen/OpenAI/etc) │ │ (Vector Store) │
└─────────────────┘ └────────────────────┘ └─────────────────┘
│ │
│ ┌────────────────────────────┐ │
└────────▶│ code-context-mcp │◀─────────┘
│ (MCP Server) │
└────────────────────────────┘
│
┌─────────────┴─────────────┐
▼ ▼ ▼
Claude Code Cursor WindsurfQuick Start
Option A: Docker (Recommended)
# 1. Configure
cp .env.example .env
# Edit .env with your settings
# 2. Start all services
docker-compose up -d
# 3. Verify (~60 seconds to initialize)
curl http://localhost:9091/healthz # Milvus
curl http://localhost:3100/health # MCP ServerIDE Configuration (Docker):
{
"mcpServers": {
"code-context": {
"url": "http://localhost:3100/sse"
}
}
}Option B: Local Development
# 1. Start only Milvus in Docker
docker-compose up -d milvus
# 2. Install and build
pnpm install
pnpm build
# 3. Configure IDE (see below)IDE Configuration (Local):
{
"mcpServers": {
"code-context": {
"command": "node",
"args": ["/path/to/code-context-mcp/dist/index.js"],
"env": {
"EMBEDDING_PROVIDER": "qwen-local",
"QWEN_LOCAL_BASE_URL": "http://172.18.35.123:8001/v1",
"QWEN_LOCAL_MODEL": "Qwen3-Embedding-4B",
"MILVUS_ADDRESS": "127.0.0.1:19530"
}
}
}
}MCP Tools
Tool | Description |
| Index a directory into Milvus |
| Semantic search across indexed code |
| Check provider/collection dimension compatibility |
| Delete a collection (for re-indexing) |
| Show current provider configuration |
Usage:
index_codebase /path/to/your/project
search_code "authentication logic"
check_dimensionsEmbedding Providers
Provider | Model | Dimensions | Cost |
| Qwen3-Embedding-4B | 2560 | Free |
| text-embedding-3-small | 1536 | $0.02/1M tokens |
| text-embedding-3-large | 3072 | $0.13/1M tokens |
| deepseek-embedding-v2 | 768 | Paid |
Environment Variables
Variable | Description | Default |
|
|
|
| Milvus server address |
|
| Check dimensions before indexing |
|
|
|
|
| HTTP port (http mode) |
|
Provider-specific:
Provider | Variables |
Local Qwen |
|
OpenAI |
|
DeepSeek |
|
Dimension Mismatch Handling
Different providers produce different dimensions. Switching providers requires re-indexing:
drop_collection code_context confirm=true
index_codebase /path/to/projectDocker Commands
docker-compose up -d # Start all
docker-compose up -d milvus # Start only Milvus
docker-compose logs -f # View logs
docker-compose down # Stop all
docker-compose down -v # Reset (delete data)
docker-compose build --no-cache # RebuildLocal Development
pnpm install # Install dependencies
pnpm build # Build TypeScript
pnpm dev # Run in dev mode
pnpm start # Run production buildProject Structure
code-context-mcp/
├── docker-compose.yml # Milvus + MCP server
├── Dockerfile
├── package.json
├── tsconfig.json
├── .env.example
└── src/
├── index.ts # Entry point (stdio + HTTP)
├── config.ts # Configuration
├── providers/ # Embedding providers
│ ├── base.ts
│ ├── openai.ts
│ ├── qwen-local.ts
│ └── deepseek.ts
├── milvus/ # Milvus integration
│ ├── client.ts
│ └── dimension-checker.ts
└── tools/ # MCP tools
├── index-codebase.ts
├── search-code.ts
└── check-dimensions.tsLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
An MCP server for search and retrieval over a local LanceDB database
Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA high-performance MCP server for semantic search and codebase indexing using the Qdrant vector database. It features optimized embedding pipelines, AST-aware chunking, and git metadata enrichment for fast, privacy-focused local or remote search.401 npm31MIT
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.-
- AlicenseAqualityBmaintenancePersistent memory MCP server for Claude Code, Cursor, and GitHub Copilot. Semantic search, Git sync, project-based, Persistent memory MCP server for Claude Code, Cursor, and GitHub Copilot. Semantic search, Git sync, project-based organization, and team collaboration via Model Context Protocol.15342 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA Weaviate-backed MCP server that gives Claude Code agents semantic search over your repository's PR review comments and source code.MIT