# endiagram-mcp

Runs structural checks on concurrent systems using graph theory, catching deadlocks, cycles and failure points without an LLM doing the math.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: dushyant30suthar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dushyant30suthar/endiagram-mcp
- Updated: 2026-04-21
- HTML: https://affpapa.org/en/nevibecode/mcp/endiagram-mcp

## What it does

The server reads a system description written in the EN language (lines like `actor do: action needs: ... yields: ...`) and exposes six analysis tools plus a diagram renderer. `structure` maps shape, stages, bridges, cycles, the critical path, dominator tree and min-cuts; `invariant` checks conservation laws and custom rules such as "no bridge that is also a hub"; `live` looks for deadlocks and overflow conditions; `reachable` tests whether one node can reach another and whether defense nodes cover every path; `equivalent` compares two systems or evaluates a proposed patch; `compose` merges subsystems together or extracts one out.

Every answer traces back to a named theorem rather than a model guess, which is the whole premise of the tool. The six tools are not interchangeable analyzers though: `compose` and `equivalent` each run in distinct modes (merge/extract, compare/evolve), so reading a tool's description before calling it matters more than guessing from its name.

On first run the server generates a random install ID and attaches it as an `X-Endiagram-Install-Id` header on requests, used only to correlate calls from the same install. Source code, file paths and environment variables are never sent. Setting `ENDIAGRAM_TELEMETRY=off`, writing `off` into `~/.endiagram/telemetry`, or deleting `~/.endiagram/install-id` turns this off.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://api.endiagram.com/mcp`

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http endiagram-mcp https://api.endiagram.com/mcp
```

2. **Platform CLI**
```bash
claude mcp add endiagram-mcp -- npx -y @endiagram/mcp
```

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add endiagram-mcp --url https://api.endiagram.com/mcp
```

2. **Platform CLI**
```bash
codex mcp add endiagram-mcp -- npx -y @endiagram/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "endiagram-mcp": {
            "url": "https://api.endiagram.com/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "endiagram-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@endiagram/mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "endiagram-mcp": {
            "type": "http",
            "url": "https://api.endiagram.com/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "endiagram-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@endiagram/mcp"
            ]
        }
    }
}
```

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http endiagram-mcp https://api.endiagram.com/mcp
```

2. **Platform CLI**
```bash
gemini mcp add endiagram-mcp npx -y @endiagram/mcp
```

## When to use it
- catch deadlocks and overflow conditions in a concurrent system before they ship
- verify that every path between two nodes is covered by a defense node
- diff two system versions or check what a patch changes without tracing the graph by hand
- pull a subsystem out of a larger model or merge separate systems through shared links
- render an SVG or PNG diagram highlighting cycles, hubs and deadlock points

## Example prompts
- Model a kitchen order flow in EN and run it through structure to find the critical path
- Check with invariant that no node exceeds a given centrality threshold
- Compare source_a against source_b with equivalent in compare mode and show how different they are

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
