Skip to main content
Glama
dgmo-mcp
by diagrammo

@diagrammo/dgmo-mcp

Turn a conversation into a real diagram — without leaving your AI tool.

npm version npm downloads license

This MCP server gives Claude (and any MCP-compatible AI tool) the ability to render sequence diagrams, flowcharts, ER diagrams, C4 architecture, gantt charts, and 40+ other chart types from concise text markup — then hand the result off to a full editor for refinement. Ask for a diagram in chat; get a real one back.

What you can do

Ask in plain language — "diagram the auth flow as a sequence", "chart the Q3 plan as a gantt", "draw our services as a C4 diagram" — and Claude writes the markup and renders it. The markup stays readable and diffable:

flowchart Mutiny Resolution
direction-tb

[Sail]     Set sail under the captain
{Trouble?} Discontent in the crew?
{Vote}     Crew vote called
[Mutiny]   Seize the ship

(Sail) -> (Trouble?)
(Trouble?) -Yes-> (Vote)
(Vote) -Mutiny-> (Mutiny)

→ renders to the flowchart above. All rendering happens locally — no diagram data leaves your machine.

Related MCP server: drawio

Tools

Tool

What it does

Over HTTP

render_diagram

Render DGMO markup to SVG or PNG

yes

validate_diagram

Check markup and report parse errors, without rendering

yes

suggest_chart_type

Suggest the chart types that fit a description

yes

list_chart_types

List all supported chart types, marking the beta ones

yes

get_language_reference

Get DGMO syntax documentation for accurate generation

yes

get_examples

Fetch worked examples for a chart type

yes

share_diagram

Get a shareable diagrammo.app URL — hand your diagram to the web editor

yes

open_in_app

Open the diagram straight into the Diagrammo desktop app for editing

no

check_app_installed

Report whether the desktop app is installed

no

preview_diagram

Render one or more diagrams and open an HTML preview in the browser

no

generate_report

Build a polished multi-section HTML report with ToC and optional source

no

put_space_diagram

Write a diagram into a Diagrammo Cloud space, by folder and title

yes

get_space_diagram

Read a diagram from a Cloud space, by id or by folder and title

yes

list_space_diagrams

List every diagram in a Cloud space

yes

The three space tools send the diagram to Diagrammo Cloud. They need a space API key (minted on the Diagrammo account page) as DGMO_API_KEY in the server's environment — never as a tool argument, so the key stays out of the transcript.

share_diagram and open_in_app are the bridge out of chat: a diagram Claude generates becomes something you can refine, restyle, and embed — see below.

The four marked no open a browser or launch the desktop app. Over HTTP that would happen on the machine running the server rather than on yours, so they are not offered there — see Serving over HTTP.

Beyond the MCP server

The MCP server is one entry point into Diagrammo — a whole ecosystem built on the same DGMO markup. Generate in chat, refine in a real editor, embed anywhere:

  • diagrammo.app — the desktop app. open_in_app drops an AI-generated diagram straight into it, with live preview, palettes, and export.

  • online.diagrammo.app — a full editor in the browser, zero install. share_diagram URLs open right here.

  • Docs integrations — drop DGMO fenced code blocks into your docs site: remark-dgmo, astro-dgmo, docusaurus-plugin-dgmo, fumadocs-dgmo.

  • Obsidian — the Diagrammo Diagrams community plugin renders DGMO in your vault.

  • CLI — npx @diagrammo/dgmo-cli file.dgmo -o out.png, or install it with npm install -g @diagrammo/dgmo-cli (macOS and Linux).

One markup, everywhere. A diagram you generate here renders identically in the app, in your docs, and in Obsidian — because they all speak DGMO.

→ Try it free at diagrammo.app

Setup

Easiest — one command

Install the dgmo CLI and let it wire everything up:

npm install -g @diagrammo/dgmo-cli   # macOS and Linux
dgmo install                         # auto-detects Claude Code, Codex, Claude Desktop, Cursor, …

