{
  "markdown": "# @endiagram/mcp\n\nMCP server for [EN Diagram](https://endiagram.com) — deterministic structural analysis powered by graph theory. Every result is backed by a named mathematical theorem. No AI inside the computation.\n\n## Installation\n\nRun directly:\n\n```bash\nnpx @endiagram/mcp\n```\n\nOr install globally:\n\n```bash\nnpm install -g @endiagram/mcp\n```\n\n## Connect\n\n### Claude Code\n\n```bash\nclaude mcp add endiagram npx @endiagram/mcp\n```\n\n### Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"endiagram\": {\n      \"command\": \"npx\",\n      \"args\": [\"@endiagram/mcp\"]\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `.cursor/mcp.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"endiagram\": {\n      \"command\": \"npx\",\n      \"args\": [\"@endiagram/mcp\"]\n    }\n  }\n}\n```\n\n### HTTP (zero install)\n\nAny MCP client that supports HTTP transport:\n\n```\nhttps://api.endiagram.com/mcp\n```\n\n### Smithery\n\n```bash\nsmithery mcp add dushyant30suthar/endiagram\n```\n\n## Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `EN_API_URL` | `https://api.endiagram.com` | API endpoint for the EN Diagram service |\n\n## Tools\n\nSix 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.\n\n| Tool | What it answers | Levers |\n|------|-----------------|--------|\n| `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). |\n| `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`. |\n| `live` | Can it deadlock? Can entities overflow? Siphons, traps, unbounded cycles, structural liveness and boundedness. | — |\n| `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. |\n| `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. |\n| `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`). |\n| `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). |\n\n## EN Syntax\n\nOne statement per line:\n\n```\nactor do: action needs: input1, input2 yields: output1, output2\n```\n\nShared names between yields and needs create connections automatically:\n\n```\ncustomer do: place order needs: menu yields: order\nkitchen do: prepare food needs: order yields: meal\nwaiter do: deliver needs: meal yields: served customer\n```\n\n## Modeling\n\nSame 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.\n\nLearn more at [endiagram.com](https://endiagram.com).\n\n## Telemetry\n\n`@endiagram/mcp` generates a random install ID on first run, stored at\n`~/.endiagram/install-id` (mode `0600`). It is sent with every request as\nthe `X-Endiagram-Install-Id` HTTP header so we can correlate requests\nfrom the same install for debugging issues that the per-IP signal alone\ncannot track (mobile networks, VPNs, CGNAT all collapse or churn IPs).\n\n**No source code, no file paths, no environment variables, and no PII\nare sent.** The install ID is a random opaque UUIDv4 generated locally.\n\nA first-run notice prints to **stderr** (never stdout — stdout is the\nMCP JSON-RPC channel) with the disclosure and the opt-out instructions.\nThe notice fires once per install and never again.\n\n### Opting out\n\nAny of these three methods disables the install ID:\n\n1. Set `ENDIAGRAM_TELEMETRY=off` as an environment variable (also\n   accepts `0`, `false`, `no`).\n2. Create a file at `~/.endiagram/telemetry` containing the word `off`.\n3. Delete `~/.endiagram/install-id`. (A new one is generated on next\n   run unless option 1 or 2 is also set.)\n\nWhen any of these is active, the `X-Endiagram-Install-Id` header is not\nsent at all — the server falls back to its per-IP HMAC `cid` for\ncorrelation, which works fine for short-term per-session tracing.\n\nFull privacy policy: [endiagram.com/privacy](https://endiagram.com/privacy)\n\n## License\n\nMIT\n",
  "bytes": 5455,
  "sha": "c63a7c80db3242baeea848caa5e9d6f313601c99bbcb589c4d73e1d19805701a",
  "repo_slug": "dushyant30suthar/endiagram-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_dushyant30suthar_endiagram_mcp_01af51d4/readme"
}