Brings deterministic structural analysis of concurrent systems into Claude via seven tools backed by graph theory and Petri net semantics. You hand it EN Diagram source code (a simple text format where actors, actions, and resources connect by name) and ask whether the system can deadlock, whether two systems are equivalent, if paths exist between nodes, what the conservation laws are, or how subsystems compose. Every answer references a named theorem. The `structure` tool maps shape and critical paths, `invariant` checks custom rules like "every path from X to Y passes through a guard", `live` detects siphons and unbounded cycles, and `render` outputs annotated diagrams. Runs via stdio or zero install HTTP transport at api.endiagram.com/mcp. Reach for this when designing workflows, protocols, or pipelines where race conditions and bottlenecks matter more than behavior simulation.
claude mcp add --transport http endiagram-mcp https://api.endiagram.com/mcpRun in your terminal. Add --scope user to make it available in every project.
Review the command, arguments, and environment values before installing — MCP servers run with your local permissions.
Verified live against the running server on Jun 10, 2026.
structureWhat is this system? Returns shape (Pipeline, Fork-Join, DAG, Star, Cycle, Tree, Complete, etc.), stages with roles, bridge nodes, cycles, parallelism, critical path, dominator tree, min-cuts, subsystems, interface nodes, actors (who does what, workload entropy), locations (wh...3 paramsWhat is this system? Returns shape (Pipeline, Fork-Join, DAG, Star, Cycle, Tree, Complete, etc.), stages with roles, bridge nodes, cycles, parallelism, critical path, dominator tree, min-cuts, subsystems, interface nodes, actors (who does what, workload entropy), locations (wh...
nodestringsource*stringdetect_findingsstringinvariantWhat's always true — automatic findings and on-demand checks. Automatic outputs: conservationLaws (weighted entity sums constant across executions), sustainableCycles (T-invariants — action sequences returning to start state), depletableSets (entity groups whose simultaneous d...2 paramsWhat's always true — automatic findings and on-demand checks. Automatic outputs: conservationLaws (weighted entity sums constant across executions), sustainableCycles (T-invariants — action sequences returning to start state), depletableSets (entity groups whose simultaneous d...
rulesstringsource*stringliveCan it deadlock? Can entities overflow? isStructurallyLive means every siphon contains a trap — no structural deadlock possible. uncoveredSiphons are entity groups that can drain permanently, with the actors and locations affected. isStructurallyBounded means no entity can acc...1 paramsCan it deadlock? Can entities overflow? isStructurallyLive means every siphon contains a trap — no structural deadlock possible. uncoveredSiphons are entity groups that can drain permanently, with the actors and locations affected. isStructurallyBounded means no entity can acc...
source*stringreachableCan X reach Y? Follows directed data flow first; falls back to undirected. `from` and `to` accept entity names or action names (resolved against the program). Path shows each step with actor and location. locationCrossings counts boundary transitions. defense_nodes checks if g...4 paramsCan X reach Y? Follows directed data flow first; falls back to undirected. `from` and `to` accept entity names or action names (resolved against the program). Path shows each step with actor and location. locationCrossings counts boundary transitions. defense_nodes checks if g...
to*stringfrom*stringsource*stringdefense_nodesstringequivalentAre two systems the same, or what changes if I change this one? Compare mode (source_a + source_b): structural differences, edit distance, spectral equivalence. isCospectral=true means identical graph structure up to relabeling — topologically the same despite different names,...4 paramsAre two systems the same, or what changes if I change this one? Compare mode (source_a + source_b): structural differences, edit distance, spectral equivalence. isCospectral=true means identical graph structure up to relabeling — topologically the same despite different names,...
patchstringsourcestringsource_astringsource_bstringcomposeHow do parts combine, or how does a part stand alone? Merge mode (source_a + source_b + links): declare which entities in A are the same as entities in B; the combined graph is wired via string-equality of shared names. Extract mode (source + subsystem): pull a named subsystem...5 paramsHow do parts combine, or how does a part stand alone? Merge mode (source_a + source_b + links): declare which entities in A are the same as entities in B; the combined graph is wired via string-equality of shared names. Extract mode (source + subsystem): pull a named subsystem...
linksstringsourcestringsource_astringsource_bstringsubsystemstringrenderSVG or PNG diagram. Only call when user explicitly asks to visualize. The rendered image is delivered to the user, not injected into the model's context. See the server instructions for EN language syntax.10 paramsSVG or PNG diagram. Only call when user explicitly asks to visualize. The rendered image is delivered to the user, not injected into the model's context. See the server instructions for EN language syntax.
typestringviewstringcolorstringthemestringisDarkstringoutputstringsource*stringqualitystringdirectionstringstructure_layersstringMCP server for EN Diagram — deterministic structural analysis powered by graph theory. Every result is backed by a named mathematical theorem. No AI inside the computation.
Run directly:
npx @endiagram/mcp
Or install globally:
npm install -g @endiagram/mcp
claude mcp add endiagram npx @endiagram/mcp
Add to your claude_desktop_config.json:
{
"mcpServers": {
"endiagram": {
"command": "npx",
"args": ["@endiagram/mcp"]
}
}
}
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"endiagram": {
"command": "npx",
"args": ["@endiagram/mcp"]
}
}
}
Any MCP client that supports HTTP transport:
https://api.endiagram.com/mcp
smithery mcp add dushyant30suthar/endiagram
| Variable | Default | Description |
|---|---|---|
EN_API_URL | https://api.endiagram.com | API endpoint for the EN Diagram service |
Six questions about any system, plus a render tool. Every tool takes source (EN code or .en/.txt file path). Tool names are shorthand, not specs — read each description before calling; compose and equivalent are mode-based, not general analyzers.
| Tool | What it answers | Levers |
|---|---|---|
structure | What is this system? Shape, stages, bridges, cycles, critical path, dominator tree, min-cuts, subsystems, actors, locations. | detect_findings=true flags risks (unguarded-sink, single-cut-path, multi-cut-path); node=X returns per-node centrality (betweenness, closeness, eigenvector). |
invariant | What's always true? Conservation laws, T-invariants (sustainable cycles), depletable sets, deficiency, reversibility. | rules (one per line) checks custom claims. Four supported shapes: no bridge that is also hub · every path from X to Y passes through at least one of [A,B,C] (precedence) · no node with centrality above N · removing any single node disconnects at most N others. |
live | Can it deadlock? Can entities overflow? Siphons, traps, unbounded cycles, structural liveness and boundedness. | — |
reachable | Can X reach Y? Path, distance, boundary crossings. from/to accept entity or action names. | defense_nodes=a,b,c checks whether guards cover every path. |
equivalent | Are two systems the same, or what changes if I change this one? | Compare mode (source_a+source_b): edit distance + spectral cospectrality. Evolve mode (source+patch): plain EN adds; - name removes; same-name replaces. |
compose | How do parts combine (merge) or how does a part stand alone (extract)? | Merge: source_a+source_b+links (a.entity=b.entity per line). Extract: source+subsystem (names come from structure.subsystems). |
render | SVG or PNG diagram. Only call when the user asks to visualize. | Themes: Editorial, Primer, Carbon (each ± isDark) or seed-derived from color=#RRGGBB. structure_layers bitmask (1=subsystems, 2=pipelines, 4=cycles, 8=forks, 16=joins, 32=hubs, 64=deadlock, 128=overflow). |
One statement per line:
actor do: action needs: input1, input2 yields: output1, output2
Shared names between yields and needs create connections automatically:
customer do: place order needs: menu yields: order
kitchen do: prepare food needs: order yields: meal
waiter do: deliver needs: meal yields: served customer
Same name = same thing. Put all required inputs in one needs: list (AND). Give two actions the same yield-name to offer alternatives (OR). Sequence = one action consuming another's yield. Re-yield stateful resources to keep them persistent; one-shot data stays consumed. Model at the real atomic granularity — split only when the pieces could be accessed independently.
Learn more at endiagram.com.
@endiagram/mcp generates a random install ID on first run, stored at
~/.endiagram/install-id (mode 0600). It is sent with every request as
the X-Endiagram-Install-Id HTTP header so we can correlate requests
from the same install for debugging issues that the per-IP signal alone
cannot track (mobile networks, VPNs, CGNAT all collapse or churn IPs).
No source code, no file paths, no environment variables, and no PII are sent. The install ID is a random opaque UUIDv4 generated locally.
A first-run notice prints to stderr (never stdout — stdout is the MCP JSON-RPC channel) with the disclosure and the opt-out instructions. The notice fires once per install and never again.
Any of these three methods disables the install ID:
ENDIAGRAM_TELEMETRY=off as an environment variable (also
accepts 0, false, no).~/.endiagram/telemetry containing the word off.~/.endiagram/install-id. (A new one is generated on next
run unless option 1 or 2 is also set.)When any of these is active, the X-Endiagram-Install-Id header is not
sent at all — the server falls back to its per-IP HMAC cid for
correlation, which works fine for short-term per-session tracing.
Full privacy policy: endiagram.com/privacy
MIT
miapre/html-to-figma-design-system
ie3jp/illustrator-mcp-server
coding-solo/godot-mcp
ivanmurzak/unity-mcp
yctimlin/mcp_excalidraw
figma/mcp-server-guide