export_diagram
Write a diagram's SVG to disk. PNG export is available via the browser download buttons.
Render Mermaid.js syntax into a live browser preview, replace a diagram's syntax by id to re-render it, and write the SVG to disk.
LABSCO SUMMARY
Diagrams hold an id for the length of a session, so a revision replaces the syntax and re-renders in the same preview instead of leaving a second file to compare against. Export splits by format: SVG is written to a path you give, while PNG comes out of the preview's own download buttons. The diagram list covers the current session.
A diagram server that renders Mermaid.js syntax into a live preview in the browser and keeps this session's diagrams addressable by id.
A browser for the live preview, and a writable path when you export SVG to disk.
One command — npx -y mermaid-live-mcp
USE CASES
The first render puts the diagram in the browser preview; each revision replaces its syntax by id and re-renders in the same window.
The SVG is written to a path you name, ready to drop into the doc, while PNG stays with the preview's download buttons.
The session's diagrams are listed with their ids, so the one that is wanted can be exported without re-rendering the rest.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
export_diagramWrite a diagram's SVG to disk. PNG export is available via the browser download buttons.
generate_mermaidGenerate a diagram from Mermaid.js syntax. Renders in live preview browser with SVG/PNG download options. Supports flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, and more.
list_diagramsList all diagrams generated in this session.
update_diagramReplace a diagram's Mermaid syntax and re-render it in the preview.
BEFORE YOU INSTALL
4 tools when we connected.
npx on PATH
CONTEXT COST
Rated by the size of the 4 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"mermaid-live-mcp": {
"command": "npx",
"args": [
"-y",
"mermaid-live-mcp"
]
}
}
}npx -y mermaid-live-mcp