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 Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
コメント