Install dgmo into your AI tool in 30 seconds

Don't want to install anything? Point your model athttps://diagrammo.app/llms.txt— a small index that links one plain-text syntax file per chart type, so the model fetches a few KB for the chart it's writing instead of the whole grammar. The MCP setup below adds direct rendering, sharing, and validation tools on top.

1.Install

bash
brew install diagrammo/dgmo/dgmo && dgmo install claude-code

Installs the /dgmo skill and configures the MCP server — no prompts. Restart Claude Code to activate.

2.Create a diagram

What the MCP server gives your AI

The @diagrammo/dgmo-mcpserver registers every tool below with your AI client. The AI calls them directly — you don't invoke them by name.

suggest_chart_type
— picks a chart type from a plain-English prompt
render_diagram
— renders DGMO to SVG or PNG
share_diagram
— generates a shareable diagrammo.app URL
validate_diagram
— checks DGMO syntax without rendering
list_chart_types
— enumerates every supported type
get_language_reference
— returns syntax docs (optionally per type)
get_examples
— pulls real-world examples from the gallery
preview_diagram
— opens an HTML preview in the browser (local only)
open_in_app
— opens in the Diagrammo desktop app (macOS) (local only)
check_app_installed
— reports whether the desktop app is installed (local only)
generate_report
— bundles diagrams into an HTML report with a TOC (local only)

The four marked local only open a browser or launch the desktop app, so they're offered when the server runs on your own machine and withheld when it runs somewhere else — see Run it anywhere.

Fetching DGMO grammar for an LLM? Point it athttps://diagrammo.app/llms.txt— it links one syntax file per chart type.

Run it anywhere — hosted agents, containers, a shared server

The setups above launch the server as a child process and talk to it over its standard input and output, which needs the server and your AI tool on the same machine. Where they aren't — a hosted agent platform like Dify, a Docker container, one server shared by a team — start it as an HTTP endpoint instead.

bash
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 platform can express. Standard input and output stays the default, so nothing you've already configured changes.

FlagVariableDefaultWhat it does
--httpMCP_TRANSPORT=httpoffServe streamable HTTP instead of stdio
--port <n>MCP_PORT3333Port to listen on
--host <addr>MCP_HOST127.0.0.1Interface to bind
--path <path>MCP_PATH/mcpPath the endpoint answers on
--allow-host <h>MCP_ALLOWED_HOSTSloopbackExtra Host headers to accept, repeatable
--allow-origin <o>MCP_ALLOWED_ORIGINSunsetOrigin headers to accept, repeatable

Each request is served on its own — nothing is kept between calls — so one endpoint can serve several people's agents at once. The four tools markedlocal only above aren't offered here, because opening a browser or launching the desktop app would happen on the machine running the server rather than on yours; calling one names itself rather than looking like a typo.

The server has no authentication of its own.It binds loopback and rejects requests carrying a Hostheader it wasn't told to expect, 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-hostfor the hostname it'll be reached by. Runnpx -y @diagrammo/dgmo-mcp --helpto print all of this from the version you have.