claude-mermaid
MCP Server to previewing mermaid diagrams
claude mcp add --transport stdio veelenga-claude-mermaid claude-mermaid
How to use
Claude Code users can leverage the Claude Mermaid MCP Server to render Mermaid diagrams with live reload directly in their workflow. The server exposes two tools: mermaid_preview, which renders a live preview of a Mermaid diagram in your browser, and mermaid_save, which saves the current live diagram to a specified path in your project. Use mermaid_preview to iterate visually, adjusting diagram code and seeing real-time updates, then use mermaid_save to export the final diagram to formats like SVG, PNG, or PDF. The server supports multiple preview sessions via preview_id, so you can work on several diagrams at once (for example architecture and flow) without clashing previews. The working files for live previews are stored under your home config directory, enabling persistent editing sessions across restarts.
How to install
Prerequisites:\n- Node.js and npm installed on your system.\n- Claude Code installed (optional, but recommended for best integration).\n\nInstallation steps:\n1) Install the MCP server package globally:\nbash\nnpm install -g claude-mermaid\n\n2) Verify the CLI is available:\nbash\nclaude-mermaid --version\n\n3) Ensure the MCP client configuration points to the mermaid command (the MCP config generator will typically handle this when you add the server):\njson\n{\n "mcpServers": {\n "mermaid": {\n "command": "claude-mermaid"\n }\n }\n}\n\n4) (Optional) If you prefer to install from source, clone the repository and install dependencies, then build if required by the workflow.\nbash\ngit clone https://github.com/veelenga/claude-mermaid.git\ncd claude-mermaid\nnpm install\nnpm run build\n
Additional notes
Tips and common considerations:\n- The MCP server command should be available in your PATH as claude-mermaid. If your environment requires an absolute path, use that path in your mcp.json instead.\n- The live preview supports SVG by default. If you need PNG or PDF exports, use mermaid_save with format set accordingly.\n- Manage multiple diagrams by assigning different preview_id values (e.g., architecture, flow).\n- If you encounter connectivity issues with Claude Code, restart the MCP client and verify that claude-mermaid is reachable from your shell.\n- For advanced usage, you can customize themes, dimensions, and background through mermaid_preview options.\n- The server stores persistent working files under ~/.config/claude-mermaid/live on Unix-like systems (adjust for your OS).
Related MCP Servers
systemprompt-code-orchestrator
MCP server for orchestrating AI coding agents (Claude Code CLI & Gemini CLI). Features task management, process execution, Git integration, and dynamic resource discovery. Full TypeScript implementation with Docker support and Cloudflare Tunnel integration.
mcp-memory-keeper
MCP server for persistent context management in AI coding assistants
cco
Real-time audit and approval system for Claude Code tool calls.
mcp-install-instructions-generator
Generate MCP Server Installation Instructions for Cursor, Visual Studio Code, Claude Code, Claude Desktop, Windsurf, ChatGPT, Gemini CLI and more
UEMCP
Python Unreal Engine Plugin and Node.js MCP Server
mcp-jira-stdio
MCP server for Jira integration with stdio transport. Issue management, project tracking, and workflow automation via Model Context Protocol.