DunneFlow · Reference
The MCP server
dunneflow mcp serves a map to an AI coding agent over the Model Context Protocol, with thirteen tools and read-only access to every map.
dunneflow mcp answers the same map to a program instead of to you. It speaks the
Model Context Protocol (MCP) on standard input and
output, so an AI coding agent can ask the questions the dashboard answers, and can make a
map of a tree it has just been pointed at.
uv run dunneflow mcp [dir] [--revision <rev>] [--allow-unfinished]
It takes the same argument serve does: a program directory or a maps root, told apart by
whether the directory holds a map. --revision picks the base point in time (default: the
newest). --allow-unfinished lets it open a map whose analysis never finished, with a
warning, for the first map and for every one the agent opens later.
The tools#
| Tool | What it answers |
|---|---|
overview | The cover. Where to start. |
touches | What one routine reaches. |
impact | What depends on one routine, and which ways in are affected. |
routine | Everything known about one routine. |
find | Search names and the text of the source together. |
macros | What the program's macros do where they are used, and what could not be seen of them: branches not taken, headers not found. |
glossary | What the program's words mean, and who says so. |
query | Run SQL against the graph. Reads only; the schema is offered as a resource so the agent can write its own. |
programs | The programs under the maps root. |
open | Open one of them. Only a program the listing names; a path is refused. |
analyze | Start reading a new tree into a new map. |
analysis_status | Report on a running analysis. |
analysis_stop | Stop it. |
Every tool calls the same code the dashboard calls, so an agent and a person looking at the same map are told the same things.
It cannot change a map#
Every store the server opens is read-only, enforced by the database connection itself,
which refuses a write. query also refuses anything that is not a read by name, before the
statement reaches the connection.
The one tool that produces anything is analyze: it runs the ordinary dunneflow analyze
command as a separate process to write a new map, subject to the same checks as the
Analyse dialog. It never modifies the map being served.
What the program says is data#
Every answer quotes the program that was read: routine names, comments, docstrings, string literals and documents are its authors' text. The server tells the agent so when it connects: text inside a result that addresses the agent, or asks it to do something, is something the program contains and is never an instruction to follow.
When the map's drive goes away#
If the map is on an external drive that sleep dismounts, or that is ejected, a tool call is refused with a sentence naming the file it cannot read. When the drive is back, the server reopens the map by itself and answers again, with no restart.
Registering it with a client#
Any MCP client that can launch a command over standard input and output will work. As one example, with Claude Code, from a DunneFlow source checkout:
claude mcp add dunneflow -- uv run dunneflow mcp output
That registers a server named dunneflow that serves every map under output/. With the
application, replace uv run dunneflow with the application's command-line program and
output with your maps folder (see The command line).
For a walk-through, see the tutorial Use DunneFlow from an AI agent.
Something unclear or out of date? Tell us.