mermaid-mcp
Renders Mermaid diagram definitions to PNG, SVG, PDF, or editable draw.io XML with configurable themes, background, width, and optional file output.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mermaid-mcpDraw me a flowchart of the OAuth login flow"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mermaid-mcp
An MCP server that renders Mermaid diagrams to PNG or SVG. Give your LLM the ability to turn diagram syntax into actual images.
Quick start
Claude Code
claude mcp add mermaid -- npx -y mermaid-render-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": ["-y", "mermaid-render-mcp"]
}
}
}Note: the first run downloads headless Chromium (~150 MB), so the initial startup takes a few minutes.
From source
git clone https://github.com/tci-nebula/mermaid-mcp.git
cd mermaid-mcp
npm install
claude mcp add mermaid -- node /path/to/mermaid-mcp/server.jsRelated MCP server: Mermaid-MCP
Tool: render_diagram
Parameter | Type | Default | Description |
| string | (required) | Mermaid diagram definition |
|
|
| Output format ( |
|
|
| Visual theme |
| string |
| CSS colour or |
| number |
| Canvas width in px (PNG only) |
| boolean |
| Scale the PDF page to fit the diagram (PDF only) |
| string | — | Write the result to this file path instead of returning base64 |
Returns the rendered image as base64-encoded data so MCP clients can display it inline — or, with output_path, writes the file to disk (handy for PDFs destined for printing or formal document submission).
Example
Ask your LLM:
"Draw me a flowchart of the OAuth login flow"
It generates the Mermaid syntax, calls render_diagram, and you get back a PNG.
How it works
The server shells out to @mermaid-js/mermaid-cli (bundled as a dependency), which uses a headless Chromium to render diagrams. First npm install downloads Chromium (~150 MB), so it takes a few minutes.
Requirements
Node.js 18+
Roadmap
PDF export (formal/legal document workflows)
draw.io XML export (editable diagrams — flowcharts)
npm package (
mermaid-render-mcp)Remote-hosted server option
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.1391232MIT
- Alicense-qualityDmaintenanceAn MCP server that converts text inputs into visualized flowcharts, enabling AI clients to generate high-quality Mermaid diagrams directly from natural language descriptions or structured text.11MIT
- AlicenseAqualityDmaintenanceAn MCP server that generates diagrams from Mermaid code in multiple formats (PNG, PDF, SVG).21MIT
- Flicense-qualityDmaintenanceMCP server that generates Mermaid diagrams with live browser preview, supports real-time rendering and SVG/PNG export.12
Related MCP Connectors
MCP server for Flux AI image generation
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tci-nebula/mermaid-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server