LABSCO SUMMARY
A diagram the model can fix, because it is told when the syntax is wrong.
Validation is the quiet feature here. Without it a malformed diagram comes back as a broken picture; with it the model gets an error it can act on and tries again.
What it is
A diagram generator that renders Mermaid on the server side. Full Mermaid syntax is supported, and the render step validates the input so a model that gets the syntax wrong is told, rather than handed a broken image.
What you get
- Every Mermaid feature and syntax, with
backgroundColorandthemeconfigurable so a model can produce rich style settings - Six output types:
base64,svg,mermaid,file— which saves a PNG to disk for agents that work with files — and the remote-friendlysvg_urlandpng_urlthat share through public mermaid.ink links - Syntax validation, which is what lets a model iterate over several rounds towards correct output and correct graphics
- Three transports selected with
--transport:stdioby default,sse, andstreamable, with--portand--endpointto place them
Requirements
Nothing to install for the common case — configure your client with npx -y mcp-mermaid, using the cmd /c prefix on Windows. For a long-running server, npm install -g mcp-mermaid then mcp-mermaid -t sse or mcp-mermaid -t streamable; the SSE endpoint defaults to /sse on port 3033 and the streamable endpoint to /mcp, with the local development scripts using 1122 for streamable. A Docker image, susuperli/mcp-mermaid:latest, is published for both transports. It is also reachable through hosted platforms including aliyun, modelscope, glama.ai and smithery.ai over HTTP or SSE. MIT licensed.
Setup effort
One command — npm install -g mcp-mermaid
USE CASES
01
Getting a diagram out of a conversation
Describe the flow and get the rendered result back, with background colour and theme set from the same request.
02
Putting the image in a document
Ask for the file output type and a PNG is written to disk, ready to attach — no copy-and-paste from a preview.
03
Sharing a diagram with someone else
The URL output types return public links, which travel better than a base64 blob in a chat.
04
Keeping the source, not just the picture
The mermaid output type returns the diagram definition itself, so it can be checked into a repository and re-rendered later.
05
Running it as a shared service
Install globally or run the Docker image with the SSE or streamable transport, and point several clients at the same endpoint.
BEFORE YOU INSTALL
What to know first
Requires
npx on PATH
Where it runs
All 4 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
TERMINAL
npm install -g mcp-mermaidMCP Clients
Claude Desktop, Cline, Cherry Studio
JSON
{
"mcpServers": {
"mcp-mermaid": {
"command": "npx",
"args": [
"-y",
"mcp-mermaid"
]
}
}
}VS Code
VS CODE · JSON
{
"servers": {
"mcp-mermaid": {
"command": "npx",
"args": [
"-y",
"mcp-mermaid"
]
}
}
}