mermaid-live-mcp - From prompt to diagram in seconds
@iishyfishyy
About mermaid-live-mcp - From prompt to diagram in seconds
An MCP server that generates live Mermaid diagrams from any AI assistant. Claude, Cursor, and more.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": [
"-y",
"mermaid-live-mcp"
]
}
}
}Tools
4Generate 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
Overview
What is mermaid-live-mcp?
mermaid-live-mcp is an MCP (Model Context Protocol) server that lets you generate Mermaid diagrams from natural language prompts and preview them live in a browser. It renders diagrams in real-time via WebSocket and supports SVG/PNG export. This tool is intended for developers and AI assistant users who want to quickly create and iterate on diagrams.
How to use mermaid-live-mcp?
Install the server via npx and add it to your MCP client configuration (Claude Desktop, Cursor, Claude Code, or Windsurf). The server exposes four tools: generate_mermaid, update_diagram, list_diagrams, and export_diagram. Use generate_mermaid with your Mermaid syntax to open a live browser preview, then update or export as needed.
Key features of mermaid-live-mcp
- Live browser preview with real-time WebSocket updates
- SVG and PNG export via download buttons or tool
- Supports all Mermaid diagram types
- No page refresh needed for diagram updates
- Four dedicated tools for diagram lifecycle
Use cases of mermaid-live-mcp
- Quickly generate flowcharts from text descriptions
- Iterate on sequence diagrams during design discussions
- Export class diagrams as SVG for documentation
- Build ER diagrams with live preview for database modeling
- Create and manage multiple Gantt charts in a single session
FAQ from mermaid-live-mcp
What tools does the server provide?
The server provides generate_mermaid (create and preview), update_diagram (replace syntax and re-render), list_diagrams (list session diagrams), and export_diagram (save SVG to disk).
How do I install mermaid-live-mcp for Claude Desktop?
Add the MCP server configuration to your Claude Desktop config file located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, using the command: npx -y mermaid-live-mcp.
How does the live preview work?
The server opens a browser tab with the diagram rendered as SVG. Any updates to a diagram are pushed instantly to the browser via a WebSocket connection – no page refresh required.
Can I export diagrams as images?
Yes. You can download SVG or PNG from the live preview buttons, or use the export_diagram tool to write the SVG directly to disk.
What diagram types does mermaid-live-mcp support?
All standard 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.
More AI & Agents MCP servers
MCP-LLM Bridge
patruffBridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
MCP-NixOS - Because Your AI Assistant Shouldn't Hallucinate About Packages
utensilsMCP-NixOS - Model Context Protocol Server for NixOS resources
MCP Server - Remote MacOs Use
baryhuangThe only general AI agent that does NOT requires extra API key, giving you full control on your local and remote MacOs from Claude Desktop App
Solon Ai
opensolonJava AI application development framework (supports LLM-tool,skill; RAG; MCP; Agent-ReAct,Team-Agent). Compatible with java8 ~ java25. It can also be embedded in SpringBoot, jFinal, Vert.x, Quarkus, and other frameworks.
Intervals.icu MCP Server
mvilanovaModel Context Protocol (MCP) server for connecting Claude and ChatGPT with the Intervals.icu API.
Comments