MCP Catalogs
首页

contextplus

by forloopcodes·1,896·综合分 56

Context+ 是一个 MCP 服务器,使用 RAG、AST 解析和语义链接将代码库转换为可搜索的特性图。

developer-toolsai-llmknowledge-graph
153
Forks
7
活跃 Issue
1 个月前
最近提交
2 天前
收录于

概述

Context+ 是一个专为处理大型代码库的开发者设计的复杂 MCP 服务器。它结合了多种先进技术,包括 RAG(检索增强生成)、Tree-sitter AST 解析、谱聚类和 Obsidian 风格链接,以创建可搜索的分层特性图。该服务器提供 17 个工具,涵盖发现、分析、代码操作、版本控制和内存/RAG 功能等多个类别。它支持多种嵌入提供商,包括 Ollama(默认)和 OpenAI 兼容 API,使其能够适应不同的部署环境和偏好。

试试问 AI

装完之后,这里有 6 个你可以让 AI 做的事:

:在复杂代码库中进行大规模代码导航和理解
:跨项目的语义代码搜索和标识符级检索
:代码分析,包括影响范围追踪和静态分析
:使用 Obsidian 风格特性图进行代码知识管理
:Context+ 支持哪些编程语言?
:我可以使用不同的嵌入模型吗?

什么时候选它

当处理需要深层语义理解、依赖分析和知识图谱功能的大型复杂代码库时,选择Context+。

什么时候不要选它

对于小型项目或需要轻量级简单代码导航而不需要嵌入模型和图存储开销的情况,避免使用Context+。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • get_context_tree

    Get structural AST tree of a project with file headers and symbol ranges.

  • get_file_skeleton

    Get function signatures, class methods, and type definitions without full bodies.

  • semantic_code_search

    Search code by meaning using embeddings over file headers/symbols.

  • semantic_identifier_search

    Retrieve functions/classes/variables with ranked call sites.

  • get_blast_radius

    Trace files and lines where a symbol is imported or used.

  • run_static_analysis

    Run linters to find unused variables, dead code, and type errors.

  • propose_commit

    Write code with validation and create restore points.

  • get_feature_hub

    Navigate Obsidian-style feature hubs with wikilinks.

  • search_memory_graph

    Semantic search with graph traversal for direct matches and neighbors.

  • upsert_memory_node

    Create or update memory nodes with auto-generated embeddings.

  • create_relation

    Create typed edges between memory nodes.

  • undo_change

    Restore files to state before specific AI changes.

可对比工具

semgrep-mcpsourcegraph-mcptree-sitter-mcp

安装

安装

快速开始(npx / bunx)

无需安装。将 Context+ 添加到您的 IDE MCP 配置中。

对于 Claude Code、Cursor 和 Windsurf,使用 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"
      }
    }
  }
}

对于 VS Code(.vscode/mcp.json),使用 serversinputs

{
  "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": []
}

FAQ

Context+ 支持哪些编程语言?
Context+ 通过 Tree-sitter 支持 43 种扩展,包括 TypeScript、Python、Rust、Go 等多种语言。
我可以使用不同的嵌入模型吗?
是的,Context+ 支持 Ollama(默认)和 OpenAI 兼容 API,包括 Gemini、OpenAI、Groq 和 vLLM。

contextplus 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。