
MCP Mermaid
Generate Mermaid diagrams and charts with AI dynamically, exporting to SVG, PNG, base64, file, or shareable URLs.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y mcp-mermaidPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-mermaid": {
"command": "npx",
"args": [
"-y",
"mcp-mermaid"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Node.js with npx (or a global `npm install -g mcp-mermaid`)
- Optional: Docker, to run the published susuperli/mcp-mermaid image
About MCP Mermaid
MCP Mermaid is an MCP server for generating Mermaid diagrams and charts dynamically from AI models. It supports the full Mermaid syntax, configurable theme and background color, and multiple export formats including base64, SVG, raw mermaid, on-disk file, and shareable svg_url / png_url links. Mermaid source is validated so models can iteratively correct syntax. It defaults to stdio transport and also offers SSE and Streamable HTTP transports plus Docker images.
Tools & capabilities (1)
generate_mermaid_diagramGenerate a Mermaid diagram or chart from Mermaid syntax. Supports configuring backgroundColor and theme, and exporting to base64, svg, mermaid, file, svg_url, or png_url. Use outputType: "file" to save a PNG to disk, or the URL modes to produce shareable mermaid.ink links. Mermaid source is validated to support multi-round correction. (Tool functionality described in the README; exact tool name is not literally stated there.)
What this server can do
MCP Mermaid provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Have an AI assistant turn a prompt into a Mermaid flowchart, sequence, or other diagram
- Export generated diagrams as PNG files on disk for use by AI agents
- Produce shareable diagram links via mermaid.ink for embedding or collaboration
- Iteratively validate and correct Mermaid syntax across multiple model turns
Security notes
Output modes svg_url and png_url upload/share diagrams via public mermaid.ink links; avoid them for sensitive content and prefer file, svg, or base64 output.
MCP Mermaid FAQ
Which output formats are supported?
base64, svg, mermaid, file, and the remote-friendly svg_url and png_url. Use outputType: "file" to automatically save PNG diagrams to disk.
What transports does it support?
stdio by default, plus SSE (default endpoint /sse, port 3033) and Streamable HTTP (default endpoint /mcp, port 1122). Transport, port, and endpoint are configurable via the -t, -p, and -e CLI options.
Can I run it with Docker?
Yes. Pull susuperli/mcp-mermaid:latest and run it with --transport sse (default) or --transport streamable --port 1122.
Alternatives to MCP Mermaid
Compare all alternatives →Popular community server that feeds Figma layout data to coding agents via a Figma API token.
Generate beautiful, modern UI components from natural-language descriptions inside your IDE.
Give AI assistants full access to shadcn/ui v4 components, blocks, demos, and metadata across React, Svelte, Vue, and React Native.