Mermaid MCP Server

Mermaid MCP Server

AI-powered natural language to Mermaid diagram server via Model Context Protocol

3
Stars
1
Forks
3
Watchers
0
Issues
Mermaid MCP Server enables seamless integration with AI assistants, allowing users to generate professional architecture diagrams, flowcharts, and more using natural language. It implements the Model Context Protocol (MCP), providing a standardized interface for AI tools like GitHub Copilot and Claude to interact with diagram generation workflows. The server offers over 50 pre-built templates, fast SVG rendering, and broad integration support across VS Code, CLI, and desktop applications.

Key Features

AI-powered diagram generation from natural language
Production-ready, validated SVG output
Over 50 pre-built architecture and workflow templates
Supports 22+ diagram types including flowcharts, sequence diagrams, ERDs, and Gantt charts
Fast, reliable rendering with Puppeteer in browser
Integration with GitHub Copilot, Claude Desktop, and Cursor IDE
Easy installation via npm or source build
Comprehensive setup and user documentation
CLI support for command line usage
Flexible configuration via VS Code and JSON settings

Use Cases

Creating professional software architecture diagrams via voice or chat in coding assistants
Generating CI/CD pipeline flowcharts for DevOps teams
Visualizing entity-relationship diagrams for database design
Producing sequence diagrams for authentication and workflow scenarios
Rapid prototyping of state machines and process diagrams
Embedding validated SVG diagrams into technical documentation
Automating diagram generation in developer workflows
Integrating visualizations into custom AI tools and IDEs
Delivering architecture assets in collaborative team environments
Supporting educators in teaching with visual representations

README

Mermaid MCP Server

AI-powered Mermaid diagram generation using Model Context Protocol (MCP)

npm version npm downloads Node.js License MCP Mermaid

🎯 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

Mermaid/
β”œβ”€β”€ mermaid-mcp-server/          # Main MCP server
β”‚   β”œβ”€β”€ src/                     # TypeScript source code
β”‚   β”œβ”€β”€ dist/                    # Compiled JavaScript
β”‚   β”œβ”€β”€ examples/architectures/  # 5 production-ready SVG samples
β”‚   β”œβ”€β”€ package.json             # Dependencies
β”‚   └── README.md                # Server documentation
β”œβ”€β”€ Setup.md                     # Complete setup guide
β”œβ”€β”€ UserGuide.md                 # Comprehensive usage guide
└── *.md                         # Analysis and documentation

πŸš€ Quick Start

Prerequisites

  • Node.js 18 or higher
  • npm or yarn
  • GitHub Copilot (recommended) or Claude Desktop

Installation

Option 1: Install from NPM (Recommended)

bash
# Global installation - easiest way to get started
npm install -g @narasimhaponnada/mermaid-mcp-server

# Test the installation
mermaid-mcp --version

# The server is now ready to use with Copilot/Claude!

Option 2: Install from Source

bash
# Clone the repository
git clone https://github.com/Narasimhaponnada/mermaid-mcp.git
cd mermaid-mcp/mermaid-mcp-server

# Install dependencies
npm install

# Build the server
npm run build

# Generate sample diagrams
node generate-svg-samples.js

Configure with GitHub Copilot

Add to your VS Code settings (Cmd+Shift+P β†’ "Preferences: Open User Settings (JSON)"):

If installed via NPM globally:

json
{
  "github.copilot.mcp.servers": {
    "mermaid": {
      "command": "mermaid-mcp"
    }
  }
}

If installed from source:

json
{
  "github.copilot.mcp.servers": {
    "mermaid": {
      "command": "node",
      "args": ["/absolute/path/to/mermaid-mcp-server/dist/index.js"]
    }
  }
}

Use with Copilot

Open GitHub Copilot Chat and try:

Create a microservices architecture diagram for an e-commerce platform
Generate a CI/CD pipeline flowchart showing GitHub Actions workflow
Show me a sequence diagram for user authentication with OAuth

πŸ“š Documentation

🎨 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
  • cloud-infrastructure.svg (31KB) - Cloud infrastructure components
  • cicd-pipeline.svg (28KB) - Complete CI/CD workflow
  • data-pipeline.svg (24KB) - ETL data processing pipeline
  • serverless-architecture.svg (31KB) - Event-driven serverless

All SVGs are XML-validated and render perfectly in browsers, documentation, and presentations.

πŸ› οΈ Technology Stack

  • Node.js - Server runtime
  • TypeScript - Type-safe development
  • Puppeteer - Browser-based rendering
  • Mermaid v10 - Diagramming library (via CDN)
  • MCP SDK - Model Context Protocol implementation

πŸ“ˆ Project Status

  • βœ… Production-Ready: All core features implemented and tested
  • βœ… Validated: All SVG outputs are XML-compliant
  • βœ… Documented: Comprehensive guides and examples
  • βœ… Clean Codebase: 43 essential files, no cruft
  • βœ… Battle-Tested: Fixed HTML-to-XML tag issues, subgraph syntax, etc.

🀝 Contributing

Contributions are welcome! Please feel free to:

  • Report bugs and issues
  • Suggest new diagram types or features
  • Submit pull requests
  • Share usage examples and best practices

πŸ“„ License

MIT License - see mermaid-mcp-server/LICENSE for details

