lachesis-mcp
OfficialThis server is a code analysis MCP server (Lachesis) that builds a compiler-precise code graph (C, Python, TypeScript) and lets you query structure, dataflow, and security properties. It offers:
Build/attach a graph: build from a source directory with caching and refresh, or load an existing graph; attach for all subsequent tools.
Structural navigation: find high-degree hubs, discover subsystems (communities/architecture), search symbols, get callers/callees (direct+indirect), read function source, open files/folders, and list explicit unknowns/frontiers.
Dataflow & taint analysis: forward/reverse value-flow cones (
flow,sources_of), reachability witnesses (reaches), points-to/alias sets, taint witnesses from the Atropos catalog, and candidate sinks (candidates/candidate_detail/census) with skeleton views (skeleton).Security investigations:
scanfor guard-differential leads,guard_dominance,counterexamplepaths bypassing validators,wrapper_model,object_lifecycle,error_path_summary, andrange_analysisevidence.Context & comparison:
field_history,sibling_compare,representation_roundtrip,component_boundary/cross_boundary_paths,type_explain,indirect_targets,execution_story,change_context,tests_for,spec_links, andcontext_pack; optionally wrap withconcept_search.Advanced flow pass:
flow_passproduces per-function interprocedural summaries andflow_skeletoncomposes them across call seams, returning shape-matching leads.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lachesis-mcp Show me the callers of `parseInput` and whether any tainted data flows to it."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Lachesis
Lachesis reads your code and builds a map of it. Then you can ask the map questions, like who calls this function, where does this value go, and can bad input reach a dangerous spot.
It works on C, Python, and TypeScript/JavaScript, all in one map.
What is this?
Search tools like grep tell you where a word shows up in your code. Lachesis is different. It follows the actual data. It can tell you where a value came from, where it goes next, and whether a request from the outside can reach something dangerous, like a database call with no login check in front of it.
To do this it reads your code the same way a compiler does, not by guessing with text patterns. So it doesn't miss a call just because a name was renamed or imported in a weird way.
You can use it three ways: as a command in your terminal, as a Python library, or as an MCP server that an AI agent can talk to.
Related MCP server: Lore MCP Server
Quick start
Install it, then point it at a folder:
python -m pip install lachesis-cpg
lachesis ./my-projectIt builds the map, saves it, and prints the leads. A lead is a spot where outside input can reach something sensitive with no check in the way. Each lead is a question to look into, not a final answer.
✓ compiling (0.7s)
2,677 nodes, 4,539 edges from typescript-compiler-api
✓ finding entrypoints that reach sensitive effects (0.1s)
2 leads (lens=all)
1. [0.810] handleWebhook (http/webhook.ts:10, route) -> findById(documentId) [database]
a caller that passes no recognized guard can read or write data
through findById(documentId) starting from handleWebhook
2. [0.810] handleWebhook (http/webhook.ts:10, route) -> findById(invoiceId) [database]
this function branches on something, but no login-style check is seen hereYou can also give it a git URL instead of a folder:
lachesis https://github.com/owner/repo. It downloads the code to a temp folder,
scans it, and cleans up after.
The first scan of a project is slow. After that the map is cached under
~/.lachesis/cache, so every run after is fast.
The three ways to use it
Terminal. One lachesis command. lachesis ./repo is the easy front door.
If you want more control, the steps map to three passes:
lachesis build ./my-project graph.kuzu # step 1: read the code, build the map
lachesis enrich graph.kuzu # step 2: work out the data flow
lachesis analyze graph.kuzu --summary # step 3: print the leads
lachesis explain graph.kuzu tree.c:1487 # show all the evidence for one spotPython library. Open the map once, then ask it as many questions as you want.
import lachesis
a = lachesis.Analysis.build("./my-project", "graph.kuzu", enrich=True)
leads = a.scan()
print(leads.summary())
print(a.explain_sink("tree.c", 1487)) # all the evidence for one spotRunnable example scripts are in examples/.
MCP (for AI agents). Start the server and an agent can build and query the map on its own:
lachesis mcp ./my-projectSee MCP below for setup in Cursor, VS Code, Claude, and Docker.
What you can ask
Once the map is built, these are the moves. They work from the terminal, the Python library, or as MCP tools an agent uses:
You want to know | The tool |
What is this part of the code built around? |
|
Where is this name? |
|
Who calls this? What does it call? |
|
Show me the real source |
|
What's in this file or folder? |
|
Where does this value go? What feeds this spot? |
|
Does this input reach that spot? |
|
What does this pointer point at? |
|
Where does outside input reach something dangerous? |
|
Is this C object freed twice, or used after it's freed? | the C lifetime pass |
Which entrypoints reach sensitive spots with no check? |
|
All the evidence for one spot, in one call |
|
Every answer comes with how sure it is. Some links are exact. Some are a safe guess, and Lachesis tells you when it's guessing instead of hiding it. Read the answers as evidence, not as a verdict.
MCP
Run lachesis mcp from the same place you built the map. You can hand it a
graph.kuzu path, but you don't have to. Start it with no argument and the agent
builds its own map when you point it at a repo.
One click (uses uvx, no install step):
Or set it up by hand. If the package is already installed:
{
"mcpServers": {
"lachesis": { "command": "lachesis", "args": ["mcp"] }
}
}Or let uvx fetch it on first run, no install:
{
"mcpServers": {
"lachesis": { "command": "uvx", "args": ["--from", "lachesis-cpg", "lachesis", "mcp"] }
}
}Or run it in Docker, with all three languages already in the image:
{
"mcpServers": {
"lachesis": {
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "/path/to/your/project:/src",
"ghcr.io/unboundcompute/lachesis:edge"]
}
}
}More client notes are in docs/queries.md.
Languages
Each language is read by a real compiler or its own parser, never a text guess.
Language | Read with | File types |
TypeScript / JavaScript | the TypeScript compiler |
|
Python | Python's own |
|
C | Clang |
|
A mixed project is one map, not three. A Python function and a TypeScript function it calls sit in the same map, and the same tools work across both.
Two limits worth knowing. Python has no type checker, so it matches attribute calls by name. C reads one file at a time, so it won't follow a call through a function-pointer table it never sees. Each language says what it can and can't do.
How it works
Lachesis works in three steps, and each one is a command.
build: read the code with real compilers into a plain map of symbols and calls. This is the fast part, and it's all most navigation needs.
enrich: work out how data flows through the map. This isn't done at build time. A question only computes the part of the flow it needs, then caches it.
analyze: run over the map and print the leads. These are sensitive spots, scored and matched to known bug shapes. It has a time limit, so a big project can't hang.
There's also a C lifetime pass. Some bugs, like freeing the same object twice or using it after it's freed, aren't about one spot. They're about the whole life of an object. A separate pass tracks each C object being allocated, freed, and used, and reports double-free and use-after-free with a path showing how it happens.
The map is saved as a folder (graph.kuzu). It holds an embedded database plus a
small index file. That folder is the map. Every tool reads it directly.
More detail is in docs/graph-model.md (what's in the
map) and docs/scaling.md (big repos, memory, and speed).
Install
python -m pip install lachesis-cpgWorks on Python 3.10–3.12. Python analysis needs nothing extra. Scanning
TypeScript/JavaScript needs node on your PATH, and C needs clang. If one is
missing you get a clear message, not a crash.
To work from a clone (for contributors):
git clone https://github.com/UnboundCompute/lachesis && cd lachesis
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
npm ci
cargo build --release --manifest-path native/clang_frontend/Cargo.tomlWhere to go next
examples/: a five-minute walkthrough plus a runnable script per feature.docs/graph-model.md: what's in the map.docs/queries.md: every way to ask a question.docs/scaling.md: big repos, memory, and CI.
Roadmap
Done recently:
C lifetime bugs. Finds double-free and use-after-free on C objects, with a path showing how, and no false alarms on the clean paths.
Big repos. Large multi-language trees build in parallel pieces and link into one map, staying inside a set memory budget.
Scan a git URL directly. Point it at
https://…, it downloads, scans, and cleans up.One tool, three front doors. The same code powers the terminal command, the Python library, and the MCP tools.
Coming next:
C lifetime bugs across functions: free in one function, use in another.
A single "can this input reach this spot?" question that returns a path or a clear no, across files and languages.
Status
Lachesis is early and moving fast. The map, the storage, the navigation and MCP
tools, and the C lifetime pass all work today and are checked by a test suite. The
lifetime pass is C-only for now and works within one function. One known false
alarm is tracked. The tools may still change before 1.0; the
CHANGELOG lists changes.
License
AGPL-3.0. See LICENSE. You can use, study, change, and share it,
including for commercial use. If you run a changed version as a network service,
you have to share your changed source with its users. If that doesn't fit your
case, a separate commercial license may be an option. See
CONTRIBUTING.md or open an issue.
Security
Found a security bug? Please don't open a public issue. See
SECURITY.md for how to report it privately.
Available Tools
50 toolsaliasesA
Read-only. Return the values that alias this one — those sharing a heap object through POINTS_TO (the destructuring / alias set). Use it to find every name for the same object before reasoning about a mutation; complements points_to (objects a value points to) and flow (where a value goes). Response carries the alias set with path evidence.
Inputs: value (required), format.
architecture_mapA
Read-only. Map the codebase's architecture: deterministic file communities over the call + dependency graph, each with internal/boundary edge counts and its call-graph hubs (labels are graph-derived member names, never generated prose). A directory-independent 'what are the big pieces' view — use communities for function-level subsystems and hubs for the central functions. All params optional; paginate communities with offset and files with file_offset.
Inputs: format, offset, file_offset, component_depth, +2 more.
build_graphA
Build a Lachesis graph from a source directory and attach it — the zero-config way to start on a repo that has no graph yet, no separate lachesis build step needed. Content-addressed: an unchanged tree returns instantly from cache; pass refresh=true to force a rebuild. On success the new graph is loaded, so the next tool call reasons over it. Toolchain: Python needs nothing extra; TypeScript/JavaScript need node on PATH and C needs clang — a missing one comes back as an actionable 'missing toolchain prerequisite' error, not a crash. Builds run in-process and can take minutes on a large tree (capped by timeout_seconds, default 300); a build longer than the MCP client's own request timeout may need a smaller subtree or an out-of-band lachesis build.
Inputs: source (required), format, refresh, timeout_seconds.
calleesA
What this symbol calls — direct + indirect dispatch, in-repo only. Each row tagged via: direct | indirect(...); an indirect row with resolved:false is an unresolved function-pointer slot (the indirection is real, the target isn't pinned). Set direct_only for resolved decl->decl CALLS only. A jump move.
Inputs: name (required), limit, format, offset, +1 more.
callersA
Who calls this symbol — direct + indirect dispatch (function-pointer / ops-struct / runtime), external stubs filtered. Each row tagged via: direct | indirect(may_invoke|context|fn-pointer). Set direct_only to get only resolved decl->decl CALLS. A jump move.
Inputs: name (required), limit, format, offset, +1 more.
candidate_censusA
Report constructor metadata, exhaustive counts, and explicit analysis frontiers. Use this to distinguish an empty result from missing coverage.
Inputs: format, temporal, hard_stop, constructor_id.
candidate_detailC
Return the complete neutral evidence capsule for one candidate id. It contains observations and bounded inferences, but no safe/unsafe verdict.
Inputs: candidate_id (required), format, temporal, hard_stop.
candidatesA
Enumerate and rank every observable obligation site as leads. This is a pointer, not a safety check: leads are never suppressed because a size is constant, a guard seems nearby, or no input flow was witnessed. The result is bounded and paged with leads, total, and next_offset; call candidate_census for the full coverage roster. Calls against one session are serialized and the first cold bind can be expensive.
Inputs: limit, cursor, detail, domain, +6 more.
change_contextA
Read-only. Join a symbol to its Git history: the exact commits that touched it with author, date, and subject. Returns history facts only — no generated 'why' narrative. Use it to date a change or find who last touched a function; newest first, paged with limit/offset.
Inputs: symbol (required), limit, format, offset.
communitiesA
The codebase's SUBSYSTEMS: partitions the call graph into clusters that call each other more than the rest of the tree (label propagation), independent of the directory layout — the structure the code HAS, not how it was filed. Each community carries a label (its highest-degree member), size, cohesion, the files it spans, and its top members with node_id + handle. Reports the graph modularity and lifts out cross-cutting connector hubs. Partitions over precise compiler calls by default; set include_dispatch for C function-pointer trees. Use AFTER hubs to go from 'what is central' to 'what are the parts'.
Inputs: n, format, members, min_size, +1 more.
component_boundaryA
Read-only. Show every call, callback, and type reference crossing between two path components, in both directions, with confidence and file:line. Use it to audit the contract between two modules/dirs; cross_boundary_paths adds rarity ranking over the same crossings. Components are path prefixes (e.g. src/net vs src/crypto).
Inputs: to_component (required), from_component (required), limit, format, +1 more.
concept_searchA
Search code by behavior rather than spelling using an optional local embedding model. Search is offline-only and never downloads implicitly; install the concept-search extra and run lachesis concept-model download.
Inputs: query (required), limit, model, format, +2 more.
context_packA
Return a minimal coherent factual set for a code question: relevant symbols, call relationships, conditions, tests, specs, and explicit unknowns. Uses identifier/graph relevance until concept_search embeddings are configured.
Inputs: question (required), format, max_symbols, spec_offset, +6 more.
counterexampleA
Find a bounded call path from src to sink that avoids a named validator/guard. This is the inverse reachability move; absence of a path is not proof when the search is truncated.
Inputs: src (required), sink (required), validator (required), depth, +2 more.
coverage_mapA
Read-only. Report deterministic graph coverage by component: how many files and callable bodies are indexed, plus diagnostics and unmodeled frontiers. It measures what the graph contains, not per-client session activity — use it to decide whether an empty result means 'clean' or 'not analyzed'. All params optional.
Inputs: limit, format, offset, component_depth.
cross_boundary_pathsA
List crossings between two components with boundary tags and rarity ranking, preserving direction and confidence.
Inputs: to_component (required), from_component (required), limit, format, +1 more.
enrichB
Warm this graph's sidecars once (the 2nd pass), so later flow_pass / leads / candidates / explain answer fast instead of paying the cost cold. Folds the dataflow tier over the whole graph and binds the catalog, and persists both beside the store (.dataflow.pb / .bind.pb) -- the difference between a >120s cold census and an instant one. Idempotent: a store already enriched is a no-op that just reports what is on disk. An unevaluated temporal family is reported as 'not evaluated', never 'clean'. No arguments.
Inputs: format.
error_path_summaryA
Read-only. For one function, report its exit paths (returns / error branches) and the resource-handling evidence on them, plus the honest frontier: complete transfer summaries remain a separate frontier from the lifecycle graph. Use it to see how a function leaves on its error paths; pair with guards and flow_pass for the interprocedural picture.
Inputs: function (required), limit, format.
execution_storyA
Read-only. Bounded forward call-and-branch trace from an entry point, following resolved indirect dispatch — the ordered structure of what runs, not generated narrative prose. Use it to see the control skeleton reachable from an entry; bound cost with max_depth/max_steps and page the branches/frontier. For pure centrality use hubs instead.
Inputs: entry (required), format, offset, max_depth, +4 more.
explainA
One shot from a candidate (by id, or by the sink's file:line) to a judgeable picture: the obligation and where it lands, the guard the enclosing function does or does not place over it, the bounded reverse value-flow cone into the sink, and the enclosing function's source read inline -- the census->candidates->detail->sources_of->read_body chain composed into one result. Provenance and guard are evidence, not verdicts: an empty cone is 'nothing observed under this tier', not 'unreachable'. Pass candidate_id, or file and line.
Inputs: file, line, format, temporal, +4 more.
field_historyA
For a field/property, list graph-evidenced initialization, modification, reads, checks, and value-flow events with owning functions.
Inputs: field (required), limit, format, offset, +1 more.
find_similarA
Read-only. Given one declaration (by node id or exact name), return the declarations most like it by meaning — a 'what else looks like this' over the same local embedding model as concept_search, reusing its cached vectors (no re-embedding). A retrieval lead only: useful for finding sibling handlers, copy-paste variants, or the peers of a function under review. Offline-only; with no model installed it returns an explanatory note, not results.
Inputs: name (required), limit, model, format, +1 more.
flowA
Read-only. Forward value-flow cone from a value/symbol: everything it can reach over VALUE_FLOWS_TO + POINTS_TO, bridging aliases through the heap. Use it to answer 'where does this value go?'; for the reverse (what feeds a sink) use sources_of, and for a yes/no witness between two points use reaches. Returns labeled nodes/edges; a missing path is over-approximation-safe, not proof of none.
Inputs: seed (required), limit, format.
flow_passA
Run the interprocedural flow pass (the 3rd pass) over the whole graph and return its per-function SUMMARY census -- the layer beneath the skeletons. For each function: its taxonomy, whether it is a taint source, the ordered sink-flow signatures (which value reaches which sink, guarded or not, and the callee it flows through), and the pointer lifetime signatures (alloc->use->free->escape). This is the composed, interprocedural summary the shape matcher runs on -- one call materializes and caches the pass. The response returns counts and a bounded lead page, never the whole semantic graph. Use function to scope to one function; paginate with offset/limit.
Inputs: limit, format, offset, function.
flow_skeletonA
Interprocedural flow skeletons: compose per-function summaries into linear, nesting-aware {control|sink|lifecycle} streams STITCHED across call seams -- the cross-function flow a single-function skeleton cannot show -- then match shape patterns over them. Two skeleton kinds: REACH (a value's guard-nesting down the call chain to a sink; feeds the guarded-vs-unguarded size differential) and TYPESTATE (a pointer's ordered alloc/use/free/escape; feeds double-free / use-after-free / leak). Returns shape-matcher LEADS (not verdicts -- adjudicate with sources_of/reaches). No arg: every lead, source-rooted first. The response is bounded to a lead page and reports graph counts, never the whole graph. Pass function to scope to one entry and kind to filter reach|typestate.
Inputs: kind, limit, format, offset, +1 more.
guard_dominanceA
Check whether recognized guards on an entry-to-effect call path dominate the effect. Returns proven, skippable, or undecided evidence and never emits a safety verdict.
Inputs: entry (required), effect (required), depth, format.
hubsA
The subsystem's spine: the N highest-degree functions over the UNION call graph (direct CALLS + indirect function-pointer / ops-struct / runtime dispatch), ranked by fan_in + fan_out — no name knowledge needed. Each row carries node_id + handle (file:line), fan_in/fan_out/degree, and entry-point flags (exported | dispatch_target | callback). Language-agnostic cold-start: start here to find what a subsystem is built around, THEN callers/callees/read_body to traverse.
Inputs: n, limit, format, offset.
indirect_targetsA
Resolve function-pointer, callback, ops-table, and runtime dispatch sites inside a function. Keeps unresolved sites visible and reports confidence.
Inputs: function (required), limit, format, offset, +1 more.
invariant_traceA
Read-only. Trace the producers, mutators, checkers, and consumers of a value or field over a bounded local flow cone — who sets it, who guards it, who reads it. Use it to reconstruct an invariant around one value; returns role-tagged nodes with file:line, bounded by depth. Local, not interprocedural — use flow / sources_of to cross call seams.
Inputs: value (required), depth, limit, format.
leadsA
Query the flow pass's LEADS in memory -- the shape-matcher findings the 3rd pass already computed and cached, not a fresh cold run. This is the warm counterpart to re-deriving leads by hand every question: the pass is materialized once (via flow_pass), then this filters the held result. No arg: a by-pattern summary plus the honesty fields (whether the run timed out, which functions were truncated) -- an empty result over a partial run is never 'clean'. pattern filters to one bug shape; function to one enclosing function; at locates by source position file, file:line, or file:lo-hi (a lead carries only its function + line, so the file is resolved through the symbol index; a basename or path suffix is enough). Leads are leads, not verdicts -- adjudicate with sources_of/reaches. Calls against one session are serialized; results are bounded and paged.
Inputs: at, limit, format, offset, +2 more.
load_graphA
Switch/attach the active graph the whole server reasons over — point it at a different target (e.g. bnxt -> igb) mid-session with no restart. Takes a canonical graph JSON path and an optional overlay + profile; the graph loads once and every subsequent tool hits the in-memory copy.
Inputs: path (required), overlay, profile.
object_lifecycleA
Read-only. Report what lifecycle evidence the graph holds for a value or function — Pass 3 alloc/release/deref/alias/generation events and its source-rooted coverage — plus the matcher leads that relate them. Give value or function to scope it; omit both for the capability report. Prefer field_history for one field's events and flow_pass for the composed interprocedural summary.
Inputs: value, format, function.
open_fileA
L1 file graph: imports, declarations, intra-file calls, cross-file jump-stubs for one file (repo-relative path). Returns a {nodes,edges,manifest} graph.
Inputs: file (required), format.
open_folderA
Read-only. L0 folder graph rooted at a path prefix: folder -> file -> declarations. The coarsest orientation move — use it to see what lives under a directory before drilling in with open_file (one file's graph) or read_body (one function's source). Returns a {nodes, edges, manifest} graph.
Inputs: root (required), format.
points_toA
Read-only. Return the heap objects a value may point to through POINTS_TO edges — the alias set behind a pointer. Use it for pointer/alias follow-up, not for callers (callers) or value-flow (flow/reaches). Returns the pointed-to objects with path evidence plus explicit unknowns; a missing edge is over-approximation-safe, not proof the pointer is null.
Inputs: value (required), format.
range_analysisA
Read-only. Return the lightweight numeric evidence graph guards expose for a value (comparisons, bounds checks) — not a full interval solve: real value-range analysis stays unavailable until the numeric model ships, and the response names that frontier honestly. Scope with value and/or function; omit both for the capability report.
Inputs: limit, value, format, function.
reachesA
Read-only. Does src reach sink through value flow? Returns the labeled witness path when it does, or an honest negative when it doesn't (a negative under truncation is not proof of no path). Use it to confirm one specific source->sink pair; use flow/sources_of to explore a whole cone. NOTE: it follows VALUE_FLOWS_TO/POINTS_TO, a different edge set than taint, so adjudicate taint witnesses from their own path.
Inputs: src (required), sink (required), format.
read_bodyA
Read a function/method's real source (L3) — the 'open this and read it' move, so an agent never falls back to cat. Accepts a name or a node_id; returns the exact source span from byte offsets plus {node_id, name, file, start_line, end_line}, capped at max_chars (default 4000) with a truncated flag. If the file/offsets are unavailable it reconstructs a best-effort body from the function's L3 body nodes in line order.
Inputs: name, format, node_id, max_chars.
representation_roundtripA
Read-only. Compare two functions/paths side by side for graph-visible calls, control structure, conversions, and side-effect differences — e.g. an encode/decode or serialize/parse pair. Returns the differences as facts only, inferring no semantic verdict. Use sibling_compare for auto-discovered structural peers, this for a deliberate two-sided pairing.
Inputs: left (required), right (required), format.
scanA
Return ranked leads from the whole taxonomy by default (lens=all): questions to investigate, never verdicts. Use lens=guard-diff for the entrypoint-to-effect guard view or lens=flow for native object-lifetime leads. Results are bounded and paged; the response includes coverage and whether the requested temporal work completed. Calls against one session are serialized; the native runtime is selected internally.
Inputs: lens, limit, format, offset, +4 more.
searchA
Resolve a function/method/type/file name to its canonical node id(s) with file:line. Teleport to any symbol, fuzzy by default. Returns a real match total with paging (limit/offset), and de-prioritizes test/spec symbols. NOTE: on a cold graph prefer guards_top first — blind name-search has no ranking; use this once you know a name.
Inputs: name (required), limit, format, offset.
sibling_compareA
Compare structurally similar callables by callees and control structure. Returns differences as facts only; it does not rank anomalies or issue verdicts.
Inputs: symbol (required), limit, format, offset, +1 more.
skeletonA
Render a function's sink map as a pseudo-function: every catalogued sink (all families -- memory, os, file, ...) shown in place, each annotated with its size expression, destination-capacity status, and guard dominance (fall-through | guarded-region | none-observed), plus the branch/loop structure that scopes them, with everything else elided. A sink is not adjudicable alone -- the guard that dominates it decides it -- so co-locating each sink with its controlling branches and loops makes closure a local read. Every obligation on a line is shown, highest-rank first; operand provenance is a drill-down (candidate_detail / sources_of). Pass function (a name or node id) for the whole enclosing function, or candidate_id to focus its enclosing function.
Inputs: format, function, candidate_id.
sources_ofA
Read-only reverse value-flow cone for a sink. Use this after a candidate or sink is selected to find values that may feed it; it returns labeled nodes and edges plus explicit truncation/frontier metadata. A missing path is not proof that no flow exists.
Inputs: sink (required), limit, format.
spec_linksA
Read-only. Link a symbol to its documentation and source comments, preserving any standards URLs (RFCs, CVEs) and exact file:line evidence. Use it to recover the spec/standard a function implements; returns comment/doc references paged with limit/offset. Reads recorded source, so it works even where comments are outside the production graph.
Inputs: symbol (required), limit, format, offset.
taintA
Taint witnesses from the Atropos catalog: where untrusted input actually reaches a dangerous sink through value flow. Folds the Atropos taint models (sources / sinks / summaries) onto this graph's exact nodes and runs propagation, returning each source->sink reach with the catalog model id, CWE, and file:line for both ends. atropos_connected rows are the ones a catalog fact drove (e.g. request -> urlopen SSRF); the rest are the engine's own generic-role reaches. Costs one whole-graph value-flow build on first call per graph (cached after). A no-op with a clear reason if the Atropos catalog is not checked out. Each witness carries source_id/sink_id, the exact graph node ids of the bound endpoints, plus path -- the ordered source->sink hops taint actually walked ({id,label,at} each). Adjudicate a witness from its path (read source at each hop); do NOT re-derive it with reaches, which follows a different edge set (VALUE_FLOWS_TO/POINTS_TO) and can return 0 hops for a pair taint reached over REACHING_DEF/summary edges. unwitnessed lists bound sinks/sources that took part in no reach -- feed those ids straight to sources_of/flow/reaches to trace why (on a C graph they mark where value-flow gaps sever the chain); no name resolution needed since the endpoint is often an external callee the name index can't seed.
Inputs: limit, format, atropos_only.
tests_forA
Find exact references to a symbol in test/spec files, including nearby assertion evidence. Reads the recorded source tree because tests are normally excluded from the production graph.
Inputs: symbol (required), limit, format, offset.
type_explainA
Read-only. Explain a type from graph facts: its fields plus the methods that construct, mutate, consume, or destroy it, each role graph-derived. Use it to learn a struct/class's shape and how it is handled before reading call sites. Paginate fields with offset and methods with member_offset.
Inputs: type (required), limit, format, offset, +1 more.
unknownsA
Read-only. List the graph's explicit comprehension frontiers: unresolved calls, dynamic/reflective runtime behavior, and parser/compiler diagnostics. It separates proven-absent from couldn't-cross, so you never read a missing fact as 'none'. Call it to gauge how much of an answer is trustworthy; scope to one function or survey the whole graph.
Inputs: limit, format, offset, function.
wrapper_modelA
Infer wrapper semantics from graph evidence: allocator, deallocator, I/O, validator, and forwarding call roles. This is evidence with confidence, not a registry mutation.
Inputs: function (required), limit, format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 50 tools
Although each description is detailed, the set contains multiple near-overlapping families: component_boundary/cross_boundary_paths, flow/flow_pass/flow_skeleton, candidates/leads/scan, and skeleton/explain. An agent selecting among 50 tools will frequently face unclear boundaries, especially between value-flow, taint, and lead-generation tools.
Names are uniformly snake_case and readable, but the grammatical pattern is mixed: some are verb_noun (load_graph, read_body), many are plural nouns (callers, hubs, candidates, leads), and some are single verbs (scan, explain, enrich). This is a readable mixed convention rather than a consistent verb_noun system.
Fifty tools is far beyond the 3-15 well-scoped range and even beyond the 16-25 heavy range. The breadth reflects a comprehensive analysis pipeline, but many tools are pass-specific variants that could be consolidated or exposed as parameters.
The domain surface is remarkably broad: graph loading/building, call and value-flow navigation, lifecycle/guard/taint analysis, tests/specs/history, and pass management are all covered. Minor gaps exist such as no explicit graph inventory/status tool or graph unload, but agents can work around them.
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Repository knowledge graph MCP server for codebase understanding and debugging.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseAqualityAmaintenanceModel Context Protocol server for Ghidra reverse engineering. 179 tools for decompilation, symbol management, cross-references, and binary analysis.86,301Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables LLM agents to query a codebase's structural knowledge (symbols, imports, call graphs, etc.) via MCP, reducing tokens and improving correctness compared to raw file access.32 npm7MIT
- AlicenseNot gradedqualityDmaintenanceExposes code graphs across multi-program repositories via MCP, enabling humans and agents to query the fleet with evidence.MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to autonomously reverse engineer applications by exposing Ghidra decompilation, renaming, and analysis tools to MCP clients.Apache 2.0