mermaid-live-mcp - From prompt to diagram in seconds
@iishyfishyy
关于 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.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mermaid": {
"command": "npx",
"args": [
"-y",
"mermaid-live-mcp"
]
}
}
}工具
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
概览
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.
AI 与智能体 分类下的更多 MCP 服务器
MCP Claude Code
SDGLBLMCP implementation of Claude Code capabilities and more
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
mcp-hfspace MCP Server 🤗
evalstateMCP Server to Use HuggingFace spaces, easy configuration and Claude Desktop mode.
MCP Manager for Claude Desktop
zueaisimple web ui to manage mcp (model context protocol) servers in the claude app
21st.dev Magic AI Agent
21st-devIt's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic
评论