{
  "markdown": "# @diagrammo/dgmo-mcp\n\n**Turn a conversation into a real diagram — without leaving your AI tool.**\n\n[![npm version](https://img.shields.io/npm/v/@diagrammo/dgmo-mcp.svg)](https://www.npmjs.com/package/@diagrammo/dgmo-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@diagrammo/dgmo-mcp.svg)](https://www.npmjs.com/package/@diagrammo/dgmo-mcp)\n[![license](https://img.shields.io/npm/l/@diagrammo/dgmo-mcp.svg)](./LICENSE)\n\nThis MCP server gives Claude (and any MCP-compatible AI tool) the ability to render\n**sequence diagrams, flowcharts, ER diagrams, C4 architecture, gantt charts, and 40+\nother chart types** from concise text markup — then hand the result off to a full\neditor for refinement. Ask for a diagram in chat; get a real one back.\n\n<table>\n  <tr>\n    <td width=\"50%\"><img src=\"https://raw.githubusercontent.com/diagrammo/dgmo-mcp/main/assets/sequence.png\" alt=\"Sequence diagram\" /></td>\n    <td width=\"50%\"><img src=\"https://raw.githubusercontent.com/diagrammo/dgmo-mcp/main/assets/c4.png\" alt=\"C4 architecture diagram\" /></td>\n  </tr>\n  <tr>\n    <td width=\"50%\"><img src=\"https://raw.githubusercontent.com/diagrammo/dgmo-mcp/main/assets/gantt.png\" alt=\"Gantt chart\" /></td>\n    <td width=\"50%\"><img src=\"https://raw.githubusercontent.com/diagrammo/dgmo-mcp/main/assets/flowchart.png\" alt=\"Flowchart\" /></td>\n  </tr>\n</table>\n\n## What you can do\n\nAsk in plain language — _\"diagram the auth flow as a sequence\"_, _\"chart the Q3 plan as\na gantt\"_, _\"draw our services as a C4 diagram\"_ — and Claude writes the markup and\nrenders it. The markup stays readable and diffable:\n\n```\nflowchart Mutiny Resolution\ndirection-tb\n\n[Sail]     Set sail under the captain\n{Trouble?} Discontent in the crew?\n{Vote}     Crew vote called\n[Mutiny]   Seize the ship\n\n(Sail) -> (Trouble?)\n(Trouble?) -Yes-> (Vote)\n(Vote) -Mutiny-> (Mutiny)\n```\n\n→ renders to the flowchart above. All rendering happens **locally** — no diagram data\nleaves your machine.\n\n## Tools\n\n| Tool                     | What it does                                                                | Over HTTP |\n| ------------------------ | --------------------------------------------------------------------------- | --------- |\n| `render_diagram`         | Render DGMO markup to **SVG or PNG**                                        | yes       |\n| `validate_diagram`       | Check markup and report parse errors, without rendering                     | yes       |\n| `suggest_chart_type`     | Suggest the chart types that fit a description                              | yes       |\n| `list_chart_types`       | List all supported chart types, marking the beta ones                       | yes       |\n| `get_language_reference` | Get DGMO syntax documentation for accurate generation                       | yes       |\n| `get_examples`           | Fetch worked examples for a chart type                                      | yes       |\n| **`share_diagram`**      | Get a shareable **diagrammo.app** URL — hand your diagram to the web editor | yes       |\n| **`open_in_app`**        | Open the diagram **straight into the Diagrammo desktop app** for editing    | no        |\n| `check_app_installed`    | Report whether the desktop app is installed                                 | no        |\n| `preview_diagram`        | Render one or more diagrams and open an **HTML preview** in the browser     | no        |\n| `generate_report`        | Build a polished **multi-section HTML report** with ToC and optional source | no        |\n\n`share_diagram` and `open_in_app` are the bridge out of chat: a diagram Claude generates\nbecomes something you can refine, restyle, and embed — see below.\n\nThe four marked **no** open a browser or launch the desktop app. Over HTTP that would\nhappen on the machine running the server rather than on yours, so they are not offered\nthere — see [Serving over HTTP](#serving-over-http).\n\n## Beyond the MCP server\n\nThe MCP server is one entry point into **[Diagrammo](https://diagrammo.app)** — a whole\necosystem built on the same DGMO markup. Generate in chat, refine in a real editor,\nembed anywhere:\n\n- **[diagrammo.app](https://diagrammo.app)** — the desktop app. `open_in_app` drops an\n  AI-generated diagram straight into it, with live preview, palettes, and export.\n- **[online.diagrammo.app](https://online.diagrammo.app)** — a full editor in the\n  browser, zero install. `share_diagram` URLs open right here.\n- **Docs integrations** — drop DGMO fenced code blocks into your docs site:\n  [remark-dgmo](https://www.npmjs.com/package/remark-dgmo),\n  [astro-dgmo](https://www.npmjs.com/package/astro-dgmo),\n  [docusaurus-plugin-dgmo](https://www.npmjs.com/package/docusaurus-plugin-dgmo),\n  [fumadocs-dgmo](https://www.npmjs.com/package/fumadocs-dgmo).\n- **Obsidian** — the _Diagrammo Diagrams_ community plugin renders DGMO in your vault.\n- **CLI** — `npx @diagrammo/dgmo-cli file.dgmo -o out.png`, or install via Homebrew.\n\n> **One markup, everywhere.** A diagram you generate here renders identically in the\n> app, in your docs, and in Obsidian — because they all speak DGMO.\n\n**[→ Try it free at diagrammo.app](https://diagrammo.app)**\n\n## Setup\n\n### Easiest — one command\n\nInstall the [`dgmo`](https://www.npmjs.com/package/@diagrammo/dgmo-cli) CLI and let it wire everything up:\n\n```bash\nnpm install -g @diagrammo/dgmo-cli   # or: brew install diagrammo/dgmo/dgmo\ndgmo install                     # auto-detects Claude Code, Codex, Claude Desktop, Cursor, …\n```\n\n`dgmo install` configures each detected assistant non-interactively and points it at `dgmo mcp`, so there's no separate package to install or prompts to answer. Target one surface with `dgmo install claude-code` (or `codex`, `claude-desktop`, …).\n\n### Manual configuration\n\nPrefer to edit configs yourself? Point any MCP client at the server via `npx` (no global install needed):\n\n**Claude Code** — `.claude/settings.local.json`; **Claude Desktop** — `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"dgmo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@diagrammo/dgmo-mcp\"]\n    }\n  }\n}\n```\n\nIf you have the `dgmo` CLI installed, `{ \"command\": \"dgmo\", \"args\": [\"mcp\"] }` works too. Restart the client after saving — the tools appear automatically.\n\n### Serving over HTTP\n\nThe setups above launch the server as a child process and talk to it over its standard\ninput and output. That needs the server and the client on the same machine. Where they\nare not — a hosted agent platform, a container, one server shared by several people —\nstart it as an HTTP endpoint instead:\n\n```bash\nnpx -y @diagrammo/dgmo-mcp --http            # http://127.0.0.1:3333/mcp\nMCP_TRANSPORT=http MCP_PORT=8080 npx -y @diagrammo/dgmo-mcp\n```\n\nEvery option takes a flag or an environment variable, whichever your setup can express:\n\n| Flag                 | Variable              | Default     | What                                       |\n| -------------------- | --------------------- | ----------- | ------------------------------------------ |\n| `--http`             | `MCP_TRANSPORT=http`  | off         | Serve streamable HTTP instead of stdio     |\n| `--port <n>`         | `MCP_PORT`            | `3333`      | Port to listen on                          |\n| `--host <addr>`      | `MCP_HOST`            | `127.0.0.1` | Interface to bind                          |\n| `--path <path>`      | `MCP_PATH`            | `/mcp`      | Path the endpoint answers on               |\n| `--allow-host <h>`   | `MCP_ALLOWED_HOSTS`   | loopback    | Extra `Host` headers to accept, repeatable |\n| `--allow-origin <o>` | `MCP_ALLOWED_ORIGINS` | unset       | `Origin` headers to accept, repeatable     |\n\nEach request is served independently — no sessions, nothing kept between calls — so one\nendpoint can serve several clients at once.\n\n> **The server has no authentication of its own.** It binds loopback by default and\n> rejects requests carrying a `Host` header it was not told to expect, which is enough\n> for a client on the same machine or inside the same container. Anything reachable from\n> a wider network needs your own authentication in front of it, and `--allow-host` for\n> the hostname it will be reached by. Binding a non-loopback interface without naming a\n> host prints a warning saying so.\n\n`--help` prints all of this from the installed version.\n\n## Privacy\n\nAll rendering is **local**. Your diagram markup and the images it produces never leave\nyour machine, except when you explicitly call `share_diagram` (which encodes the diagram\ninto a diagrammo.app URL). See the [privacy terms](https://diagrammo.app/terms#mcp-privacy).\n\n## Dev hub (AI-tuning tools)\n\n```bash\npnpm hub\n```\n\nOne command, one server, one browser tab. The hub opens a tabbed shell over the\nthree AI-tuning dev tools — switch between them with the top tabs, no separate\nports or commands to remember:\n\n- **Trigger tuning** — edit the phrase/concept vocabulary that drives\n  `suggest_chart_type`, score prompts live, save back to `triggers.json`.\n- **LLM judge** — judge chart-type descriptions against prompts with `claude -p`.\n- **Guidance studio** — author the per-type **styling guidance** the server\n  delivers (the `<!-- TIPS -->` blocks in dgmo's `language-reference.md`, sliced\n  into `get_language_reference`): pick a type, edit how the AI is told to style\n  it, run a prompt against a committed dataset fixture (so inputs never move\n  between runs), and see the generated DGMO + rendered image side by side. The\n  picker doubles as a coverage bar; \"Compare 3×\" renders no-guidance vs your\n  tips for a by-eye check; Save validates and writes back to\n  `language-reference.md`.\n\nThese tools are dev-only and never bundled into the published server. (The\nstandalone `pnpm harness` and `pnpm studio` scripts still run a single tool each\nif you ever want one in isolation.)\n\n## Contributing & releases\n\nDevelopment setup and the release workflow live in [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## License\n\nMIT\n",
  "bytes": 9997,
  "sha": "34ec84cc21aafae20451380cb21a6dd910d281d81004ea66bf5f375d2771b9a6",
  "repo_slug": "diagrammo/dgmo-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_diagrammo_dgmo_mcp_6164508c/readme"
}