Renders Mermaid diagram syntax to PNG or SVG images for LLM clients
MCPpedia last refreshed this data
io.github.tci-nebula/mermaid-render-mcp is an MCP server that renders Mermaid diagram syntax to PNG or SVG images for LLM clients. Its tool list has not been published yet over stdio, requires no API key, and scores 82/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"mermaid": {
"args": [
"-y",
"mermaid-render-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Renders Mermaid diagram syntax to PNG or SVG images for LLM clients
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y 'mermaid-render-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked mermaid-render-mcp against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in ai-ml / finance
A cross-platform desktop application for managing AI Agents and MCP Servers. 一款用于管理AI智能体与MCP服务器的跨平台桌面应用程序。
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
An open-source AI agent that brings the power of Gemini directly into your terminal.
🛡️ BLA (Blind LLM Agents) — Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, and WebAssembly against AI reverse-engineering agents like REA. Poison -> Exhaust -> Hallucinate.
MCP Security Weekly
Get CVE alerts and security updates for io.github.tci-nebula/mermaid-render-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP server that renders Mermaid diagrams to PNG, SVG, or PDF — or converts them to editable draw.io files. Give your LLM the ability to turn diagram syntax into actual images and documents.
claude mcp add mermaid -- npx -y mermaid-render-mcp
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. If you only need flowcharts and can work with editable files, the
drawiofast path skips Chromium entirely.
No Node.js or Chromium download needed — the image ships with everything (including CJK fonts for Japanese/Chinese/Korean labels):
claude mcp add mermaid -- docker run -i --rm tcinebula/mermaid-render-mcp
To use output_path, mount a host directory and write into it:
{
"mcpServers": {
"mermaid": {
"command": "docker",
"args": ["run", "-i", "--rm", "-v", "C:\\diagrams:/out", "tcinebula/mermaid-render-mcp"]
}
}
}
Then pass output_path: "/out/figure.pdf" and the file appears in C:\diagrams.
The same server speaks Streamable HTTP when PORT is set (or MCP_TRANSPORT=http), so it can be deployed to any container host — Railway, Fly.io, etc. — straight from the Dockerfile:
POST /mcp (health check at /healthz)AUTH_TOKEN to require Authorization: Bearer <token>output_path is disabled in HTTP mode; base64/XML responses onlygit clone https://github.com/tci-nebula/mermaid-mcp.git
cd mermaid-mcp
npm install
claude mcp add mermaid -- node /path/to/mermaid-mcp/server.js
render_diagram| Parameter | Type | Default | Description |
|---|---|---|---|
syntax | string | (required) | Mermaid diagram definition |
format | png | svg | pdf | drawio | png | Output format (drawio = editable draw.io XML, flowcharts only) |
theme | default | dark | neutral | forest | default | Visual theme |
background | string | white | CSS colour or transparent |
width | number | 1200 | Canvas width in px (PNG only) |
pdfFit | boolean | true | Scale the PDF page to fit the diagram (PDF only) |
output_path | 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).
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.
drawio fast path (no Chromium)format: "drawio" is the one output that never touches a browser. It's pure JavaScript — parse, lay out with dagre, emit XML — so there's no Chromium download, no ~150 MB install, and no multi-minute first run. Conversion is effectively instant.
Reach for it when:
{
"syntax": "flowchart TD\n A[Start] --> B{OK?}\n
... [View full README on GitHub](https://github.com/tci-nebula/mermaid-mcp#readme)