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 分