Mermaid MCP Server
@abekdwight
An MCP server providing tools for validating and rendering Mermaid diagrams.
概览
What is Mermaid MCP Server?
A Model Context Protocol (MCP) server that provides tools for validating and rendering Mermaid diagrams. It enables AI assistants like Roo to check Mermaid syntax, render diagrams into SVG format, and access official documentation links.
How to use Mermaid MCP Server?
Install globally with npm install -g mermaid-mcp-server, then configure the server in your MCP client’s settings file (e.g., Roo Cline’s mcp_settings.json) by adding an entry under mcpServers. Restart VSCode; the tools validate_mermaid, render_mermaid_svg, and get_mermaid_docs_link will then be available to the AI assistant.
Key features of Mermaid MCP Server
- Validate Mermaid diagram syntax
- Render valid Mermaid code to SVG format
- Provide a link to official Mermaid documentation
- Integrates seamlessly with MCP‑compatible clients
- Uses
@mermaid-js/mermaid-cliand Puppeteer for rendering
Use cases of Mermaid MCP Server
- Check Mermaid code correctness before generating diagrams
- Generate SVG images from Mermaid diagrams via an AI assistant
- Quickly retrieve the official Mermaid documentation URL
FAQ from Mermaid MCP Server
What does Mermaid MCP Server do?
It provides three MCP tools: validate_mermaid checks syntax, render_mermaid_svg converts valid Mermaid code to SVG, and get_mermaid_docs_link returns the documentation URL.
What are the runtime requirements?
Node.js v18 or later, npm or yarn, a compatible MCP client (e.g., Roo Cline VSCode Extension), and network connectivity on first run for Puppeteer to download Chromium.
How do I configure the server with Roo Cline?
Install globally, then add a mermaid-mcp-server entry in the Roo Cline MCP settings file with "command": "mermaid-mcp-server". If built from source, use "command": "node" with the absolute path to build/index.js as an argument.
Where does the server process data?
All validation and rendering happens locally on the machine where the server runs. No external services are called beyond the Puppeteer download.
What transport does the server use?
The server communicates via standard input/output (stdio), the default MCP transport. No authentication or network endpoints are configured.