generate
Generate PNG image or SVG from mermaid markdown
Render the mermaid markdown you just wrote into a PNG or an SVG on disk, with the theme, background colour, folder and filename decided in the same call.
LABSCO SUMMARY
One tool, and its arguments cover what actually varies between renders: format, theme, background colour, folder and name. That makes it worth leaving installed — the drafting and the rendering stop being two separate places, and the diagram in the message is the same artefact as the one in the docs.
A single-tool server that renders mermaid markdown to an image file.
The mermaid markdown itself; no account or key. One setting matters: Cursor and Cline need CONTENT_IMAGE_SUPPORTED set to false, as in their tabs, and the image is then saved to a folder you name instead of returned inline.
Add the configuration to your client
USE CASES
The diagram written in the message becomes a file on disk in the format the document needs, named and themed in the same call, so nobody has to redraw it somewhere else.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
generateGenerate PNG image or SVG from mermaid markdown
BEFORE YOU INSTALL
1 tool when we connected. With CONTENT_IMAGE_SUPPORTED at its default of true, generate returns the image inline. Cursor and Cline need it set to false, which writes the file to disk and makes the name and folder parameters mandatory.
npx on PATH
All 3 documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the one tool definition that rides along on every turn
INSTALLATION
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": [
"-y",
"@peng-shawn/mermaid-mcp-server"
]
}
}
}{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": [
"-y",
"@peng-shawn/mermaid-mcp-server"
],
"env": {
"CONTENT_IMAGE_SUPPORTED": "false"
}
}
}
}