Prefer Homebrew or pacman? See diagrammo.app/dev.

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, …).

Manual configuration

Prefer to edit configs yourself? Point any MCP client at the server via npx (no global install needed):

Claude Code — .claude/settings.local.json; Claude Desktop — ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "dgmo": {
      "command": "npx",
      "args": ["-y", "@diagrammo/dgmo-mcp"]
    }
  }
}

If you have the dgmo CLI installed, { "command": "dgmo", "args": ["mcp"] } works too. Restart the client after saving — the tools appear automatically.

Serving over HTTP

The setups above launch the server as a child process and talk to it over its standard input and output. That needs the server and the client on the same machine. Where they are not — a hosted agent platform, a container, one server shared by several people — start it as an HTTP endpoint instead. The same endpoint also suits one machine, when you want a single server always running for every AI tool you use:

dgmo mcp --http                              # with the dgmo CLI installed
npx -y @diagrammo/dgmo-mcp --http            # http://127.0.0.1:3333/mcp
MCP_TRANSPORT=http MCP_PORT=8080 npx -y @diagrammo/dgmo-mcp

Every option takes a flag or an environment variable, whichever your setup can express:

Flag

Variable

Default

What

--http

MCP_TRANSPORT=http

off

Serve streamable HTTP instead of stdio

--port <n>

MCP_PORT

3333

Port to listen on

--host <addr>

MCP_HOST

127.0.0.1

Interface to bind

--path <path>

MCP_PATH

/mcp

Path the endpoint answers on

--allow-host <h>

MCP_ALLOWED_HOSTS

loopback

Extra Host headers to accept, repeatable

--allow-origin <o>

MCP_ALLOWED_ORIGINS

own origin

Origin headers to accept, repeatable

Each request is served independently — no sessions, nothing kept between calls — so one endpoint can serve several clients at once.

The server has no authentication of its own. It binds loopback by default and rejects requests carrying a Host header it was not told to expect, or an Origin header other than its own unless --allow-origin names it, which is enough for a client on the same machine or inside the same container. Anything reachable from a wider network needs your own authentication in front of it, and --allow-host for the hostname it will be reached by. Binding a non-loopback interface without naming a host prints a warning saying so.

--help prints all of this from the installed version.

Keep it running

Run the server as a background service so it starts at login and restarts if it stops. Change the dgmo path to what which dgmo prints.

Linux — systemd user service, saved as ~/.config/systemd/user/dgmo-mcp.service:

[Unit]
Description=Diagrammo MCP server over HTTP
After=network.target

[Service]
ExecStart=%h/.local/bin/dgmo mcp --http
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin
Restart=on-failure
RestartSec=3