πŸ™ Acknowledgments

  • Mermaid.js - Amazing diagramming library
  • Model Context Protocol - Enabling AI tool integration
  • GitHub Copilot - AI-powered development
  • Puppeteer - Reliable browser automation

πŸ“ž Support

  • πŸ“– Documentation: See Setup.md and UserGuide.md
  • πŸ› Issues: Open an issue on GitHub
  • πŸ’¬ Discussions: Start a discussion for questions
  • πŸ“§ Contact: Via GitHub profile

πŸš€ Getting Started

  1. Read the setup guide: Setup.md
  2. Install and configure: Follow the quick start above
  3. Try it out: Generate your first diagram with Copilot
  4. Explore use cases: Check UserGuide.md
  5. Integrate into your project: Use one of 6 integration methods

Last Updated: October 30, 2025
Author: Narasimha Rao Ponnada
Version: 1.0.0

Start creating amazing diagrams with AI! πŸŽ¨πŸ“Šβœ¨

Star History

Star History Chart

Repository Owner

Repository Details

Language JavaScript
Default Branch main
Size 351 KB
Contributors 1
License Other
MCP Verified Nov 11, 2025

Programming Languages

JavaScript
51.33%
TypeScript
33.77%
Shell
12.61%
Dockerfile
2.29%

Tags

Topics

ai architecture automation claude cli-tool copilot devtools diagrams documentation flowchart mcp mcp-server mermaid model-context-protocol npm npmjs puppeteer sequence-diagram svg typescript

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP Mermaid

    MCP Mermaid

    AI-powered dynamic generation of Mermaid diagrams via the Model Context Protocol.

    MCP Mermaid enables dynamic generation of Mermaid diagrams and charts using AI via the Model Context Protocol (MCP). It supports all features and syntax of Mermaid, and can export diagrams in various formats including SVG, base64, and files. The server can be run locally or globally using different transport protocols such as stdio, SSE, or streamable, making it compatible with tools like Claude, VSCode, and Smithery. It provides customization for background color and theme, and validates output to ensure correct syntax and graphics.

    • ⭐ 283
    • MCP
    • hustcc/mcp-mermaid
  • Mindpilot MCP

    Mindpilot MCP

    Visualize and understand code structures with on-demand diagrams for AI coding assistants.

    Mindpilot MCP provides AI coding agents with the capability to visualize, analyze, and understand complex codebases through interactive diagrams. It operates as a Model Context Protocol (MCP) server, enabling seamless integration with multiple development environments such as VS Code, Cursor, Windsurf, Zed, and Claude Code. Mindpilot ensures local processing for privacy, supports multi-client connections, and offers robust configuration options for server operation and data management. Users can export diagrams and adjust analytics settings for improved user control.

    • ⭐ 61
    • MCP
    • abrinsmead/mindpilot-mcp
  • Taskade MCP

    Taskade MCP

    Tools and server for Model Context Protocol workflows and agent integration

    Taskade MCP provides an official server and tools to implement and interact with the Model Context Protocol (MCP), enabling seamless connectivity between Taskade’s API and MCP-compatible clients such as Claude or Cursor. It includes utilities for generating MCP tools from any OpenAPI schema and supports the deployment of autonomous agents, workflow automation, and real-time collaboration. The platform promotes extensibility by supporting integration via API, OpenAPI, and MCP, making it easier to build and connect agentic systems.

    • ⭐ 90
    • MCP
    • taskade/mcp
  • Kanboard MCP Server

    Kanboard MCP Server

    MCP server for seamless AI integration with Kanboard project management.

    Kanboard MCP Server is a Go-based server implementing the Model Context Protocol (MCP) for integrating AI assistants with the Kanboard project management system. It enables users to manage projects, tasks, users, and workflows in Kanboard directly via natural language commands through compatible AI tools. With built-in support for secure authentication and high performance, it facilitates streamlined project operations between Kanboard and AI-powered clients like Cursor or Claude Desktop. The server is configurable and designed for compatibility with MCP standards.

    • ⭐ 15
    • MCP
    • bivex/kanboard-mcp
  • Mindmap MCP Server

    Mindmap MCP Server

    Convert Markdown content into interactive mindmaps via an MCP-compliant server.

    Mindmap MCP Server provides a Model Context Protocol (MCP) compatible service that transforms Markdown input into interactive mindmap visualizations. It supports command-line, Python, and Docker installation methods for flexibility across platforms. Designed to integrate with MCP clients like Claude Desktop, it ensures seamless Markdown-to-mindmap conversion using markmap under the hood. The server is intended for easy plug-and-play use in model-powered workflows that require structured, visual context formatting.

    • ⭐ 205
    • MCP
    • YuChenSSR/mindmap-mcp-server
  • Replicate Flux MCP

    Replicate Flux MCP

    MCP-compatible server for high-quality image and SVG generation via Replicate models.

    Replicate Flux MCP is an advanced Model Context Protocol (MCP) server designed to enable AI assistants to generate high-quality raster images and vector graphics. It leverages Replicate's Flux Schnell model for image synthesis and Recraft V3 SVG model for vector output, supporting seamless integration with AI platforms like Cursor, Claude Desktop, Smithery, and Glama.ai. Users can generate images and SVGs by simply providing natural language prompts, with support for parameter customization, batch processing, and variant creation.

    • ⭐ 66
    • MCP
    • awkoy/replicate-flux-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results