Labsco
Narasimhaponnada logo

Mermaid-MCP

โ˜… 47

from Narasimhaponnada

Generat 22 types mermaid architecture diagrams with natural language description

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Mermaid MCP Server

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

npm downloads

๐ŸŽฏ 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

๐Ÿ“š 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