pmgarg-cgraphyCAUTION
Code knowledge graph MCP server providing compact, token-budgeted context to AI coding agents.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://pypi.org/project/cgraphy/) [](https://pypi.org/project/cgraphy/) [](https://github.com/pmgarg/cgraphy/blob/master/LICENSE) [](https://doi.org/10.5281/zenodo.21422935)
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.
- Any language. Full-fidelity extraction (calls, imports, inheritance) for
Python, TypeScript/JavaScript, Java, Go, C, C++ and Rust; generic definition-level extraction for 20+ more via tree-sitter; config and docs files participate through summaries.
- Importance-ranked. PageRank over the code graph puts load-bearing
symbols first in every answer.
- Token-budgeted.
cgraphy_contextexpands the graph greedily around a
symbol and stops exactly at your token budget — cost scales with the question, not the repo.
- Git-aware.
--git-historymines commit history for files that change
together (logical coupling)
1c090dc647ebOBSERVED · 2026-10-13Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add cgraphy -- uvx cgraphy==0.1.2
Trust audit
CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (4 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (4)
.DS_Store
arxiv-submission.tar.gz
.DS_Store
Gates applied: no_behavioural_pass.
1c090dc647ebfull audit observations/trust-audit/mcp-server/pmgarg__cgraphy.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-13 | 1c090dc647eb | CAUTION | B | 89 | first audit |
Questions
What is the pmgarg-cgraphy MCP server?
Code knowledge graph MCP server providing compact, token-budgeted context to AI coding agents.
Is pmgarg-cgraphy safe to connect to an agent?
With care. The audit graded it B (89/100) and found 4 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does pmgarg-cgraphy need?
It reads ANTHROPIC_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does pmgarg-cgraphy run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as cgraphy.
How current is this page?
The grade is for one exact copy of the source (1c090dc647eb), read on 2026-10-13. The repository is watched and re-audited when it changes.