Graph Context
@yuqiaohan95
关于 Graph Context
MCP server for intelligent code context — 87%+ token savings, zero resource overhead.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"graph-context": {
"command": "python",
"args": [
"-m",
"tests.experiment"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Graph Context?
Graph Context is an MCP server that retrieves precise code context using AST call graphs and BM25 ranking, designed for AI coding assistants. It runs pure Python with no GPU or external services, delivering token savings of 87%+ for single-agent and multi-agent workflows.
How to use Graph Context?
Install with pip install graph-context (or graph-context[full] for Chinese tokenization and file watching). Run as an MCP server with the command graph-context, optionally setting environment variables like PROJECT_ROOT, MCP_MAX_TOKENS, and MCP_TOP_K. Integrate with Claude Desktop, Cursor, or Cline via a JSON configuration pointing to the command. Programmatic usage is also available via the VibeCodingEngine class.
Key features of Graph Context
- AST call graph for precise cross‑file dependency resolution
- BM25 ranking with self‑evolving rules engine
- Dynamic tool loading — only 2 tools at startup (~270 tokens)
- MVCC snapshots for read‑write isolation in multi‑agent setups
- Zero external dependencies: pure CPU, no GPU, no network calls
- Built‑in Chinese‑English synonym mapping for cross‑language queries
Use cases of Graph Context
- Single‑agent coding sessions: stable ~2,000 tokens per turn, no forgetting
- Multi‑agent collaboration: shared index with independent snapshot reads
- Reducing LLM API costs by cutting token consumption 76–90%
- On‑demand code retrieval for large projects without dumping the whole codebase
FAQ from Graph Context
How does Graph Context compare to vector‑database approaches?
Graph Context requires no vector DB deployment, no GPU for embeddings, no external API calls, and no large memory footprint. It uses lightweight BM25 inverted indices and AST‑level exact matching instead of semantic similarity.
What are the runtime requirements?
Pure Python — no GPU, no external services. The full install adds Chinese tokenization and file‑watching dependencies. Index persistence and rules are stored as local JSON files (configurable paths).
Where does my code and data live?
All data stays local on your machine. Index persistence is optional; by default the index is built in memory. Rules and scopes are saved to JSON files on disk (paths controlled by MCP_RULES_PATH and MCP_SCOPES_PATH).
What transport or authentication does Graph Context use?
It runs as a local MCP server over stdio transport, started via the graph-context command. No authentication is required because it operates entirely on the local machine.
Are there any known limits or accuracy trade‑offs?
Benchmarks show 100% recall on small projects and up to 97% recall on large projects when using the self‑evolving rules engine. Token savings range from 76% to 91% depending on project size and whether rules are applied.
其他 分类下的更多 MCP 服务器
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
Nginx UI
0xJackyYet another WebUI for Nginx
评论