CGIS Code Graph
PYPI · CODEGRAPH-BRAIN · SCANNED SEP 20
Code graph for AI agents: impact analysis and call tracing for Python and TypeScript.
Available components
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →
Supply Chain Security100
- No malware found by supply-chain analysis.Pass
- No known CVEs affecting this package version or its production dependencies.Pass
- Runs hatchling.build at install time, a recognised native-build step with no shell scripting around it. View diagnostics → Pass
- 4 of 45 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency32
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Provenance check failed: no build-provenance attestation is published. See how to fix → View diagnostics → Fail
- License check failed: no license is declared. See how to fix → Fail
- Actively maintained (last published 1 days ago).Pass
- Disclosure check failed: no security disclosure policy was found in the source repository. See how to fix → Fail
Schema Quality & AI Usability63
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 5493 tokens (~366/item across 15 items; 15 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management10
- Stability observed for 3 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage100
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 100% of tool parameters carry a description.Pass
- Structured output schemas are declared (100% of tools); any adoption earns full credit.Pass
Tool Safety100
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- We read all 15 captured tool definition(s), and no name or description among them implies an irreversible operation.Pass
- An AI judge read all 15 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
- Implements a current MCP spec version (2026-07-28).Pass
How do I install the CGIS Code Graph MCP server?
CGIS Code Graph runs locally as a PyPI package, launched with uvx codegraph-brain. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.
pypi · codegraph-brain
claude mcp add zaebee-codegraph-brain -- uvx codegraph-brain
{
"mcpServers": {
"zaebee-codegraph-brain": {
"command": "uvx",
"args": [
"codegraph-brain"
]
}
}
} {
"servers": {
"zaebee-codegraph-brain": {
"command": "uvx",
"args": [
"codegraph-brain"
]
}
}
} codex mcp add zaebee-codegraph-brain -- uvx codegraph-brain
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"zaebee-codegraph-brain": {
"type": "local",
"command": [
"uvx",
"codegraph-brain"
],
"enabled": true
}
}
} openclaw mcp add zaebee-codegraph-brain --command uvx --arg codegraph-brain
mcp_servers:
zaebee-codegraph-brain:
command: "uvx"
args: ["codegraph-brain"] {
"McpServers": {
"zaebee-codegraph-brain": {
"Transport": "stdio",
"Command": "uvx",
"Arguments": [
"codegraph-brain"
]
}
}
} assistant mcp add zaebee-codegraph-brain -t stdio -c uvx -a codegraph-brain
{
"mcpServers": {
"zaebee-codegraph-brain": {
"command": "uvx",
"args": [
"codegraph-brain"
]
}
}
} Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 19 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 3 to 7. That category is still filling its 30-day observation window: 1 days of observed history at the previous scan, 2 at this one. The score rises as the window fills, whether or not the server changes.
- 18 Sept 26 0
- Tool safety: pass → unverified ▼ security
- Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet. security
- Capabilities: pass → unverified ▼ functional
- Tool coverage: 100 → unverified ▼ functional
- Stability: unverified → 0.03 ▲ functional
- First check of Schema quality: unverified functional
- Package version: 0.25.0 → 0.25.3 functional
- Package version: 0.25.0 → 0.25.2 functional
- Package version: 0.25.0 → 0.25.1 functional
- 17 Sept 26 66
First indexed and scored.
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 20 Sept 2026 · Analysed pypi/codegraph-brain@0.25.3
Provenance No attestation
The registry publishes no build provenance for this version, so there is nothing to verify.
| Result | No attestation |
|---|---|
| Ecosystem | pypi |
Background: How many MCP packages publish verified provenance →
Install scripts 1 script
| Hook | Tier | Command |
|---|---|---|
| build_backend | allowlisted | hatchling.build |
Background: Why install scripts are a supply-chain risk →
Dependencies 45 packages
| Packages resolved | 45 |
|---|---|
| Stale | 3 |
| No linked repository | 1 |
| Tree resolution | Complete |
Background: SBOMs and build attestations, explained →
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →
cgis_analyze_impact ~563
Upstream subgraph of one FQN: everything that reaches it within ``depth`` hops. Follows every edge except containment — in practice callers, importers, subclasses, type references and DI dependents — within internal code, so this answers "what breaks if I change X?". The enclosing class or file and stdlib/third-party nodes are left out unless ``include_structure`` / ``include_external`` ask for them — the same view as the CLI's ``impact``. For what X depends on use ``cgis_trace_flow``; for only the members of a module or class, ``cgis_get_structure``; for a source-included brief to read before editing one symbol, ``cgis_context``. ``output_format="mermaid"`` (default) returns a diagram; ``"json"`` returns a joinable ``{root, nodes, edges, coverage}`` payload with real FQNs — letting an agent compute set differences (e.g. "which route handlers never reach ``verify_ownership``?") directly. ``coverage`` counts unresolved calls whose name matches a traversed function, method or class: callers that may be missing, named in ``top_unresolved``. It is an upper bound — a common name matches calls on unrelated objects, which the names make visible.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| depth | integer | – | Maximum edge hops upstream, over callers, importers, subclasses, type references and DI dependents (plus the enclosing class or file with include_structure). |
| fqn | string | yes | Fully qualified name, e.g. pkg.module.Class.method. A unique dot-boundary suffix also resolves; an ambiguous one returns candidates. Use cgis_find_symbol to look a name up. |
| include_external | boolean | – | Also return stdlib, third-party and unresolved call targets — calls on values whose type is decided at runtime. Off by default, as in the CLI, because they dominate the payload; in json, coverage/top… |
| include_structure | boolean | – | Also follow containment (CONTAINS/DECLARES): a module's or class's own members, and the class or file enclosing a symbol. Off by default, as in the CLI; cgis_get_structure is the tool for members alo… |
| output_format | string | – | "mermaid" for a diagram, or "json" for a payload with real FQNs (case-insensitive). Any other value returns an error. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_audit_reachability ~397
Reachability/authorization audit — which sources never reach a checkpoint. The headline use is **IDOR/authz coverage**: list every route handler that does NOT transitively reach an ownership check. Reachability follows behavioral edges (CALLS *and* FastAPI ``Depends()`` DEPENDS_ON), so a guard wired via DI counts. Select sources with ``from_type`` (a NodeType like ``ROUTE_HANDLER`` / ``API_ENDPOINT`` / ``FUNCTION``) and/or ``from_prefix`` (FQN prefix) — at least one is required. Returns JSON ``{target, covered, gaps}`` where each gap carries ``fqn``/``file``/``line``. Generalizes to validators, event tracking, or service-layer-boundary rules by pointing ``target`` at the required node. A selection that matches no source returns a ❌ message, not an empty ``{covered: [], gaps: []}`` that would read as a passing audit (#467).
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| depth | integer | – | Maximum reachability depth; a longer path is reported as a gap. |
| from_prefix | – | – | Only audit sources at or under this FQN prefix, matched on whole dot-segments. A selection matching no source is an error naming the whole-segment prefixes it may have meant. Combined with from_type… |
| from_type | – | – | NodeType of the sources to audit, e.g. ROUTE_HANDLER, API_ENDPOINT or FUNCTION (any case). Give this, from_prefix, or both. |
| target | string | yes | FQN of the checkpoint every source must reach, e.g. an ownership check. A unique dot-boundary suffix also resolves. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_context ~449
Prompt-ready brief on one FQN: its source, class, direct callers and callees. Call this before editing a symbol, instead of reading its files. It follows calls only, one hop by default. Source is included when the file is found (see ``source_root``), and the domain when the graph was tagged with one. For a multi-hop subgraph over calls, imports, inheritance and references without source, use ``cgis_trace_flow`` (downstream) or ``cgis_analyze_impact`` (upstream). Returns an XML-tagged prompt — the focal node's source, its enclosing class, its architectural domain boundary, direct callers (upstream ripple) and callees (downstream dependencies) — meant to be injected into your context window in place of raw file dumps. Far more token-efficient than reading whole files, and structured so boundaries stay unambiguous. Use ``cgis_ingest`` first if the database does not exist. ``source_root`` locates source files on disk when the graph was ingested from a sub-directory (e.g. ``"src"`` after ``cgis ingest ./src``); it is safe to pass even when the stored paths already start with that segment (#228). When no candidate exists the ``<source>`` block degrades gracefully to "unavailable".
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| depth | integer | – | Call hops around the focal node; 1 means direct callers and callees. |
| fqn | string | yes | Fully qualified name, e.g. pkg.module.Class.method. A unique dot-boundary suffix also resolves; an ambiguous one returns candidates. Use cgis_find_symbol to look a name up. |
| source_root | string | – | Directory the graph's stored file paths are relative to — normally the project_path given to cgis_ingest; prefer an absolute path. Empty means the server's working directory, so source shows as unava… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_drift ~392
Report per-domain architectural drift against declared ideal patterns. Returns JSON: ``any_critical`` verdict, per-domain reports (each carrying a ``fit`` block — nearest alphabet template + residual + good/weak/none band), the observe-only quotient layer, and ``coverage`` (graph prefixes bound by no domain). Call after ``cgis_ingest`` to learn whether your edits pushed a domain past its drift tolerance. ``max_drift`` is now the default tolerance only for domains that omit ``drift_tolerance`` — it no longer caps domains that declare their own (see #170). ``profile``: when set, score only domains with this profile (plus profile-less ones). Use when your patterns.yaml mixes languages but the graph holds one language — avoids false EMPTY reports for other-language domains that would otherwise fail the gate. ``max_residual``: a domain whose nearest template is farther than this gets ``fit.band = "none"`` ("no template fits") — a grab-bag module or an alphabet gap, independent of drift tolerance (#177).
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| max_drift | number | – | Drift tolerance for domains that declare no drift_tolerance of their own. |
| max_residual | number | – | Distance to the nearest template beyond which a domain's fit band is "none" (no template fits). |
| patterns_path | string | – | patterns.yaml (.yaml or .yml) declaring each domain's expected pattern and tolerance, relative to the server's working directory. cgis_init_ontology proposes one. |
| profile | – | – | Score only domains with this profile, plus profile-less ones — e.g. one language when patterns.yaml mixes several. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_find_orphans ~625
Classes nothing in production builds, extends or names — dead-code candidates. Finds classes that no test, type checker or linter flags, because each is still imported somewhere: a package re-export keeps a class importable long after its last real caller is gone. On one mid-sized backend this reported 43 of 1 789 classes, and the hand-written equivalent's findings were all real and all deleted. Two filters decide the answer. **Tests are not users** — a class built only by its own test is exactly the shape being hunted. **A re-export is not a use** — ``IMPORTS_SYMBOL`` does not count, or nothing is ever reported. What counts is construction (``CALLS``), inheritance (``EXTENDS``) and being named (``REFERENCES`` — an annotation, or a class handed to a framework); the last keeps abstract ports and Protocols off the list. ``prefix`` narrows to one package on a dot boundary. ``include_tests`` counts test code as a user, turning the report into "unreachable from anywhere". Machine-generated classes are **hidden by default**, and ``include_generated`` puts them back. The query is right about them — nothing constructs a betterproto stub — but nobody hand-deletes one either, so they are noise rather than a finding. Measured on owner-api at b7d02fe6, five of six reported orphans were generated entities and the sixth a nested pydantic ``Config``: the unfiltered report had no actionable row in it (#432). Returns JSON ``{orphans, considered, test_sources, generated_excluded}``; each orphan carries ``fqn``/``file``/``line``. **A listing is a candidate for deletion, not a proof** — a class named only inside a decorator (#429) or arriving through a star import is invisible here, so the sweep errs towards reporting a live class rather than hiding a dead one. ``test_sources: 0`` in a repository that has tests means the graph predates the ``is_test`` column: re-ingest. ``generated_excluded`` counts every generated class left out of the population under the same ``prefix``, refer…
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| include_generated | boolean | – | Include machine-generated classes, which are hidden by default. |
| include_tests | boolean | – | Count test code as a user, so the report means "unreachable from anywhere". |
| prefix | – | – | Only consider classes under this FQN prefix, cut on a dot boundary. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_find_symbol ~303
Resolve a partial symbol name to candidate FQNs (substring match, ranked). Call this BEFORE ``cgis_trace_flow`` / ``cgis_analyze_impact`` / ``cgis_get_structure`` when you know a short name (e.g. ``get_reservation_prices``) but not its full FQN — it removes the read-the-file-first guesswork. Returns JSON ``[{fqn, name, type, file, line}]`` ranked exact > prefix > substring. ``kind`` filters by node type (FUNCTION / METHOD / CLASS / …); ``fqn_prefix`` scopes the search.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| fqn_prefix | – | – | Only return symbols at or under this FQN prefix, matched on whole dot-segments: app.svc does not match app.svc_alt, and a partial segment matches nothing. |
| kind | – | – | Only return this node type, e.g. FUNCTION, METHOD or CLASS (any case). An unknown type matches nothing rather than raising an error. |
| limit | integer | – | Maximum number of candidates to return. |
| query | string | yes | Leaf symbol name to search for, without dots (e.g. get_flow_result) — not an FQN. Case-insensitive substring match, ranked exact > prefix > substring. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_fractal ~280
Report the motif census across the repository's structural tiers. Coarsens the graph along its own structure — symbol, class, module, then directory levels trimmed from the leaf end — and measures the 13-triad census at every rung. Returns JSON: one entry per layer (IMPORTS, CALLS) with the full per-rung curve (groups, triads, entropy in bits, dominant motif, tangle ratio) and the fit. ``verdict`` is the sign of ``slope`` (entropy bits per halving of the group count) outside a ``2 * std_error`` dead-band: ``hierarchical`` means coarsening ADDS motif diversity, ``flat`` means it destroys it, ``scale_invariant`` means the mix is the same at every scale, and ``no_signal`` means fewer than three rungs carried enough triads to fit. Read the curve, not just the verdict — the fit is a lossy summary of a non-linear curve. Observe-only: this tool enforces nothing and no gate reads it. Call after ``cgis_ingest``.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_get_structure ~317
Members of a module or class — or, for a package prefix, the modules it holds. Follows containment (CONTAINS/DECLARES) only, so no call or import appears. A package is not a node in the graph (#487), so its row and the edges to its modules are synthesized for the answer and marked with a virtual file path. For how the code connects use ``cgis_trace_flow`` (what it depends on) or ``cgis_analyze_impact`` (what depends on it). Matches the CLI ``structure`` command. ``output_format="mermaid"`` (default) returns a diagram of the hierarchy rooted at the given FQN; ``"json"`` returns the joinable ``{root, nodes, edges}`` payload with real FQNs.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| depth | integer | – | Maximum containment levels to descend (module → class → method). |
| fqn | string | yes | Fully qualified name, e.g. pkg.module.Class.method. A unique dot-boundary suffix also resolves; an ambiguous one returns candidates. Use cgis_find_symbol to look a name up. |
| output_format | string | – | "mermaid" for a diagram, or "json" for a payload with real FQNs (case-insensitive). Any other value returns an error. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_ingest ~347
Scan a local directory, extract all symbols, resolve links, and build the graph DB. Use this to initialise or refresh the code knowledge graph for a project. Node FQNs are normalised relative to the workspace root so the graph is portable across machines. ``db_path`` must name a database — it has to end in ``.db``, ``.sqlite`` or ``.sqlite3``, live in a directory that already exists, and not point at an existing file that is not a SQLite database. cgis will not create parent directories. By default the ingest is **incremental**: only changed/new files are re-scanned, and the summary reports both what changed this run and the whole-graph total. When a change alters what other files resolve against — a renamed, removed or added symbol, a deleted or new file, a changed base class or re-export — the incremental run rebuilds the whole graph itself, so edges in unchanged files never point at symbols that no longer exist. Set ``full_rebuild=True`` to force a re-scan of every file from scratch.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | Where to write the graph: must end in .db, .sqlite or .sqlite3, in a directory that already exists, and must not be an existing non-SQLite file. A relative path resolves against the server's working… |
| full_rebuild | boolean | – | Re-scan every file from scratch instead of the incremental default. |
| project_path | string | yes | Root directory of the project to scan. A relative path resolves against the MCP server's working directory. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_init_ontology ~195
Propose a starter patterns.yaml from the measured graph (read-only). Returns the YAML text — save it yourself (e.g. to patterns.yaml), review the proposed labels, then run ``cgis_drift`` with it. Tolerances are the measured scores plus ``margin``: a baseline to ratchet down, not a verdict. No files are written; the caller decides where to persist the output.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| depth | – | – | Fixed FQN segment depth for domain discovery (positive); omit to pick it automatically. |
| margin | number | – | Headroom added to each measured score to form the proposed tolerance. |
| min_nodes | integer | – | Domains with fewer nodes stay hygiene-only instead of getting a label. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_metrics ~426
Whole-graph architectural metrics — coupling bottlenecks, God classes, PageRank. Returns JSON ``{bottlenecks, god_classes, critical}`` computed with vectorized DuckDB aggregations over the whole graph (fan-in/fan-out coupling, declared-member counts, PageRank) — the global "what are the hotspots?" view that complements the node-local trace/impact/context tools. Requires the optional ``duckdb`` extra; an unavailable dependency is reported as a normal ❌ message. ``exclude`` drops any node whose FQN contains one of the given dot-segments (e.g. ``["tests"]`` removes both ``tests.*`` and ``domains.*.tests.*``) so test/vendor scaffolding stays out of the rankings. ``scope`` is its complement: it keeps only nodes under one of the given dot-prefixes, anchored and cut on a dot boundary, so ``["domains.reservation"]`` is that subtree and not ``domains.reservation_archive``. Use it for a per-domain review. The two compose, and they differ where it matters for PageRank — ``exclude`` removes nodes from the propagation graph, ``scope`` filters the rows and lets rank propagate over the whole graph, so a scoped run reports how central the subtree is *globally*. Coupling in-degree likewise keeps counting callers from outside the scope, which is the ripple a domain review is after (#239).
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| exclude | – | – | Drop nodes whose FQN contains any of these dot-segments, e.g. ["tests"]; they are removed from PageRank propagation too. |
| limit | integer | – | Top-N rows returned per section. |
| scope | – | – | Keep only nodes under any of these dot-prefixes, e.g. ["domains.billing"]; rank still propagates over the whole graph. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_overview ~245
Where to start in a graph you know nothing about: sizes and a package map. Call this first in an unfamiliar repository — every other tool needs a name, and this is the one that hands you some. Returns JSON: symbol counts by type, file and edge totals, the unresolved-edge ratio, and the largest packages with production and tests listed separately. Each ``prefix`` goes straight into ``cgis_get_structure`` (the modules it holds), ``cgis_find_symbol`` (``fqn_prefix``) or ``cgis_metrics`` (``scope``). Listings are capped; ``packages_omitted`` appears when rows were cut. Entry points are deliberately not reported — "nothing calls it" is not one on a framework codebase, where most handlers have no incoming call edge.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| depth | integer | – | FQN segments per package prefix; 1 is the top level. |
| limit | integer | – | Maximum packages listed per section. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_suggest_packages ~278
Suggest sub-package boundaries for a package from its dependency communities. Returns JSON: modularity_q, divergence, direction (under/over/matched), verdict (split/consolidate/aligned/leave/borderline/no_signal), the detected communities (id + member files), the cross-community bridge edges (cost of splitting), and the thresholds used. Default layer is IMPORTS; set ``with_calls`` for the combined import+call graph. Run ``cgis_ingest`` first. A mis-rooted graph (import targets resolve to no internal file) returns ``no_signal`` with a diagnostic note rather than a silent clean verdict.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| min_q | number | – | Modularity threshold: at or above it, a package whose layout disagrees with its communities is flagged split (or consolidate, if over-split). |
| prefix | – | – | FQN prefix of the package to analyse, e.g. cgis.query, matched on whole dot-segments. Needed in practice: without it the verdict is no_signal. |
| with_calls | boolean | – | Use the combined import + call graph instead of imports only. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_trace_flow ~568
Downstream subgraph of one FQN: everything it reaches within ``depth`` hops. Follows every edge except containment — in practice calls, imports, inheritance, DI dependencies and references — between internal code, so this answers "what does X depend on?". Containment and stdlib/third-party nodes are left out unless ``include_structure`` / ``include_external`` ask for them (external covers stdlib, third-party and unresolved call targets) — the same view as the CLI's ``trace``. For what depends on X use ``cgis_analyze_impact``; for only the members of a module or class, ``cgis_get_structure``; for a source-included brief to read before editing one symbol, ``cgis_context``. ``output_format="mermaid"`` (default) returns a human-readable diagram; ``"json"`` returns a joinable ``{root, nodes, edges, coverage}`` payload with real FQNs (not display hashes) for agent/CI use. ``coverage`` counts the calls the traversed functions make that resolved to nothing, and ``top_unresolved`` names the most frequent. Read the names, not only the ratio: in Python most are methods on untyped locals (``logger.info``, ``items.append``), which cut nothing short. Use ``cgis_ingest`` first if the database does not exist yet.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| depth | integer | – | Maximum edge hops downstream, over calls, imports, inheritance, DI dependencies and references (plus containment with include_structure). |
| fqn | string | yes | Fully qualified name, e.g. pkg.module.Class.method. A unique dot-boundary suffix also resolves; an ambiguous one returns candidates. Use cgis_find_symbol to look a name up. |
| include_external | boolean | – | Also return stdlib, third-party and unresolved call targets — calls on values whose type is decided at runtime. Off by default, as in the CLI, because they dominate the payload; in json, coverage/top… |
| include_structure | boolean | – | Also follow containment (CONTAINS/DECLARES): a module's or class's own members, and the class or file enclosing a symbol. Off by default, as in the CLI; cgis_get_structure is the tool for members alo… |
| output_format | string | – | "mermaid" for a diagram, or "json" for a payload with real FQNs (case-insensitive). Any other value returns an error. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
cgis_validate ~108
Report graph integrity as JSON: edge resolution stats + health verdict. Check this before trusting ``cgis_analyze_impact`` output — a high unresolved ratio means callers are missing from the graph.
| Name | Type | Req | Description |
|---|---|---|---|
| db_path | string | – | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. |
| threshold | number | – | Highest unresolved-edge ratio (0-1) still reported as healthy. |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
What is the CGIS Code Graph MCP server?
CGIS Code Graph is an MCP server listed in the public MCP registry as io.github.zaebee/codegraph-brain. Code graph for AI agents: impact analysis and call tracing for Python and TypeScript. This page covers its PyPI package (codegraph-brain).
Is the CGIS Code Graph MCP server safe to use?
CGIS Code Graph scores 67 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 20 September 2026. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.
What tools does the CGIS Code Graph MCP server expose?
CGIS Code Graph exposes 15 tools: cgis_ingest, cgis_trace_flow, cgis_analyze_impact, cgis_get_structure, cgis_drift, and 10 more. Their descriptions and schemas cost roughly 5,493 tokens of context every time the server is loaded.
Is the CGIS Code Graph MCP server still maintained?
CGIS Code Graph is still listed as active in the MCP registry. We last reached this channel on 20 September 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.