Diagrams MCP Server logo

Diagrams MCP Server

Read, edit, render, compare, generate, and export PlantUML and Mermaid diagrams alongside project code.

Install Diagrams MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "diagrams-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "diagrams-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 15 tools correctly ().

Overview

Diagrams MCP Server MCP server manages PlantUML and Mermaid files in a project-scoped diagrams directory. It exposes MCP tools for listing, reading, creating, replacing, deleting, rendering, exporting, and comparing diagrams, plus heuristic code-based generation and consistency checks. Reach for it when diagrams should remain editable files beside the code and changes need explicit review before persistence. Rendering uses local PlantUML or Mermaid CLI tools, with optional remote PlantUML fallback.

Use cases

  • List diagrams stored in a project
  • Review and update diagram source
  • Render architecture diagrams for inspection
  • Check diagram entities against source code
  • Generate starter diagrams from code

Key features

  • Manage PlantUML and Mermaid files
  • Render SVG and PNG images
  • Export diagrams as self-contained HTML
  • Generate class and sequence drafts
  • Compare diagram revisions
  • Detect possible code-documentation drift

Tools15

What Diagrams MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~17.6k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 56d

What it can do

From the 15 tools this server returned when we ran it; 15 declare their own safety hints.

Runs commands · 1Can delete or modify data · 3Handles credentials · 15Makes network requests · 4Read-only tools · 11
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age66 days
Maintainers1

Observed 2026-11-15 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · diagrams-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads488Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed15Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Diagrams MCP Server works

What Diagrams MCP Server MCP server does

Diagrams MCP Server MCP server gives an MCP client a controlled interface to PlantUML and Mermaid source files stored near a codebase. The diagram files remain the editable source of record. Tools can discover files, return complete or paged source, create new files, replace existing content, and remove files. Path handling is relative to the configured diagrams root, and traversal outside that root is rejected.

The server also supports presentation and review workflows. It can render a stored diagram as SVG or PNG, return a self-contained HTML export, or save that HTML inside the diagrams root. Exported HTML embeds the rendered SVG and can include the original source in a collapsible block. Saved exports use a new .html target and do not appear as diagrams in normal CRUD operations.

How it works

The MCP client starts the process and communicates over standard input and output. Diagnostics go to standard error. PROJECT_ROOT defines the code-analysis boundary, while DIAGRAMS_DIR selects diagram storage; both are resolved when the server starts. If unset, the project root defaults to the process working directory and the diagrams root defaults to a diagrams directory beneath it.

Generation tools read a bounded code scope and produce PlantUML or Mermaid text without writing it. Class generation extracts declaration names and some evidenced inheritance relationships. Sequence generation uses static call-site patterns, so it does not claim runtime order or asynchronous behavior. Templates can produce class, sequence, C4-context, or project-defined starter source. The caller must review generated output and explicitly invoke diagrams_create or diagrams_update to save it.

The consistency checker compares diagram entity names with identifiers found in source files. It is heuristic rather than semantic analysis, and scans may be capped at 5,000 files. Results identify matched and unmatched names as review evidence, not as a definitive architecture verdict. diagrams_diff compares two stored or inline sources and can report entity changes, heuristic renames, and optional sequence call-order differences.

Tools and capabilities

The Diagrams MCP Server MCP server exposes tools for:

  • Listing PlantUML and Mermaid files with type filters, metadata, and explicit pagination.
  • Reading complete source or bounded character windows without silent truncation.
  • Creating, replacing, and deleting diagram files with extension and basic syntax checks.
  • Rendering diagrams to SVG or PNG and producing offline-capable HTML bundles.
  • Generating class and sequence drafts from code, or starter diagrams from built-in and custom templates.
  • Checking diagram names against project code, comparing diagram revisions, and scaffolding TypeScript or JavaScript classes from diagram entities.

Generated and templated source is returned for inspection; it is not persisted automatically. Create and update operations require full source content. Updates replace the entire file rather than applying a partial edit.

Setup and configuration

Install the published package with npm install -g diagrams-mcp-server, then run diagrams-mcp-server setup from the project directory. Setup can register the server for Claude Code, Codex, Cursor, or VS Code. Other stdio MCP clients can launch the command directly or through npx.

Rendering dependencies are separate from the server package. Mermaid rendering requires the mmdc executable, which can be installed with npm install -g @mermaid-js/mermaid-cli. PlantUML rendering prefers a local plantuml command. If that command is unavailable, remote fallback requires ALLOW_REMOTE_PLANTUML=true; DISABLE_REMOTE_PLANTUML=true overrides the fallback. Remote rendering sends PlantUML source to the configured HTTPS rendering service, so it should be enabled only when that transfer is acceptable.

Limitations and notes

Basic validation checks PlantUML boundaries and recognized Mermaid declarations; it is not full language validation. Rendered local images and finished HTML bundles are limited to 5,000,000 bytes. Generated diagrams, consistency reports, scaffolds, and rename detection are heuristic. Large scans, entity lists, messages, relationships, template discovery, and export content report caps or fail rather than silently returning incomplete data. The project is described as a technical preview and requires Node.js 18 or newer.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Diagrams MCP Server

Diagrams MCP Server is an MCP server that connects AI clients to PlantUML and Mermaid files in a project. Its main tools list and read diagrams, create or update source, render images, export HTML, compare revisions, check consistency against code, and generate heuristic diagram drafts without automatically writing generated output.

Install it with `npm install -g diagrams-mcp-server`, then run `diagrams-mcp-server setup` from the project directory. Setup supports Claude Code, Codex, Cursor, and VS Code registration. Other stdio MCP clients can launch the command directly or use `npx`.

Mermaid rendering requires the `mmdc` CLI, while PlantUML rendering prefers a local `plantuml` CLI. The server package does not install either renderer. Mermaid CLI can be installed with `npm install -g @mermaid-js/mermaid-cli`; PlantUML can optionally use an explicitly enabled remote fallback.

Yes, Diagrams MCP Server supports Cursor setup. Run `diagrams-mcp-server setup --client cursor --yes`; use `--scope project` to pin the configuration to the current project. Reload Cursor afterward and use `diagrams_list` to verify the connection.

Yes, it can draft PlantUML or Mermaid class and sequence diagrams from a bounded project scope. The output is heuristic, returned for review, and never saved automatically. Use `diagrams_create` after reviewing the generated source if it should become a stored diagram.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDiagrams MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/diagrams-mcp-server?style=directory)](https://allmcps.com/mcp/diagrams-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/diagrams-mcp-server"><img src="https://allmcps.com/api/badge/diagrams-mcp-server?style=directory" alt="Diagrams MCP Server on AllMCPs" /></a>