📇 ☁️ 🍎 🪟 🐧 - Mermaid diagram generation (flowcharts, sequence, class, ER, architecture and state diagrams)…
Mermaid MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> **AI-powered Mermaid diagram generation using Model Context Protocol (MCP)**
🎯 Overview
The **Mermaid MCP Server** enables AI assistants like GitHub Copilot, Claude, and custom LLM applications to generate professional architecture diagrams, flowcharts, sequence diagrams, and more using natural language. It provides a Model Context Protocol interface for seamless integration with AI coding assistants.
✨ Key Features
- 🤖 **AI-Powered Generation**: Create diagrams using natural language with GitHub Copilot or Claude
- 🎨 **Production-Ready SVGs**: XML-compliant, validated SVG files ready for any use
- 📦 **50+ Pre-built Templates**: Architecture patterns, workflows, and data models
- 🔧 **Multiple Integrations**: VS Code, Claude Desktop, Cursor IDE, CLI, and custom apps
- 🚀 **22+ Diagram Types**: Flowcharts, sequences, ERDs, state machines, Gantt charts, and more
- ⚡ **Fast & Reliable**: Browser-based rendering with Puppeteer for consistent output
📋 What's Included
🚀 Quick Start
Prerequisites
- Node.js 18 or higher
- npm or yarn
- GitHub Copilot (recommended) or Claude Desktop
Installation
Option 1: Install from NPM (Recommended)
Option 2: Install from Source
Configure with GitHub Copilot
Add to your VS Code settings (Cmd+Shift+P → "Preferences: Open User Settings (JSON)"):
**If installed via NPM globally:**
**If installed from source:**
Use with Copilot
Open GitHub Copilot Chat and try:
📚 Documentation
- **Setup.md** - Complete installation and configuration guide (807 lines)
- **UserGuide.md** - Comprehensive usage guide with examples (2,349 lines)
- **mermaid-mcp-server/README.md** - Server-specific documentation
- **mermaid-mcp-server/PROJECT-SUMMARY.md** - Technical deep-dive
🎨 Diagram Types Supported
- **Process Diagrams**: Flowcharts, Block Diagrams
- **Interactions**: Sequence Diagrams, User Journeys, Timelines
- **Structure**: Class Diagrams, ER Diagrams, C4 Diagrams, Architecture
- **Data Visualization**: Pie Charts, XY Charts, Sankey, Radar, Quadrant, Treemap
- **Project Management**: Gantt Charts, Requirement Diagrams, Kanban Boards
- **Specialized**: State Diagrams, Git Flow, Mindmaps, Packet Diagrams
🔌 Integration Methods
1. **GitHub Copilot in VS Code** - Daily development workflow
2. **Claude Desktop** - Standalone diagram generation
3. **Cursor IDE** - AI-first development
4. **Direct CLI** - Automation and scripting
5. **MCP Inspector** - Testing and debugging
6. **Custom Applications** - Build your own integrations
💡 Use Cases
- 📖 **Documentation**: Auto-generate architecture diagrams for docs
- 🔄 **Code Reviews**: Include diagrams in pull requests
- 👥 **Onboarding**: Visual guides for new developers
- 📊 **Technical Proposals**: Explain changes with visuals
- 🚨 **Incident Response**: Document incidents with timelines
- 💼 **Client Presentations**: Explain technical concepts visually
- 📚 **Training Materials**: Create consistent learning resources
🌟 Example Output
The server generates production-ready SVG files like these (included in examples/architectures/):
- microservices-architecture.svg (27KB) - Microservices with API Gateway