[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74929":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":15,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},74929,"contextplus","forloopcodes\u002Fcontextplus","forloopcodes","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:\u002F\u002Fcontextplus.vercel.app",null,"TypeScript",1917,161,10,5,0,1,28,3,19.63,"MIT License",false,"main",true,[26],"mcp-server","2026-06-12 02:03:30","# Context+\n\nSemantic Intelligence for Large-Scale Engineering.\n\nContext+ 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.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fa97a451f-c9b4-468d-b036-15b65fc13e79\n\n## Tools\n\n### Discovery\n\n| Tool                         | Description                                                                                                                                                      |\n| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `get_context_tree`           | Structural AST tree of a project with file headers and symbol ranges (line numbers for functions\u002Fclasses\u002Fmethods). Dynamic pruning shrinks output automatically. |\n| `get_file_skeleton`          | Function signatures, class methods, and type definitions with line ranges, without reading full bodies. Shows the API surface.                                   |\n| `semantic_code_search`       | Search by meaning, not exact text. Uses embeddings over file headers\u002Fsymbols and returns matched symbol definition lines.                                        |\n| `semantic_identifier_search` | Identifier-level semantic retrieval for functions\u002Fclasses\u002Fvariables with ranked call sites and line numbers.                                                     |\n| `semantic_navigate`          | Browse codebase by meaning using spectral clustering. Groups semantically related files into labeled clusters.                                                   |\n\n### Analysis\n\n| Tool                  | Description                                                                                                                   |\n| --------------------- | ----------------------------------------------------------------------------------------------------------------------------- |\n| `get_blast_radius`    | Trace every file and line where a symbol is imported or used. Prevents orphaned references.                                   |\n| `run_static_analysis` | Run native linters and compilers to find unused variables, dead code, and type errors. Supports TypeScript, Python, Rust, Go. |\n\n### Code Ops\n\n| Tool              | Description                                                                                                              |\n| ----------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| `propose_commit`  | The only way to write code. Validates against strict rules before saving. Creates a shadow restore point before writing. |\n| `get_feature_hub` | Obsidian-style feature hub navigator. Hubs are `.md` files with `[[wikilinks]]` that map features to code files.         |\n\n### Version Control\n\n| Tool                  | Description                                                                                                |\n| --------------------- | ---------------------------------------------------------------------------------------------------------- |\n| `list_restore_points` | List all shadow restore points created by `propose_commit`. Each captures file state before AI changes.    |\n| `undo_change`         | Restore files to their state before a specific AI change. Uses shadow restore points. Does not affect git. |\n\n### Memory & RAG\n\n| Tool                      | Description                                                                                              |\n| ------------------------- | -------------------------------------------------------------------------------------------------------- |\n| `upsert_memory_node`      | Create or update a memory node (concept, file, symbol, note) with auto-generated embeddings.             |\n| `create_relation`         | Create typed edges between nodes (relates_to, depends_on, implements, references, similar_to, contains). |\n| `search_memory_graph`     | Semantic search with graph traversal — finds direct matches then walks 1st\u002F2nd-degree neighbors.         |\n| `prune_stale_links`       | Remove decayed edges (e^(-λt) below threshold) and orphan nodes with low access counts.                  |\n| `add_interlinked_context` | Bulk-add nodes with auto-similarity linking (cosine ≥ 0.72 creates edges automatically).                 |\n| `retrieve_with_traversal` | Start from a node and walk outward — returns all reachable neighbors scored by decay and depth.          |\n\n> **Complementary server:** [pmll-memory-mcp](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fpmll-memory-mcp) (`npx pmll-memory-mcp`) is a separate MCP server by [@drQedwards](https:\u002F\u002Fgithub.com\u002FdrQedwards) 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\u002FPPM](https:\u002F\u002Fgithub.com\u002FdrQedwards\u002FPPM) for details.\n\n## Setup\n\n### Quick Start (npx \u002F bunx)\n\nNo installation needed. Add Context+ to your IDE MCP config.\n\nFor Claude Code, Cursor, and Windsurf, use `mcpServers`:\n\n```json\n{\n  \"mcpServers\": {\n    \"contextplus\": {\n      \"command\": \"bunx\",\n      \"args\": [\"contextplus\"],\n      \"env\": {\n        \"OLLAMA_EMBED_MODEL\": \"nomic-embed-text\",\n        \"OLLAMA_CHAT_MODEL\": \"gemma2:27b\",\n        \"OLLAMA_API_KEY\": \"YOUR_OLLAMA_API_KEY\"\n      }\n    }\n  }\n}\n```\n\nFor VS Code (`.vscode\u002Fmcp.json`), use `servers` and `inputs`:\n\n```json\n{\n  \"servers\": {\n    \"contextplus\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"contextplus\"],\n      \"env\": {\n        \"OLLAMA_EMBED_MODEL\": \"nomic-embed-text\",\n        \"OLLAMA_CHAT_MODEL\": \"gemma2:27b\",\n        \"OLLAMA_API_KEY\": \"YOUR_OLLAMA_API_KEY\"\n      }\n    }\n  },\n  \"inputs\": []\n}\n```\n\nIf you prefer `npx`, use:\n\n- `\"command\": \"npx\"`\n- `\"args\": [\"-y\", \"contextplus\"]`\n\nOr generate the MCP config file directly in your current directory:\n\n```bash\nnpx -y contextplus init claude\nbunx contextplus init cursor\nnpx -y contextplus init opencode\n```\n\nSupported coding agent names: `claude`, `cursor`, `vscode`, `windsurf`, `opencode`.\n\nConfig file locations:\n\n| IDE         | Config File          |\n| ----------- | -------------------- |\n| Claude Code | `.mcp.json`          |\n| Cursor      | `.cursor\u002Fmcp.json`   |\n| VS Code     | `.vscode\u002Fmcp.json`   |\n| Windsurf    | `.windsurf\u002Fmcp.json` |\n| OpenCode    | `opencode.json`      |\n\n### CLI Subcommands\n\n- `init [target]` - Generate MCP configuration (targets: `claude`, `cursor`, `vscode`, `windsurf`, `opencode`).\n- `skeleton [path]` or `tree [path]` - **(New)** View the structural tree of a project with file headers and symbol definitions directly in your terminal.\n- `[path]` - Start the MCP server (stdio) for the specified path (defaults to current directory).\n\n### From Source\n\n```bash\nnpm install\nnpm run build\n```\n\n## Embedding Providers\n\nContext+ supports two embedding backends controlled by `CONTEXTPLUS_EMBED_PROVIDER`:\n\n| Provider | Value | Requires | Best For |\n|----------|-------|----------|----------|\n| **Ollama** (default) | `ollama` | Local Ollama server | Free, offline, private |\n| **OpenAI-compatible** | `openai` | API key | Gemini (free tier), OpenAI, Groq, vLLM |\n\n### Ollama (Default)\n\nNo extra configuration needed. Just run Ollama with an embedding model:\n\n```bash\nollama pull nomic-embed-text\nollama serve\n```\n\n### Google Gemini (Free Tier)\n\nFull Claude Code `.mcp.json` example:\n\n```json\n{\n  \"mcpServers\": {\n    \"contextplus\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"contextplus\"],\n      \"env\": {\n        \"CONTEXTPLUS_EMBED_PROVIDER\": \"openai\",\n        \"CONTEXTPLUS_OPENAI_API_KEY\": \"YOUR_GEMINI_API_KEY\",\n        \"CONTEXTPLUS_OPENAI_BASE_URL\": \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fopenai\",\n        \"CONTEXTPLUS_OPENAI_EMBED_MODEL\": \"text-embedding-004\"\n      }\n    }\n  }\n}\n```\n\nGet a free API key at [Google AI Studio](https:\u002F\u002Faistudio.google.com\u002Fapikey).\n\n### OpenAI\n\n```json\n{\n  \"mcpServers\": {\n    \"contextplus\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"contextplus\"],\n      \"env\": {\n        \"CONTEXTPLUS_EMBED_PROVIDER\": \"openai\",\n        \"OPENAI_API_KEY\": \"sk-...\",\n        \"OPENAI_EMBED_MODEL\": \"text-embedding-3-small\"\n      }\n    }\n  }\n}\n```\n\n### Other OpenAI-compatible APIs (Groq, vLLM, LiteLLM)\n\nAny endpoint implementing the [OpenAI Embeddings API](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fapi-reference\u002Fembeddings) works:\n\n```json\n{\n  \"mcpServers\": {\n    \"contextplus\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"contextplus\"],\n      \"env\": {\n        \"CONTEXTPLUS_EMBED_PROVIDER\": \"openai\",\n        \"CONTEXTPLUS_OPENAI_API_KEY\": \"YOUR_KEY\",\n        \"CONTEXTPLUS_OPENAI_BASE_URL\": \"https:\u002F\u002Fyour-proxy.example.com\u002Fv1\",\n        \"CONTEXTPLUS_OPENAI_EMBED_MODEL\": \"your-model-name\"\n      }\n    }\n  }\n}\n```\n\n> **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`).\n>\n> For VS Code, Cursor, or OpenCode, use the same `env` block inside your IDE's MCP config format (see [Config file locations](#setup) table above).\n\n## Architecture\n\nThree layers built with TypeScript over stdio using the Model Context Protocol SDK:\n\n**Core** (`src\u002Fcore\u002F`) - 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.\n\n**Tools** (`src\u002Ftools\u002F`) - 17 MCP tools exposing structural, semantic, operational, and memory graph capabilities.\n\n**Git** (`src\u002Fgit\u002F`) - Shadow restore point system for undo without touching git history.\n\n**Runtime Cache** (`.mcp_data\u002F`) - created on server startup; stores reusable file, identifier, and call-site embeddings to avoid repeated GPU\u002FCPU embedding work. A realtime tracker refreshes changed files\u002Ffunctions incrementally.\n\n## Config\n\n| Variable                                | Type                      | Default                                | Description                                                   |\n| --------------------------------------- | ------------------------- | -------------------------------------- | ------------------------------------------------------------- |\n| `CONTEXTPLUS_EMBED_PROVIDER`            | string                    | `ollama`                               | Embedding backend: `ollama` or `openai`                      |\n| `OLLAMA_EMBED_MODEL`                    | string                    | `nomic-embed-text`                     | Ollama embedding model                                        |\n| `OLLAMA_API_KEY`                        | string                    | -                                      | Ollama Cloud API key                                          |\n| `OLLAMA_CHAT_MODEL`                     | string                    | `llama3.2`                             | Ollama chat model for cluster labeling                        |\n| `CONTEXTPLUS_OPENAI_API_KEY`            | string                    | -                                      | API key for OpenAI-compatible provider (alias: `OPENAI_API_KEY`) |\n| `CONTEXTPLUS_OPENAI_BASE_URL`           | string                    | `https:\u002F\u002Fapi.openai.com\u002Fv1`            | OpenAI-compatible endpoint URL (alias: `OPENAI_BASE_URL`)    |\n| `CONTEXTPLUS_OPENAI_EMBED_MODEL`        | string                    | `text-embedding-3-small`               | OpenAI-compatible embedding model (alias: `OPENAI_EMBED_MODEL`) |\n| `CONTEXTPLUS_OPENAI_CHAT_MODEL`         | string                    | `gpt-4o-mini`                          | OpenAI-compatible chat model for labeling (alias: `OPENAI_CHAT_MODEL`) |\n| `CONTEXTPLUS_EMBED_BATCH_SIZE`          | string (parsed as number) | `8`                | Embedding batch size per GPU call, clamped to 5-10            |\n| `CONTEXTPLUS_EMBED_CHUNK_CHARS`         | string (parsed as number) | `2000`             | Per-chunk chars before merge, clamped to 256-8000             |\n| `CONTEXTPLUS_MAX_EMBED_FILE_SIZE`       | string (parsed as number) | `51200`            | Skip non-code text files larger than this many bytes          |\n| `CONTEXTPLUS_EMBED_NUM_GPU`             | string (parsed as number) | -                  | Optional Ollama embed runtime `num_gpu` override              |\n| `CONTEXTPLUS_EMBED_MAIN_GPU`            | string (parsed as number) | -                  | Optional Ollama embed runtime `main_gpu` override             |\n| `CONTEXTPLUS_EMBED_NUM_THREAD`          | string (parsed as number) | -                  | Optional Ollama embed runtime `num_thread` override           |\n| `CONTEXTPLUS_EMBED_NUM_BATCH`           | string (parsed as number) | -                  | Optional Ollama embed runtime `num_batch` override            |\n| `CONTEXTPLUS_EMBED_NUM_CTX`             | string (parsed as number) | -                  | Optional Ollama embed runtime `num_ctx` override              |\n| `CONTEXTPLUS_EMBED_LOW_VRAM`            | string (parsed as boolean)| -                  | Optional Ollama embed runtime `low_vram` override             |\n| `CONTEXTPLUS_EMBED_TRACKER`             | string (parsed as boolean)| `true`             | Enable realtime embedding refresh on file changes             |\n| `CONTEXTPLUS_EMBED_TRACKER_MAX_FILES`   | string (parsed as number) | `8`                | Max changed files processed per tracker tick, clamped to 5-10 |\n| `CONTEXTPLUS_EMBED_TRACKER_DEBOUNCE_MS` | string (parsed as number) | `700`              | Debounce window before tracker refresh                        |\n\n## Test\n\n```bash\nnpm test\nnpm run test:demo\nnpm run test:all\n```\n","Context+ 是一个面向高精度需求开发者的MCP服务器，旨在为大规模工程项目提供语义智能。它通过融合RAG、Tree-sitter AST、谱聚类及类似Obsidian的链接技术，将庞大的代码库转化为可搜索且层次分明的功能图谱，使得开发者能够更高效地理解和导航代码结构。项目支持多种工具，包括基于意义而非文本精确匹配的代码搜索、标识符级语义检索、以及通过谱聚类浏览代码库等功能，适用于需要深入分析与优化大型代码仓库的场景。此外，还提供了静态分析和代码操作工具来增强开发流程中的质量控制。",2,"2026-06-11 03:51:28","high_star"]