[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable --now dgmo-mcp

macOS — launchd agent, saved as ~/Library/LaunchAgents/app.diagrammo.mcp.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key><string>app.diagrammo.mcp</string>
  <key>ProgramArguments</key>
  <array>
    <string>/opt/homebrew/bin/dgmo</string><string>mcp</string><string>--http</string>
  </array>
  <key>EnvironmentVariables</key>
  <dict><key>PATH</key><string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string></dict>
  <key>RunAtLoad</key><true/>
  <key>KeepAlive</key><true/>
</dict>
</plist>
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/app.diagrammo.mcp.plist

Then point each AI tool at http://127.0.0.1:3333/mcp as a streamable-HTTP MCP server.

Privacy

All rendering is local. Your diagram markup and the images it produces never leave your machine, except when you explicitly call share_diagram (which encodes the diagram into a diagrammo.app URL). See the privacy terms.

Dev hub (AI-tuning tools)

pnpm hub

One command, one server, one browser tab. The hub opens a tabbed shell over the three AI-tuning dev tools — switch between them with the top tabs, no separate ports or commands to remember:

  • Trigger tuning — edit the phrase/concept vocabulary that drives suggest_chart_type, score prompts live, save back to triggers.json.

  • LLM judge — judge chart-type descriptions against prompts with claude -p.

  • Guidance studio — author the per-type styling guidance the server delivers (the <!-- TIPS --> blocks in dgmo's language-reference.md, sliced into get_language_reference): pick a type, edit how the AI is told to style it, run a prompt against a committed dataset fixture (so inputs never move between runs), and see the generated DGMO + rendered image side by side. The picker doubles as a coverage bar; "Compare 3×" renders no-guidance vs your tips for a by-eye check; Save validates and writes back to language-reference.md.

These tools are dev-only and never bundled into the published server. (The standalone pnpm harness and pnpm studio scripts still run a single tool each if you ever want one in isolation.)

Contributing & releases

Development setup and the release workflow live in CONTRIBUTING.md.

License

MIT

Available Tools

14 tools
check_app_installedA
Read-only

Check whether the Diagrammo desktop app is installed. Returns a sentence naming the output route the product prefers, plus JSON { installed, paths, platform }. Detection is macOS-only; other platforms always report not installed. The answer does not change within a session, so one call is enough before deciding how to show a diagram: when installed, the preferred route is open_in_app with filePath; otherwise share_diagram.

Inputs: no named parameters.

generate_reportA

Generate a polished HTML report with multiple DGMO diagrams, table of contents, and optional source blocks. Opens in browser by default. For DGMO syntax call get_language_reference.

Inputs: title (required), sections (required), open, theme, +3 more.

get_examplesA

Get example DGMO diagrams for a chart type. Returns real-world examples from the gallery that demonstrate syntax patterns. Use these as few-shot references when generating new diagrams.

Inputs: chart_type.

get_language_referenceA
Read-onlyIdempotent

Get the DGMO language reference. With chart_type, returns that type's section plus the universal rules every diagram follows (the closed color set, titles, categorize-and-color). Without it, returns the entire reference for all chart types, which is very large (hundreds of KB); pass chart_type whenever the type is known. Errors when the type has no documented section — call list_chart_types for the valid ids. suggest_chart_type already appends the chosen type's section, so a call here is only needed after the user picks a type or when switching types.

Inputs: chart_type.

get_space_diagramA
Read-onlyIdempotent

Read a diagram from a Diagrammo Cloud space, by id or by title in folder. Titles match case-insensitively. Returns JSON { id, title, folder, chartType, version, updatedAt, source }. Needs DGMO_API_KEY (a space API key) in the server environment. Errors when the key is refused (401/403) or nothing matches (404); list_space_diagrams shows what is there.

Inputs: space_id (required), id, title, folder.

list_chart_typesA
Read-onlyIdempotent

List all supported DGMO chart types with descriptions.

Inputs: no named parameters.

list_space_diagramsA
Read-onlyIdempotent

List every diagram in a Diagrammo Cloud space. Returns JSON { diagrams: [{ id, title, folder, chartType, version, updatedAt }] }, sorted by folder then title. Needs DGMO_API_KEY (a space API key) in the server environment.

Inputs: space_id (required).

open_in_appA

Open a DGMO diagram in the Diagrammo desktop app (macOS only). Falls back to browser preview if the app is not installed. Pass filePath to open a saved .dgmo file directly — the app opens THAT file, so in-app edits autosave back to it (one editable source of truth, live re-render). This is the preferred path when the app is installed: write the .dgmo source first, then open it here. Omit filePath for an ephemeral diagram (sends a deep link; the app creates its own copy).

Inputs: dgmo (required), filePath.

preview_diagramA

Render one or more DGMO diagrams and open an HTML preview in the browser. Supports theme toggle and optional source display. For DGMO syntax call get_language_reference.

Inputs: diagrams (required), theme, palette, include_source.

put_space_diagramA
DestructiveIdempotent

Write a DGMO diagram into a Diagrammo Cloud space, by folder and title: updates the diagram with that title in that folder, or creates it (private) when there is none. Re-sending identical source changes nothing. Returns JSON { action: "created" | "updated", id, title, folder, version }. Needs DGMO_API_KEY (a space API key) in the server environment. Errors name the cause: 401 bad or revoked key, 403 not allowed, 404 no such space or folder, 409 another write landed first (call again). Call validate_diagram first; this does not validate.

Inputs: dgmo (required), title (required), space_id (required), folder.

render_diagramA
Read-onlyIdempotent

Render DGMO markup to SVG or PNG. Returns SVG text or base64 PNG image. When format is "png", also saves the image to a temp file and returns the path. For DGMO syntax call get_language_reference.

Inputs: dgmo (required), theme, width, format, +2 more.

share_diagramA
Read-onlyIdempotent

Generate a shareable diagrammo.app URL for a DGMO diagram. The source is compressed into the URL fragment, so nothing is uploaded and the link works for anyone who opens it; returns the URL as text. Errors when the compressed source exceeds the URL size limit (the error reports both sizes) — split or simplify the diagram, or use open_in_app / render_diagram instead. The source is not validated here; call validate_diagram first.

Inputs: dgmo (required).

suggest_chart_typeA

Suggest the best DGMO chart type for a user's plain-English diagram request.

Call this first when creating a new diagram: it ranks the chart types against the request and, on a confident pick, appends that type's language-reference section, so no separate get_language_reference call is needed. It is not needed when editing an existing diagram, whose first line already declares its type.

Returns one of two shapes: (1) a confident pick (high/medium) with the top match's syntax, or (2) an '⚠️ ASK THE USER' result when the choice is ambiguous or nothing matched. On an ASK-THE-USER result, present the listed candidates to the user and wait for their choice before generating, because the request alone does not settle which type they want.

Inputs: prompt (required).

validate_diagramA

Validate DGMO markup without rendering. Returns structured parse errors and warnings. Much faster than render_diagram — use this to check syntax before rendering.

Inputs: dgmo (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    A4.1/5.0

    Scored across 14 tools

    Disambiguation4/5

    The set cleanly separates authoring aids (suggest_chart_type, get_language_reference, get_examples, validate_diagram) from output routes (render_diagram, preview_diagram, share_diagram, open_in_app) and cloud storage operations. The main risk is among the output routes—render_diagram vs preview_diagram and share_diagram vs open_in_app could momentarily confuse, but descriptions make the destination and return type clear. check_app_installed further disambiguates routing decisions.

    Naming Consistency4/5

    All tools use snake_case with a verb_noun pattern, and the cloud tools consistently scope with the space_ prefix (put/get/list_space_diagram). Minor deviations like open_in_app and check_app_installed break the strict verb_noun_ pattern but remain readable and intentional. Overall predictable.

    Tool Count5/5

    14 tools fit comfortably in the well-scoped range and each covers a distinct facet of the diagram workflow (chartering, reference, validation, rendering, output, cloud persistence). No tool feels redundant or padded.

    Completeness4/5

    The surface covers the full authoring lifecycle from chart suggestion through validation, rendering, sharing, and report generation, plus cloud read/write/list. The one notable gap is a delete_space_diagram operation—cloud storage supports create/read/list but no removal. Agents can otherwise complete all core workflows.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server that generates Mermaid diagrams with live browser preview, supports real-time rendering and SVG/PNG export.
      13
      -
    • A
      license
      A
      quality
      A
      maintenance
      MCP server for creating and editing diagrams using draw.io. Allows generating diagrams from Mermaid or XML, searching shapes, and opening them in draw.io for export.
      2
      0
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for generating and editing architecture diagrams from natural language or code, supporting formats like Terraform, docker-compose, Kubernetes, SQL, Mermaid, and PlantUML.
      2
      MIT