# dgmo-mcp [Health: Active]

**Category:** 📊 Data Visualization  
**Repository:** https://github.com/diagrammo/dgmo-mcp  
**GitHub Stars:** 3  
**npm Downloads (last month):** 2122  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/dgmo-mcp

## Description
Render 29 diagram and chart types to SVG/PNG with browser preview and HTML reports.

## Tools
Capabilities this server exposes over MCP:

- **render_diagram** — Render DGMO markup to **SVG or PNG
- **validate_diagram** — Check markup and report parse errors, without rendering
- **suggest_chart_type** — Suggest the chart types that fit a description
- **list_chart_types** — List all supported chart types, marking the beta ones
- **get_language_reference** — Get DGMO syntax documentation for accurate generation
- **get_examples** — Fetch worked examples for a chart type
- **share_diagram** — Get a shareable **diagrammo.app** URL — hand your diagram to the web editor
- **open_in_app** — Open the diagram **straight into the Diagrammo desktop app** for editing
- **check_app_installed** — Report whether the desktop app is installed
- **preview_diagram** — Render one or more diagrams and open an **HTML preview** in the browser
- **generate_report** — Build a polished **multi-section HTML report** with ToC and optional source
- **put_space_diagram** — Write a diagram into a **Diagrammo Cloud space**, by folder and title
- **get_space_diagram** — Read a diagram from a Cloud space, by id or by folder and title
- **list_space_diagrams** — List every diagram in a Cloud space

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## What dgmo-mcp does

dgmo-mcp exposes Diagrammo's DGMO markup through MCP tools. Agents can turn concise text definitions into SVG or PNG output and work with diagram types such as sequence diagrams, flowcharts, ER diagrams, C4 architecture diagrams, and Gantt charts. The server also supports chart-type discovery, syntax guidance, examples, validation, browser previews, and multi-section HTML report generation.

The generated markup remains readable and diffable, which makes it suitable for producing diagrams from natural-language requests while retaining a text representation for review or revision. `share_diagram` creates a URL for the Diagrammo web editor, and `open_in_app` sends a diagram to the Diagrammo desktop app for editing.

## How it works

An MCP client invokes a tool with DGMO markup or a description of the desired visualization. `validate_diagram` checks syntax and returns parse errors without rendering. `render_diagram` produces SVG or PNG output, while `preview_diagram` renders one or more diagrams and opens an HTML preview in a browser. `generate_report` creates an HTML report with multiple sections, a table of contents, and optional source content.

Rendering happens locally, so diagram data stays on the machine running the server for those operations. Browser and desktop actions also occur on the machine hosting the server. The server can run over standard input/output for a local MCP client or as a streamable HTTP endpoint for clients and agents that connect remotely. HTTP requests are handled independently, without persistent sessions.

## Setup and configuration

The package can be run directly with `npx`:

```bash
npx -y @diagrammo/dgmo-mcp
```

For a local MCP client, configure the command as the server process:

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

The Diagrammo CLI can also install the MCP configuration automatically with `dgmo install`, or run the server through `dgmo mcp`.

To serve MCP over HTTP, use `--http` or set `MCP_TRANSPORT=http`:

```bash
npx -y @diagrammo/dgmo-mcp --http
```

The HTTP endpoint defaults to `127.0.0.1:3333/mcp`. `MCP_PORT`, `MCP_HOST`, `MCP_PATH`, `MCP_ALLOWED_HOSTS`, and `MCP_ALLOWED_ORIGINS` adjust the listener and request checks. The HTTP server has no built-in authentication; expose it beyond a trusted local or container network only behind externally managed authentication.

Cloud-space operations require a Diagrammo space API key in `DGMO_API_KEY`. The key is read from the server environment rather than passed as a tool argument.

## Tools and capabilities

- Render DGMO markup as SVG or PNG.
- Validate markup and return parsing errors without rendering.
- Recommend chart types from a natural-language description.
- List supported chart types and identify beta types.
- Retrieve DGMO syntax reference material and chart-specific examples.
- Create Diagrammo web-editor links or open diagrams in the desktop app.
- Check whether the desktop app is installed.
- Open HTML previews in a browser.
- Generate multi-section HTML reports with a table of contents and optional source.
- Write, read, and list diagrams in a Diagrammo Cloud space.

## Limitations and notes

The browser-preview, HTML-report, desktop-app, and local app-check operations are not available when the server is accessed over HTTP, because they launch software on the server host. The three Cloud-space tools send diagram content to Diagrammo Cloud and require `DGMO_API_KEY`; other local rendering operations do not use that Cloud service. HTTP deployments need their own authentication layer when reachable from a wider network.

_Full upstream README: https://allmcps.com/mcp/dgmo-mcp/readme_

