Context+ क्या है?
Context+ एक MCP सर्वर जो बड़े codebase को खोजने योग्य, पदानुक्रमित feature graph में बदल देता है. यह Retrieval & Knowledge (RAG) टूल्स की Code Indexing & Search श्रेणी में आता है; ओपन सोर्स है, TypeScript में लिखा गया है और MIT लाइसेंस के तहत है। शुरू करने के लिए: embedding model शुरू करें.
सारांश
Context+ एक Model Context Protocol सर्वर है, जो AI coding agents को फ़ाइलें पूरी तरह पढ़ने के बजाय codebase का semantic दृश्य देता है। यह embeddings पर आधारित retrieval, Tree-sitter AST parsing, spectral clustering और Obsidian-style wikilinks को मिलाकर एक बड़े repository को उस चीज़ में बदलता है, जिसे प्रोजेक्ट खोजे जा सकने वाला, पदानुक्रमित feature graph कहता है।
सर्वर पाँच समूहों में 17 MCP tools उपलब्ध कराता है। Discovery tools प्रोजेक्ट का structural AST tree, किसी फ़ाइल का skeleton (signatures और line ranges के साथ), meaning-based code और identifier search, और semantically related फ़ाइलों के clusters लौटाते हैं। Analysis tools किसी symbol के हर इस्तेमाल की जगह ढूँढते हैं और native linters और compilers चलाते हैं। Code-ops tools लिखने के काम को `propose_commit` वाले validating चरण से होकर भेजते हैं; version-control tools आपको AI बदलावों की सूची देखने और shadow restore points के ज़रिए उन्हें पलटने देते हैं, जो git history को कभी नहीं छूते; और memory graph concepts, फ़ाइलों और symbols के बीच typed, समय के साथ क्षीण होने वाले relations स्टोर करता है।
यह TypeScript में लिखा गया है, stdio पर चलता है, और npm पर `contextplus` नाम से प्रकाशित है, इसलिए इसे अलग से install किए बिना `bunx` या `npx` से शुरू किया जा सकता है। Embeddings डिफ़ॉल्ट रूप से लोकल Ollama सर्वर से आते हैं, या किसी भी OpenAI-compatible endpoint से, जैसे OpenAI, Gemini, Groq या vLLM। Embeddings `.mcp_data/` में disk पर cache होते हैं, और एक realtime tracker बदली हुई फ़ाइलों और functions को incrementally refresh करता है।
यह क्या करता है
- Structural discovery: `get_context_tree` और `get_file_skeleton` पूरी फ़ाइल बॉडी पढ़े बिना AST trees, symbol line ranges और API surfaces लौटाते हैं
- `semantic_code_search` और `semantic_identifier_search` से मतलब के आधार पर semantic search, साथ ही `semantic_navigate`, जो spectral clustering से संबंधित फ़ाइलों को labeled clusters में समूहित करता है
- `get_blast_radius` से impact analysis, और `run_static_analysis`, जो TypeScript, Python, Rust और Go के लिए native linters और compilers चलाता है
- Safe writes: `propose_commit` बदलावों को validate करता है और shadow restore point बनाता है, और `undo_change` git को प्रभावित किए बिना AI edit को वापस ले जाता है
- Typed edges वाला memory graph, neighbor traversal के साथ semantic search, और पुराने links की decay-based pruning
- 43 file extensions में multi-language AST parsing, gitignore-aware traversal, और monorepos में gitignored sub-projects को index करने के लिए `--include` flag
शुरू करें
Context+ सीधे npm से चलता है, इसलिए setup ज़्यादातर इसे आपके editor की MCP config में जोड़ने भर का है। डिफ़ॉल्ट रूप से यह embeddings के लिए लोकल Ollama सर्वर का इस्तेमाल करता है।
Embedding model शुरू करें
Ollama डिफ़ॉल्ट embedding provider है, और इसे embedding model वाले चालू सर्वर से ज़्यादा किसी अतिरिक्त configuration की ज़रूरत नहीं है।
ollama pull nomic-embed-text
ollama serveअपने agent के लिए MCP config बनाएँ
`init` subcommand config फ़ाइल को मौजूदा directory में लिख देता है। समर्थित targets हैं `claude`, `cursor`, `vscode`, `windsurf` और `opencode`।
npx -y contextplus init claude
bunx contextplus init cursorया config में हाथ से जोड़ें
Claude Code, Cursor और Windsurf के लिए, server को `mcpServers` के अंतर्गत register करें (Claude Code `.mcp.json` पढ़ता है)।
{
"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"
}
}
}
}OpenAI-compatible provider पर स्विच करें (वैकल्पिक)
`CONTEXTPLUS_EMBED_PROVIDER` को `openai` पर सेट करें और इसे किसी भी ऐसे endpoint की ओर इंगित करें जो OpenAI Embeddings API लागू करता हो, जैसे स्वयं OpenAI।
{
"mcpServers": {
"contextplus": {
"command": "npx",
"args": ["-y", "contextplus"],
"env": {
"CONTEXTPLUS_EMBED_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-...",
"OPENAI_EMBED_MODEL": "text-embedding-3-small"
}
}
}
}Terminal से प्रोजेक्ट का निरीक्षण करें
`skeleton` (या `tree`) subcommand file headers और symbol definitions के साथ structural tree प्रिंट करता है; सर्वर चलाते समय `--include` gitignored paths को वापस जोड़ देता है।
npx -y contextplus skeleton ./my-project
bunx contextplus /path/to/workspace --include repos/lacunaकमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।
कब इस्तेमाल करें
- बड़े repository में फ़ाइलों को पूरा पढ़ने और grep करने के बजाय, coding agent को मतलब के आधार पर code खोजने दें
- Agent किसी symbol का नाम बदलने या उसे हटाने से पहले, हर उस फ़ाइल और line की जाँच करे जो उसका इस्तेमाल करती है
- AI बदलावों को git history से बाहर रहने वाले restore points के साथ पलटने योग्य रखें
- लोकल Ollama embedding model के साथ codebase search को पूरी तरह offline चलाएँ
How Context+ compares
Context+ alongside other open-source code indexing & search tools AI/TLDR tracks, ranked by GitHub stars.
| टूल | स्टार | यह क्या करता है |
|---|---|---|
| CodeGraph | ★ 79.4k | एजेंट के सवाल का जवाब एक ही tool call में देने वाला लोकल कोड नॉलेज ग्राफ़ |
| codebase-memory-mcp | ★ 49.5k | MCP के ज़रिए agents तक पहुँचने वाला आपके codebase का Tree-sitter knowledge graph |
| GitNexus | ★ 49k | कोडबेस को नॉलेज ग्राफ़ में इंडेक्स करता है और उसे MCP के ज़रिए एजेंट्स तक पहुँचाता है |
| code-review-graph | ★ 33k | कोडबेस का Tree-sitter map बनाकर उसे MCP के ज़रिए AI कोडिंग टूल्स को देता है, ताकि वे किसी टास्क के लिए सिर्फ़ ज़रूरी कोड पढ़ें |
| XERJ | ★ 23.4k | एक लोकल, Elasticsearch-compatible सर्च इंजन, जो किसी भी फ़ोल्डर को अपने-आप ऑटोइंडेक्स कर देता है, ताकि coding agents grep के बजाय उसी से query करें |
| Claude Context | ★ 12.8k | Claude Code के लिए पूरे कोडबेस में सेमांटिक कोड सर्च देने वाला MCP प्लगइन |
| Graft | ★ 11.6k | हर कोडबेस का नॉलेज ग्राफ़ एक बार बनाएँ, फिर उसे हर कोडिंग एजेंट को दें |
| Context+ | ★ 2k | एक MCP सर्वर जो बड़े codebase को खोजने योग्य, पदानुक्रमित feature graph में बदल देता है |
