Agentic Mermaid logo

Agentic Mermaid

Render, verify, describe, and safely edit Mermaid diagrams through local or hosted MCP workflows.

Install Agentic Mermaid

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": {
    "agentic-mermaid": {
      "command": "npx",
      "args": [
        "-y",
        "--no-install",
        "agentic-mermaid"
      ]
    }
  }
}

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

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y --no-install agentic-mermaid

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Agentic Mermaid connects MCP-capable coding agents with Mermaid diagram rendering, verification, description, and structured editing. It can return SVG, PNG, ASCII, Unicode, or JSON layout output, while built-in styles and palettes control visual presentation. Use the local stdio server for private or offline work, or the hosted MCP endpoint for remote requests. Structured edits follow a parse, narrow, mutate, verify, and serialize workflow instead of rewriting diagram source blindly.

Use cases

  • Render Mermaid diagrams as SVG or PNG for documentation
  • Review diagrams in terminals with ASCII or Unicode output
  • Apply typed edits while preserving diagram structure
  • Verify Mermaid source before publishing a diagram
  • Inspect diagram positions through JSON layout output

Key features

  • Local stdio MCP server
  • SVG, PNG, ASCII, Unicode, and JSON layout output
  • Structured Mermaid parsing and mutation
  • Built-in styles and composable palettes
  • Capability discovery for supported operations
  • Optional hosted MCP endpoint

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.

27/31 checks healthy over the last 99d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · agentic-mermaid (npm)

Adoption & maintenance

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

GitHub stars71Stargazers on the source repository.
npm downloads2.9kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Agentic Mermaid works

What Agentic Mermaid does

Agentic Mermaid gives coding agents an MCP interface for working with Mermaid diagrams. Agents can create or modify Mermaid source, inspect whether a diagram is valid, render it into several output formats, and describe or review the resulting layout. The same project is also available as a command-line tool and JavaScript library, but the MCP server is useful when an MCP-capable agent needs diagram operations without invoking shell commands directly.

Supported render outputs include SVG, PNG, ASCII, Unicode, and JSON layout data. SVG rendering through the synchronous JavaScript API does not require a DOM or Puppeteer. Built-in visual options include styles such as watercolor, blueprint, hand-drawn, and publication-figure, along with palettes including nord-light and dracula. Styles and palettes can be combined, and custom JSON styles can define colors, fonts, strokes, fills, and backdrops.

How it works

The local server starts over stdio with the installed package's MCP command. Agents can use the server to render diagrams or perform structured edits through the same mermaid.* SDK naming used by Code Mode. For an existing diagram, the recommended sequence is to parse the source, narrow it to the relevant diagram family, apply a typed mutation, verify the result, and serialize the updated Mermaid source.

Typed operations preserve modeled structure, such as changing a flowchart node label without breaking its connections. Source-preserving behavior is available for selected Class and Flowchart operations, and inputs containing unmodeled syntax retain their source. Verification checks structural and geometry issues before the result is returned.

Setup and configuration

Install the package with npm, Bun, or pnpm. Node.js 22 or later, or Bun 1.4.0 or later, is required, and the package uses ESM imports. Start the local MCP server with:

Terminal
npx --no-install agentic-mermaid mcp

The repository also provides an initialization command that can add an AGENTS.md section, a root skills/ bundle, and an .mcp.json example without overwriting existing content. Agent instructions and capability discovery are available through the CLI, including am --agent-instructions and am capabilities --json.

An optional public endpoint is available at https://agentic-mermaid.dev/mcp. It uses MCP JSON-RPC rather than REST render requests and supports HTTP-based MCP access.

Tools and capabilities

  • Render Mermaid diagrams as SVG, PNG, ASCII, Unicode, or JSON layout.
  • Apply built-in styles, palettes, and custom JSON styling.
  • Parse registered Mermaid syntax and narrow it to a supported diagram family.
  • Make typed, source-aware edits and verify the resulting diagram.
  • Discover supported diagrams and operations with capability reporting.
  • Use local files, including locally generated PNG output, through local workflows.

Limitations and notes

The hosted endpoint is unauthenticated, limits inputs to 64 KB, and returns PNG data as base64. Hosted requests send Mermaid source or agent code to the service, so private or larger diagrams are better handled with the local stdio server. The package is ESM-only; CommonJS projects must use dynamic import().

Reviews

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

Frequently Asked Questions about Agentic Mermaid

Agentic Mermaid is an MCP server that connects coding agents to Mermaid diagram workflows. Its main tools support rendering, verification, description, and structured editing, with outputs including SVG, PNG, ASCII, Unicode, and JSON layout. It can run locally over stdio or through the optional hosted MCP endpoint.

Install the `agentic-mermaid` package with npm, Bun, or pnpm, then start it with `npx --no-install agentic-mermaid mcp`. Node.js 22 or later, or Bun 1.4.0 or later, is required. The package is ESM-only.

Yes, Cursor can use Agentic Mermaid as a standard MCP server through its local stdio configuration. The server does not require a client-specific integration; configure Cursor to launch `npx --no-install agentic-mermaid mcp`.

Yes, it supports typed structured edits followed by verification and serialization. The recommended flow parses the source, narrows it to a diagram family, applies a mutation, verifies structural and geometry issues, and then writes Mermaid source while preserving supported source details.

Yes, an optional unauthenticated endpoint is available at `https://agentic-mermaid.dev/mcp`. It accepts MCP JSON-RPC, caps inputs at 64 KB, and returns PNG output as base64. Hosted requests send source or code to the service.

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 PreviewAgentic Mermaid AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agentic-mermaid?style=directory)](https://allmcps.com/mcp/agentic-mermaid)
HTML Embed
<a href="https://allmcps.com/mcp/agentic-mermaid"><img src="https://allmcps.com/api/badge/agentic-mermaid?style=directory" alt="Agentic Mermaid on AllMCPs" /></a>