Context7
Up-to-date docs for AI agents
Beschreibung vom Entwickler (englisches Original)
Code knowledge graph over MCP: token-budgeted context for AI coding agents.
Diese drei werden nie zu einer Punktzahl zusammengefasst: Meinungen, Messungen und Beliebtheit sind verschiedene Dinge.
Für diesen Server haben wir noch keine Zusammenfassung in einfacher Sprache geschrieben. Unten stehen die Fakten, die wir aus der Registry gelesen haben.
Wähle die KI-App, die du nutzt, und kopiere die Einstellungen.
Du brauchst
Welche App nutzt du?
Wähle oben deine App. Wir merken sie uns, damit der Button beim nächsten Mal „In … installieren“ anzeigt.
Öffne Claude Desktop → Settings → Developer → Edit Config und füge dies in claude_desktop_config.json ein
{
"mcpServers": {
"cgraphy": {
"command": "uvx",
"args": [
"cgraphy"
]
}
}
}Führe das in deinem Terminal aus
claude mcp add cgraphy -- uvx cgraphyIn .cursor/mcp.json in deinem Projekt oder in ~/.cursor/mcp.json einfügen
{
"mcpServers": {
"cgraphy": {
"command": "uvx",
"args": [
"cgraphy"
]
}
}
}Dein Browser fragt, ob er die App öffnen darf, dann zeigt die App die Einstellungen und bittet dich um Bestätigung. Schlüsselwerte bleiben leer, damit du sie selbst einträgst.
In .vscode/mcp.json in deinem Projekt einfügen
{
"servers": {
"cgraphy": {
"type": "stdio",
"command": "uvx",
"args": [
"cgraphy"
]
}
}
}Dein Browser fragt, ob er die App öffnen darf, dann zeigt die App die Einstellungen und bittet dich um Bestätigung. Schlüsselwerte bleiben leer, damit du sie selbst einträgst.
Dieser Server läuft auf deinem Computer, und ChatGPT kann sich nur mit Servern im Internet verbinden. Wähle eine andere App.
Deine Auswahl bleibt in einem Cookie auf diesem Gerät; kein Konto nötig.
Diese Einstellungen werden aus dem Registry-Eintrag des Entwicklers erzeugt. Wenn in der README etwas anderes steht, folge der README.
Läuft auf deinem Computer; die Tool-Liste erscheint nach der Installation in deiner KI-App.
Wir prüfen Informationen, die jeder sehen kann; den Code haben wir nicht gelesen. Checks, die nicht zutreffen, werden nicht mitgezählt. · Geprüft am 6. Nov. 2026
Der Registry-Name wurde mit dem GitHub-Konto pmgarg bestätigt, dem das Repo gehört
Dieses Repo haben wir noch nicht von GitHub gelesen
Dieses Repo haben wir noch nicht von GitHub gelesen
Dieser Server läuft auf deinem Computer; es gibt keinen Endpunkt im Internet
Läuft auf deinem Computer und nutzt stattdessen lokale Einstellungen
Läuft auf deinem Computer; Tool-Listen können wir nur von Endpunkten im Internet lesen
Verglichen mit allen aktiven Servern dieser Kategorie in der Registry. Sterne zählen nur, wenn dem Herausgeber das Repo gehört.
Er hat 1 von 1 zutreffenden Basischecks bestanden. Den Code haben wir nicht gelesen. Bevor du einen Schlüssel oder Token hinzufügst, sieh nach, welche Zugriffe der Server verlangt, und nutze einen Schlüssel, der nur die Berechtigungen hat, die du brauchst.
Die Registry nennt keinen erforderlichen Schlüssel, manche Server bitten dich aber bei der ersten Nutzung, dich anzumelden.
Er läuft auf deinem Computer. Deine KI-App startet ihn bei Bedarf, und die Daten laufen nicht über die Server des Entwicklers (außer der Server ruft selbst einen Onlinedienst auf).
Das GitHub-Repo wurde zuletzt – geändert, und die neueste Version (0.1.1) kam vor 4 Monaten in die Registry.
Apps, die MCP unterstützen, etwa Claude Desktop, Claude Code, Cursor und VS Code. Außerdem brauchst du Python (uv) auf deinem Computer.
In derselben Kategorie: Context7, Codebase Memory, Exa
Server derselben Kategorie von anderen Entwicklern, sortiert nach Sternen.
So liest du eine Karte:★ GitHub-SterneiDrei Säulen: Bewertungen · Checks · NutzungiAktualisiert = neueste Version in der Registry veröffentlichti
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
Unverändert aus dem Repo des Entwicklers übernommen. PopNx MCP hat den Inhalt weder geprüft noch empfiehlt es ihn. HTML, Bilder und Skripte wurden entfernt. Links führen von dieser Website weg.
Paper (DOI): https://doi.org/10.5281/zenodo.21422935 PyPI: https://pypi.org/project/cgraphy/ GitHub: https://github.com/pmgarg/cgraphy
cgraphy is a Python code knowledge graph and Model Context Protocol (MCP) server for AI coding agents such as Claude Code, Codex CLI, Cursor, and Gemini CLI.
cgraphy indexes any codebase into a knowledge graph — functions, classes and files as nodes; calls, imports, inheritance and git co-change history as edges — and serves compact, token-budgeted slices of it to AI assistants through the Model Context Protocol. Instead of re-reading dozens of files to orient itself on every prompt, an agent asks the graph and gets the relevant subgraph in a couple of thousand tokens.
cgraphy_context expands the graph greedily around a symbol and stops exactly at your token budget — cost scales with the question, not the repo.--git-history mines commit history for files that change together (logical coupling), an edge type static analysis can't see..cgraphy/. No services, no daemons, no vector database.pip install cgraphy # or: uv tool install cgraphy
cd your-repo
cgraphy init # one command: MCP config + agent steering + index
cgraphy init does three things:
.mcp.json — picked up automatically by Claude Code in all its forms: CLI, VSCode extension, and the desktop app.CLAUDE.md and AGENTS.md telling agents to consult the graph (cgraphy_overview → cgraphy_search → cgraphy_context) *before* reading files — this is what makes the graph actually replace bulk file reading. (Agents can't be forced, only steered: instruction files + persuasive tool descriptions + the tools being genuinely faster is the mechanism, and it works.)Or register the MCP server manually with your assistant:
Claude Code
claude mcp add cgraphy -- uvx cgraphy serve /path/to/repo
Codex CLI (~/.codex/config.toml)
[mcp_servers.cgraphy]
command = "uvx" args = ["cgraphy", "serve", "/path/to/repo"]
Gemini CLI (~/.gemini/settings.json) / Cursor (.cursor/mcp.json)
{"mcpServers": {"cgraphy": {"command": "uvx",
"args": ["cgraphy", "serve", "/path/to/repo"]}}}
Reading / orientation:
| Tool | Returns | The agent uses it… |
|---|---|---|
cgraphy_overview | Repo map: subsystems, key symbols by importance, all files | first, instead of reading files to orient |
cgraphy_search | Ranked matches with file:line and summaries (hybrid lexical+semantic when the [semantic] extra is installed) | before grep / directory listing |
cgraphy_context | Subgraph around a symbol (callers, callees, imports, co-changes) within a token budget | instead of reading whole files |
cgraphy_read | Just one symbol's source, line-numbered, budgeted | instead of reading the whole file |
Editing / reviewing — the tools that make the graph part of the change loop:
| Tool | Returns | The agent uses it… |
|---|---|---|
cgraphy_impact | Blast radius: direct + transitive dependents, affected tests, historically co-changed files | before modifying shared code |
cgraphy_diff_context | The working git diff mapped to touched symbols, their users, and covering tests | before committing / when resuming work |
Enrichment:
| Tool | Returns | The agent uses it… |
|---|---|---|
cgraphy_enrich | Batch of symbols that still need one-line summaries | when asked to "enrich the graph" |
cgraphy_store_summaries | Confirmation + remaining count | to save the summaries it wrote |
Retrieval is usage-aware: symbols an agent repeatedly asks about get a small, capped boost in future context expansion (telemetry stays in the local SQLite file; nothing leaves your machine).
pip install "cgraphy[semantic]"
Adds tiny static embeddings (model2vec, CPU-only, no torch) fused with FTS5 by reciprocal-rank fusion — closes the vocabulary gap between issue-style prose ("login broken") and code identifiers (validate_jwt).
The graph self-heals: tools detect stale files and re-index incrementally (changed files only) before answering.
Structure is extracted automatically; *meaning* comes from summaries. Tell your agent once:
enrich the cgraphy graph
It will loop cgraphy_enrich → cgraphy_store_summaries until every symbol has a one-line semantic summary. Summaries are keyed to a hash of each symbol's source, so editing one function invalidates only that summary.
For CI, cgraphy index --summarize pre-bakes summaries with your own Anthropic API key (pip install cgraphy[summarize], ANTHROPIC_API_KEY set).
cgraphy view . # http://localhost:8787
A dependency-free local page (bundled Cytoscape.js): search, color by kind, click for details, double-click to expand neighbors; co-change edges shown dashed.
python scripts/benchmark.py /path/to/repo "your question"
Prints the tokens an agent spends orienting via cgraphy (overview + search + context) versus reading every code file, and the reduction factor.
python scripts/eval_localization.py /path/to/repo 50
Mines fix-like commits from the repo's history (subject = query, touched files = ground truth, co-change mining excludes evaluated commits), then scores an ablation ladder — FTS-only, +PageRank, +graph expansion, ±co-change edges — on hit@5/hit@10/MRR and token cost. No LLM calls, no human grading, fully reproducible. Results and a paper draft live in paper/.
cgraphy index walks the repo (respecting .gitignore + .cgraphyignore), parses each file with tree-sitter, and stores nodes and edges in .cgraphy/graph.db (SQLite + FTS5). Re-indexing is incremental by content hash.cgraphy serve exposes the five MCP tools over stdio.--git-history adds weighted co-change edges mined from git log.Design details: docs/superpowers/specs/2026-07-08-cgraphy-design.md
If you use cgraphy in research or tooling, please cite the paper:
@misc{garg2026cgraphy,
author = {Garg, Prateek Mohan}, title = {Which Graph Signals Pay for Their Tokens? cgraphy: A Token-Budgeted Code Knowledge Graph as a Portable Context Layer for AI Coding Agents}, year = {2026}, doi = {10.5281/zenodo.21422935}, url = {https://doi.org/10.5281/zenodo.21422935}, note = {Preprint} }
MIT
mcp-name: io.github.pmgarg/cgraphy