Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Beautiful diagrams, made with your agent.
Agentic Mermaid is an open-source Mermaid toolkit for people who want AI agents to create diagrams that look finished: SVG and PNG renders, ASCII and Unicode for review, deterministic layout, and Style + Palette controls for brand colors, typography, strokes, fills, and backdrops.
It is forked from lukilabs/beautiful-mermaid. Published on npm as agentic-mermaid; the GitHub repository is adewale/agentic-mermaid; the canonical live site is agentic-mermaid.dev, a Cloudflare Workers deployment.

Live Demo & Samples Β· Live Editor
Docs: docs index Β· getting started Β· agent guide Β· agent API cookbook Β· design system Β· skills Β· fork differences Β· vs Mermaid & Beautiful Mermaid Β· changelog
Use it when you want to describe a diagram in plain language and get back something you can publish without a design cleanup pass.
| You want | Agentic Mermaid gives you |
|---|---|
| An agent to draft the diagram | Mermaid source plus a verified render path |
| Beautiful defaults | Built-in looks such as watercolor, blueprint, hand-drawn, and publication-figure |
| Brand fit | Style + Palette stacks and custom JSON palettes you can keep in your repo |
| Safe edits later | parseRegisteredMermaid β family narrower β mutate β verifyMermaid β serializeMermaid |
| Reviewable artifacts | SVG, PNG, ASCII, Unicode, and JSON layout from the same source |
The agent workflow is the guardrail behind the polish: agents should not guess from pixels, concatenate strings, or regenerate whole diagrams when a structured edit is available.
{ style: ['hand-drawn', 'dracula'] } stacks a look over a palette; discoverable full looks cover sketch, watercolor, blueprint, accessibility, print, operational, physical-media, architecture, and editorial/report use cases. Custom styles are plain JSON records any agent can author (docs/style-authoring.md). seed re-rolls the ink, never the layout.am, agentic-mermaid-mcp, agentic-mermaid, agentic-mermaid/agent, and the browser/workerd-safe agentic-mermaid/agent/core. Audit reports and trusted host-resource helpers remain repository tooling instead of published runtime entry points.For repository development, install from source and run the Bun entrypoints:
ESM-only.
agentic-mermaidships ES modules (there is no CommonJS build);require()consumers should use dynamicimport()instead. Requires Node β₯ 22.The
am β¦examples below name the published bin. After a project-local npm install, invoke it from a shell asnpx --no-install agentic-mermaid β¦(or from an npm script asam β¦). From a source checkout, usebun run bin/am.ts β¦instead.
Use agentic-mermaid/agent when you want one import path for styled renders, output formats, and the structured edit API.
CLI equivalent:
If your coding agent can read repo files, point it at:
skills/agentic-mermaid-diagram-workflow/SKILL.md for diagram authoring/editing.skills/agentic-mermaid-live-editor/SKILL.md for editor changes.If it only has shell access:
Zero-install prompt for a coding agent: read https://agentic-mermaid.dev/llms.txt and follow the parse β narrow β mutate β verify β serialize workflow. To wire Agentic Mermaid into another repo, run npx agentic-mermaid init-agent (or bun run bin/am.ts init-agent from a source checkout); it writes a non-clobbering AGENTS.md section, root skills/ bundle, and .mcp.json sample.
Use strict preview for human inspection and mutate --op/--ops for verified one-shot or batched edits.
For multi-step MCP edits, connect agentic-mermaid-mcp and use Code Mode execute(code) with the same mermaid.* SDK names. Stdio is the default transport; agentic-mermaid-mcp --transport http starts HTTP/SSE and managed PNG file/URL artifacts. See the agent API cookbook for copy-pasteable library, CLI, and MCP recipes.
Agentic Mermaid ships a Model Context Protocol server so MCP-capable agents can render and safely edit diagrams without shelling out.
agentic-mermaid-mcp runs a stdio server exposing execute (Code Mode sandbox), describe_sdk (one family's mutation schema on demand), render_png, and describe. Package runners can use npx -y agentic-mermaid mcp; the mcp argument routes the package-name binary to the same stdio server. Add --transport http for HTTP/SSE with managed PNG file/URL artifacts. See docs/mcp-http-transport.md and docs/mcp-code-mode-rationale.md.https://agentic-mermaid.dev/mcp (tools: execute, describe_sdk, render_svg, render_ascii, render_png, verify, describe, mutate, build; 64 KB input caps). Call describe_sdk for compact signatures or exact fields before authoring unfamiliar ops. It is MCP JSON-RPC only, not a REST render API. Hosted execute runs the same mermaid.* facade in a Cloudflare Dynamic Worker isolate with no network; hosted PNG returns base64 only.Local-first is the default posture: prefer the library, CLI, or a self-hosted MCP for anything sensitive, offline, larger than the hosted caps, or needing local PNG file/URL artifacts. The hosted endpoint is a public, unauthenticated convenience for zero-install render/verify/describe and bounded structured edits.
Directory maintainers can use the canonical MCP listing record. Hosted data handling is described in the MCP privacy notice.
Rules:
as<Family> narrower before mutating an existing structured diagram.kind, not type.verifyMermaid before every commit point.mutate on opaque fallback bodies; the narrower returns null for unmodeled syntax.Family support and its executable evidence are projected from the
FamilyDescriptor registry into the generated
Section A capability report.
See diagram families for syntax examples and
compatibility notes.
useMemo rendering.examples/agent-loop.tsexamples/mcp-vs-cli-complex-diagrams.tsexamples/agent-improve-auth-flow.tsAgentic Mermaid is a fork of Beautiful Mermaid by Luki Labs. The ASCII rendering engine is based on mermaid-ascii by Alexander Grooff and extended for Agentic Mermaid.
MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/agentic-mermaid)<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>