mermaid
MCP server from Narasimhaponnada/mermaid-mcp
claude mcp add --transport stdio narasimhaponnada-mermaid-mcp mermaid-mcp
How to use
The Mermaid MCP Server provides an MCP interface for AI tools to generate Mermaid diagrams from natural language. It exposes a ready-to-use endpoint that integrates with AI assistants like GitHub Copilot, Claude Desktop, Cursor IDE, and custom applications to produce production-ready SVG diagrams (flowcharts, sequence diagrams, ERDs, state machines, Gantt charts, and more) using over 22 diagram types and 50+ pre-built templates. The server runs under MCP so that clients can send context-rich requests and receive high-quality Mermaid diagrams that are XML-valid and ready for documentation, presentations, or embedding in apps.
To use it with Copilot, install the server (globally or from source) and configure Copilot's MCP servers mapping. If installed globally, set the server command to mermaid-mcp; if building from source, point Copilot to the built dist/index.js via Node. After configuration, you can prompt Copilot with natural language requests like “generate a microservices architecture diagram” or “show a CI/CD pipeline” and the server will render Mermaid-compatible SVGs through the MCP workflow. The setup supports direct CLI usage for automation and can be extended to custom applications via the MCP SDK.
How to install
Prerequisites:
- Node.js 18+ installed on your system
- npm (or yarn) for package management
- Git for cloning the repository (if installing from source)
Option 1: Install from NPM (Recommended)
# Global installation - easiest way to get started
npm install -g @narasimhaponnada/mermaid-mcp-server
# Verify installation
mermaid-mcp --version
Option 2: Install from Source
# Clone the repository
git clone https://github.com/Narasimhonnada/mermaid-mcp.git
cd mermaid-mcp/mermaid-mcp-server
# Install dependencies
npm install
# Build the server
npm run build
# Optional: generate sample diagrams
node generate-svg-samples.js
Configure for Copilot:
- If installed globally, use command: mermaid-mcp
- If installed from source, point Copilot to the built entry:
- command: node
- args: ["/absolute/path/to/mermaid-mcp-server/dist/index.js"]
Additional notes
Tips and considerations:
- Ensure Node.js 18+ is active to match the server’s requirements.
- The server outputs production-ready SVGs that are XML-compliant and suitable for docs and presentations.
- When using Copilot or Claude, add the MCP server under the github.copilot.mcp.servers mapping in VS Code settings. If you installed from source, provide the absolute path to dist/index.js.
- The MCP server supports 6 integration methods (Copilot in VS Code, Claude Desktop, Cursor IDE, Direct CLI, MCP Inspector, and custom apps).
- If you encounter path or permission issues, verify you’re running the correct Node binary and that the dist/index.js file exists after building.
- For automation, you can script requests via the MCP SDK or CLI after configuring the server in your environment.
Related MCP Servers
better-chatbot
Just a Better Chatbot. Powered by Agent & MCP & Workflows.
coplay-unity-plugin
Unity plugin for Coplay
apple-mail
MCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language
review-flow
Automated AI code reviews powered — webhook-driven, real-time dashboard, MCP integration, smart queue with deduplication, multi-agent audits, and iterative follow-up reviews for GitLab MRs and GitHub PRs
docmole
Dig through any documentation with AI - MCP server for Claude, Cursor, and other AI assistants
codeweaver
Semantic code search for AI agents — 166+ languages, hybrid search, works offline