Context+
Semantic Intelligence for Large-Scale Engineering.
Context+ is an MCP server designed for developers who demand 99% accuracy. By combining RAG, Tree-sitter AST, Spectral Clustering, and Obsidian-style linking, Context+ turns a massive codebase into a searchable, hierarchical feature graph.
https://github.com/user-attachments/assets/a97a451f-c9b4-468d-b036-15b65fc13e79
Discovery
Analysis
Code Ops
Version Control
Memory & RAG
Complementary server: pmll-memory-mcp (npx pmll-memory-mcp) is a separate MCP server by @drQedwards that adapts Context+'s long-term memory graph and adds short-term KV context memory, Q-promise deduplication, and a solution engine on top. See drQedwards/PPM for details.
Setup
Quick Start (npx / bunx)
No installation needed. Add Context+ to your IDE MCP config.
For Claude Code, Cursor, and Windsurf, use mcpServers:
{
"mcpServers": {
"contextplus": {
"command": "bunx",
"args": ["contextplus"],
"env": {
"OLLAMA_EMBED_MODEL": "nomic-embed-text",
"OLLAMA_CHAT_MODEL": "gemma2:27b",
"OLLAMA_API_KEY": "YOUR_OLLAMA_API_KEY"
}
}
}
}
For VS Code (.vscode/mcp.json), use servers and inputs:
{
"servers": {
"contextplus": {
"type": "stdio",
"command": "bunx",
"args": ["contextplus"],
"env": {
"OLLAMA_EMBED_MODEL": "nomic-embed-text",
"OLLAMA_CHAT_MODEL": "gemma2:27b",
"OLLAMA_API_KEY": "YOUR_OLLAMA_API_KEY"
}
}
},
"inputs": []
}
If you prefer npx, use:
"command": "npx"
"args": ["-y", "contextplus"]
Or generate the MCP config file directly in your current directory:
npx -y contextplus init claude
bunx contextplus init cursor
npx -y contextplus init opencode
Supported coding agent names: claude, cursor, vscode, windsurf, opencode.
Config file locations:
CLI Subcommands
init [target] - Generate MCP configuration (targets: claude, cursor, vscode, windsurf, opencode).
skeleton [path] or tree [path] - (New) View the structural tree of a project with file headers and symbol definitions directly in your terminal.
[path] - Start the MCP server (stdio) for the specified path (defaults to current directory).
Including paths excluded by the workspace .gitignore
If your workspace .gitignore excludes a sub-directory that you still want
indexed (common in monorepos where sub-projects under repos/, packages/,
or vendor/ are gitignored at the top level), use --include or
CONTEXTPLUS_EXTRA_ROOTS to add the paths back.
CLI form (repeatable):
bunx contextplus /path/to/workspace \
--include repos/lacuna \
--include repos/graphrag-core
Environment variable (fallback when no --include flag is set; uses the
system path separator — : on Unix, ; on Windows):
CONTEXTPLUS_EXTRA_ROOTS=repos/lacuna:repos/graphrag-core \
bunx contextplus /path/to/workspace
In .mcp.json the env form is usually more ergonomic:
{
"mcpServers": {
"contextplus": {
"command": "bunx",
"args": ["contextplus", "/path/to/workspace"],
"env": {
"CONTEXTPLUS_EXTRA_ROOTS": "repos/lacuna:repos/graphrag-core"
}
}
}
}
Each path listed is walked independently of the workspace root, with a
fresh ignore scope. Each path's own .gitignore is respected. Paths are
validated at startup; invalid entries (non-existent, not a directory,
outside the workspace) emit a stderr warning and are skipped.
Nested .gitignore files inside the workspace and inside each extra root
are loaded and merged with inherited rules, matching git and ripgrep
behavior.
From Source
npm install
npm run build
Embedding Providers
Context+ supports two embedding backends controlled by CONTEXTPLUS_EMBED_PROVIDER:
Ollama (Default)
No extra configuration needed. Just run Ollama with an embedding model:
ollama pull nomic-embed-text
ollama serve
Google Gemini (Free Tier)
Full Claude Code .mcp.json example:
{
"mcpServers": {
"contextplus": {
"command": "npx",
"args": ["-y", "contextplus"],
"env": {
"CONTEXTPLUS_EMBED_PROVIDER": "openai",
"CONTEXTPLUS_OPENAI_API_KEY": "YOUR_GEMINI_API_KEY",
"CONTEXTPLUS_OPENAI_BASE_URL": "https://generativelanguage.googleapis.com/v1beta/openai",
"CONTEXTPLUS_OPENAI_EMBED_MODEL": "text-embedding-004"
}
}
}
}
Get a free API key at Google AI Studio.
OpenAI
{
"mcpServers": {
"contextplus": {
"command": "npx",
"args": ["-y", "contextplus"],
"env": {
"CONTEXTPLUS_EMBED_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-...",
"OPENAI_EMBED_MODEL": "text-embedding-3-small"
}
}
}
}
Other OpenAI-compatible APIs (Groq, vLLM, LiteLLM)
Any endpoint implementing the OpenAI Embeddings API works:
{
"mcpServers": {
"contextplus": {
"command": "npx",
"args": ["-y", "contextplus"],
"env": {
"CONTEXTPLUS_EMBED_PROVIDER": "openai",
"CONTEXTPLUS_OPENAI_API_KEY": "YOUR_KEY",
"CONTEXTPLUS_OPENAI_BASE_URL": "https://your-proxy.example.com/v1",
"CONTEXTPLUS_OPENAI_EMBED_MODEL": "your-model-name"
}
}
}
}
Note: The semantic_navigate tool also uses a chat model for cluster labeling. When using the openai provider, set CONTEXTPLUS_OPENAI_CHAT_MODEL (default: gpt-4o-mini).
For VS Code, Cursor, or OpenCode, use the same env block inside your IDE's MCP config format (see Config file locations table above).
Architecture
Three layers built with TypeScript over stdio using the Model Context Protocol SDK:
Core (src/core/) - Multi-language AST parsing (tree-sitter, 43 extensions), gitignore-aware traversal, Ollama vector embeddings with disk cache, wikilink hub graph, in-memory property graph with decay scoring.
Tools (src/tools/) - 17 MCP tools exposing structural, semantic, operational, and memory graph capabilities.
Git (src/git/) - Shadow restore point system for undo without touching git history.
Runtime Cache (.mcp_data/) - created on server startup; stores reusable file, identifier, and call-site embeddings to avoid repeated GPU/CPU embedding work. A realtime tracker refreshes changed files/functions incrementally.
Config
Test
npm test
npm run test:demo
npm run test:all