FC

forloopcodes/contextplus

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1986 stars 169 forks 质量 83 趋势 29MIT

面向大规模工程的语义智能。Context+ 是一款为要求 99% 准确率的开发者设计的 MCP 服务器。

概览

《大规模工程的语义智能》。 Context+ 是一款为要求 99% 准确率的开发者设计的 MCP 服务器。通过结合 RAG、树状 AST、光谱聚类和 Obsidian 风格链接,Context+ 将庞大的代码库转变为可搜索的层级特征图。 https://github.com/user-attachments/assets/a97a451f-c9b4-468d-b036-15b65fc13e79 PMLL-Memory-MCP(NPX PMLL-Memory-MCP)是@drQedwards开发的独立MCP服务器,采用了Context+的长期记忆图,并在顶部增加了短期KV上下文存储、Q承诺去重和解引擎。详情请参见drQedwards/PPM。 无需安装。将Context+添加到你的IDE MCP配置中。 对于 Claude 代码、光标和风帆冲浪,请使用 mcpServers: 对于 VS Code(.vscode/mcp.json),请使用服务器和输入: - “command”:“npx” - “args”: [“-y”, “contextplus”]

概述(AI 翻译)

《大规模工程的语义智能》。

Context+ 是一款为要求 99% 准确率的开发者设计的 MCP 服务器。通过结合 RAG、树状 AST、光谱聚类和 Obsidian 风格链接,Context+ 将庞大的代码库转变为可搜索的层级特征图。

https://github.com/user-attachments/assets/a97a451f-c9b4-468d-b036-15b65fc13e79

工具

发现

工具 描述
get_context_tree 项目的结构AST树,包含文件头和符号范围(函数/类/方法的行号)。动态剪枝自动输出。
get_file_skeleton 函数签名、类方法和带有行范围的类型定义,无需读取全体。显示API表面。
semantic_code_search 按意义搜索,而非完全文本。在文件头/符号上嵌入,返回匹配的符号定义行。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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

Tools

Discovery

Tool Description
get_context_tree Structural AST tree of a project with file headers and symbol ranges (line numbers for functions/classes/methods). Dynamic pruning shrinks output automatically.
get_file_skeleton Function signatures, class methods, and type definitions with line ranges, without reading full bodies. Shows the API surface.
semantic_code_search Search by meaning, not exact text. Uses embeddings over file headers/symbols and returns matched symbol definition lines.
semantic_identifier_search Identifier-level semantic retrieval for functions/classes/variables with ranked call sites and line numbers.
semantic_navigate Browse codebase by meaning using spectral clustering. Groups semantically related files into labeled clusters.

Analysis

Tool Description
get_blast_radius Trace every file and line where a symbol is imported or used. Prevents orphaned references.
run_static_analysis Run native linters and compilers to find unused variables, dead code, and type errors. Supports TypeScript, Python, Rust, Go.

Code Ops

Tool Description
propose_commit The only way to write code. Validates against strict rules before saving. Creates a shadow restore point before writing.
在 GitHub 查看完整 README

安装

npx -y contextplus
新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }