mermaid-live-mcp
Click on "Deploy 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-live-mcpgenerate a sequence diagram for user login"
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-live-mcp
MCP server for generating Mermaid diagrams with live browser preview. Renders diagrams in real-time and supports SVG/PNG export.
Install
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": ["-y", "mermaid-live-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": ["-y", "mermaid-live-mcp"]
}
}
}Claude Code
claude mcp add mermaid -- npx -y mermaid-live-mcpWindsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": ["-y", "mermaid-live-mcp"]
}
}
}Related MCP server: claude-mermaid
Tools
Tool | Description |
| Generate a diagram from Mermaid syntax and open a live preview in the browser |
| Replace a diagram's Mermaid syntax and re-render the live preview |
| List all diagrams generated in the current session |
| Write a diagram's SVG to disk |
How it works
When you ask your AI assistant to create a diagram, mermaid-live-mcp will:
Parse the Mermaid syntax
Open a browser tab with a live preview
Render the diagram as SVG in real-time via WebSocket
Provide download buttons for SVG and PNG export
Updates to a diagram are pushed instantly to the browser — no page refresh needed.
Supported diagram types
All Mermaid diagram types are supported, including flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, pie charts, git graphs, mindmaps, timelines, and more.
Development
pnpm install
pnpm buildProject structure
Package | Description |
| MCP server (published as |
| Live browser preview via WebSocket |
| Diagram parsing, layout, and SVG rendering |
| Command-line interface |
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
Collaborative whiteboard MCP server — create objects, connectors, C4 diagrams, and manage boards
MCP server for generating rough-draft project plans from natural-language prompts.
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.1113 npm234MIT
- AlicenseAqualityAmaintenanceMCP Server to previewing mermaid diagrams. https://github.com/veelenga/claude-mermaid/2514 npm206MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for rendering Mermaid diagrams and generating source-code diagrams, with tools to render text/files and produce dependency/class diagrams.37 npmMIT
- AlicenseNot gradedqualityCmaintenanceA lightweight MCP server that provides real-time Mermaid diagram syntax validation with support for all diagram types.51 npm3MIT