Endiagram Mcp

io.github.dushyant30suthar由 GitHub 帳號 dushyant30suthar 發布v0.3.16更新於 Oct 24, 2026

EN Diagram — structural verification for concurrent systems. Pure math, no AI.

已驗證Streamable HTTP可網頁執行開發者工具資料與分析

概覽

AI 產生的概覽

對以 EN 語法描述的並行系統做確定性的圖論分析,回答結構、活性、可達性與等價性問題,並可繪製示意圖。

可以做什麼
  • 描述系統形態、階段、橋接節點、環路、關鍵路徑、支配樹、最小割、子系統、參與者與位置,可選擇輸出風險發現與節點中心性
  • 檢查守恆律、可持續循環、可耗盡集合等不變量,並支援自訂規則
  • 判斷結構活性與有界性,評估死鎖與溢位風險
  • 追蹤實體或動作之間的可達性,給出路徑、距離、邊界跨越與防護覆蓋
  • 比較兩個系統或對系統套用修補,並合併或抽取子系統
  • 依主題與圖層選項繪製 SVG 或 PNG 示意圖
適用情境
適合以 EN 語法對並行系統或工作流程建模後,需要以數學方式判斷死鎖、瓶頸、不變量、可達性,或比較兩個設計在結構上是否相同。模型確定後也可用來產生示意圖。
執行需求
可作為本機 npm 套件透過 npx 或全域安裝執行,也可使用遠端 HTTP 端點;本機執行需要 Node.js。選用環境變數 EN_API_URL 可指定服務端點。未宣告需要帳號或 API 金鑰。
安裝前請注意
本機套件首次執行會在使用者家目錄產生隨機安裝 ID,並在每次請求中作為 X-Endiagram-Install-Id 標頭送出;可透過 ENDIAGRAM_TELEMETRY=off、建立遙測檔案或刪除該 ID 關閉。系統模型內容會傳送到遠端服務。繪製工具僅在使用者明確要求時產生圖片。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Endiagram Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.dushyant30suthar%2Fendiagram-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "endiagram": {
      "type": "http",
      "url": "https://api.endiagram.com/mcp"
    }
  }
}

README

@endiagram/mcp

MCP 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.

Installation

Run directly:

bash
npx @endiagram/mcp

Or install globally:

bash
npm install -g @endiagram/mcp

Connect

Claude Code

bash
claude mcp add endiagram npx @endiagram/mcp

Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "endiagram": {      "command": "npx",      "args": ["@endiagram/mcp"]    }  }}

Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "endiagram": {      "command": "npx",      "args": ["@endiagram/mcp"]    }  }}

HTTP (zero install)

Any MCP client that supports HTTP transport:

https://api.endiagram.com/mcp

Smithery

bash
smithery mcp add dushyant30suthar/endiagram

Environment Variables

VariableDefaultDescription
EN_API_URLhttps://api.endiagram.comAPI endpoint for the EN Diagram service

Tools

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.

ToolWhat it answersLevers
structureWhat 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).
invariantWhat'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.
liveCan it deadlock? Can entities overflow? Siphons, traps, unbounded cycles, structural liveness and boundedness.—
reachableCan 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.
equivalentAre 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.
composeHow 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).
renderSVG 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).

EN Syntax

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: orderkitchen do: prepare food needs: order yields: mealwaiter do: deliver needs: meal yields: served customer

Modeling

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.

Telemetry

@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.

Opting out

Any of these three methods disables the install ID:

  1. Set ENDIAGRAM_TELEMETRY=off as an environment variable (also accepts 0, false, no).
  2. Create a file at ~/.endiagram/telemetry containing the word off.
  3. Delete ~/.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

License

MIT

來源:README.md,提交 638f7b0

工具

7

structure

What 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 (where work happens, boundary crossings). Levers: node=X returns per-node centrality (betweenness, closeness, eigenvector) for a specific node. detect_findings=true flags named structural risks — unguarded-sink (sinks reachable via only pipeline actions, no JOIN/HUB gating), single-cut-path (source-sink pairs with only one vertex-disjoint path), multi-cut-path (paths with redundant defense, min-cut > 1). See server instructions for EN language syntax.

輸入參數nodesource必填detect_findings

invariant

What'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 depletion is irreversible), behavioral.deficiency (0 means structure fully determines dynamics), behavioral.isReversible, behavioral.hasUniqueEquilibrium. On-demand via `rules`: encode domain-specific claims and verify them against the graph — this is how to check things the topology alone can't see (precedence, coverage, centrality bounds, resilience). See the rules parameter for supported sentence shapes.

輸入參數rulessource必填

live

Can 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 accumulate without limit. unboundedCycles are action sequences that could cause overflow. See the server instructions for EN language syntax.

輸入參數source必填

reachable

Can 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 guards cover all paths; coverage.fullCoverage=false means unguarded routes exist. See the server instructions for EN language syntax.

輸入參數to必填from必填source必填defense_nodes

equivalent

Are 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, actors, or locations. Evolve mode (source + patch): dry-run a change, shows diff plus new/lost bridge nodes. Patch has three directive types — plain EN statement adds an action; a line starting with `-` (and not containing `do:`) removes the named action; a statement whose action name matches an existing one replaces the original. See the server instructions for EN language syntax.

輸入參數patchsourcesource_asource_b

compose

How 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 out as standalone EN with boundary inputs/outputs, actors, and locations. Valid subsystem names come from structure's `subsystems` field — call structure on the source first to discover them. See the server instructions for EN language syntax.

輸入參數linkssourcesource_asource_bsubsystem

render

SVG 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.

輸入參數typeviewcolorthemeisDarkoutputsource必填qualitydirectionstructure_layers

版本歷史

1
  1. v0.3.16最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分