MCP Server Mermaid
The MCP Mermaid server dynamically generates Mermaid diagrams and charts from textual syntax with comprehensive customization options.
Generate Diagrams: Create any type of Mermaid diagram using standard Mermaid syntax
Theme Support: Apply themes including
default,base,forest,dark, andneutralMultiple Export Formats: Output diagrams as PNG, SVG, or original Mermaid syntax
Background Customization: Set custom background colors (default is white)
Syntax Validation: Validate Mermaid syntax to ensure correct diagram generation
Integration Ready: Works with desktop apps (VSCode, Claude) and cloud platforms via HTTP or SSE protocols
Mentions compatibility with mcp-server-chart from AntV for generating charts, graphs, and maps, extending the visualization capabilities beyond Mermaid diagrams.
Integrates with GitHub Actions for build automation and workflow tracking, as indicated by the build badge in the README.
Generates Mermaid diagrams and charts dynamically with AI support. Fully supports all Mermaid syntax features, allows configuration of background color and theme, and enables exporting to PNG, SVG, and Mermaid formats with validation.
Supports distribution via npm, allowing easy installation and versioning of the MCP server.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server Mermaidcreate a flowchart showing user login process"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Mermaid

Generate mermaid diagram and chart with AI MCP dynamically. Also you can use:
mcp-server-chart to generate chart, graph, map.
Infographic to generate infographic, such as
Timeline,Comparison,List,Processand so on.🖼️ figure.ling.pub/gallery to browse and share AI-generated diagrams and figures created with mcp-mermaid and other tools.
✨ Features
Fully support all features and syntax of
Mermaid.Support configuration of
backgroundColorandtheme, enabling large AI models to output rich style configurations.Support exporting to
base64,svg,mermaid,file, and remote-friendlysvg_url,png_urlformats, with validation forMermaidto facilitate the model's multi-round output of correct syntax and graphics. UseoutputType: "file"to automatically save PNG diagrams to disk for AI agents, or the URL modes to share diagrams through public mermaid.ink links.
Related MCP server: Mermaid-MCP
🤖 Usage
To use with Desktop APP, such as Claude, VSCode, Cline, Cherry Studio, and so on, add the MCP server config below. On Mac system:
{
"mcpServers": {
"mcp-mermaid": {
"command": "npx",
"args": [
"-y",
"mcp-mermaid"
]
}
}
}On Window system:
{
"mcpServers": {
"mcp-mermaid": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"mcp-mermaid"
]
}
}
}Also, you can use it on aliyun, modelscope, glama.ai, smithery.ai or others with HTTP, SSE Protocol.
Access Points:
SSE:
http://localhost:3033/sseStreamable:
http://localhost:1122/mcp
Available Docker Tags:
susuperli/mcp-mermaid:latest- Latest stable versionView all available tags at Docker Hub
🚰 Run with SSE or Streamable transport
Option 1: Global Installation
Install the package globally:
npm install -g mcp-mermaidRun the server with your preferred transport option:
# For SSE transport (default endpoint: /sse)
mcp-mermaid -t sse
# For Streamable transport with custom endpoint
mcp-mermaid -t streamableOption 2: Local Development
If you're working with the source code locally:
# Clone and setup
git clone https://github.com/hustcc/mcp-mermaid.git
cd mcp-mermaid
npm install
npm run build
# Run with npm scripts
npm run start:sse # SSE transport on port 3033
npm run start:streamable # Streamable transport on port 1122Access Points
Then you can access the server at:
SSE transport:
http://localhost:3033/sseStreamable transport:
http://localhost:1122/mcp(local) orhttp://localhost:3033/mcp(global)
🎮 CLI Options
You can also use the following CLI options when running the MCP server. Command options by run cli with -h.
MCP Mermaid CLI
Options:
--transport, -t Specify the transport protocol: "stdio", "sse", or "streamable" (default: "stdio")
--port, -p Specify the port for SSE or streamable transport (default: 3033)
--endpoint, -e Specify the endpoint for the transport:
- For SSE: default is "/sse"
- For streamable: default is "/mcp"
--help, -h Show this help message🔨 Development
Install dependencies:
npm installBuild the server:
npm run buildStart the MCP server
Using MCP Inspector (for debugging):
npm run startUsing different transport protocols:
# SSE transport (Server-Sent Events)
npm run start:sse
# Streamable HTTP transport
npm run start:streamableDirect node commands:
# SSE transport on port 3033
node build/index.js --transport sse --port 3033
# Streamable HTTP transport on port 1122
node build/index.js --transport streamable --port 1122
# STDIO transport (for MCP client integration)
node build/index.js --transport stdio🐳 Docker Usage
Run MCP Mermaid with Docker:
# Pull the image
docker pull susuperli/mcp-mermaid:latest
# Run with SSE transport (default)
docker run -p 3033:3033 susuperli/mcp-mermaid:latest --transport sse
# Run with streamable transport
docker run -p 1122:1122 susuperli/mcp-mermaid:latest --transport streamable --port 1122📄 License
MIT@hustcc.
Maintenance
Tools
Related MCP Servers
- TypeScriptMIT
- Alicense-qualityDmaintenanceAn MCP server that converts text inputs into visualized flowcharts, enabling AI clients to generate high-quality Mermaid diagrams directly from natural language descriptions or structured text.Last updated11MIT
- Flicense-qualityDmaintenanceNarasimhaponnada/mermaid-mcp - AI-powered Mermaid diagram generation with 22+ diagram types including flowcharts, sequence diagrams, class diagrams, ER diagrams, architecture diagrams, state machines, and more. Features 50+ pre-built templates, advanced layout engines, SVG/PNG/PDF exports.Last updated50
- Alicense-qualityDmaintenanceAn MCP server that enables AI assistants to programmatically create and manage flowcharts, ERDs, and swimlane diagrams. It provides tools for manipulating diagram structures, performing auto-layouts, and exporting to Mermaid or Markdown formats.Last updated20MIT
Related MCP Connectors
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Renders interactive Chart.js charts and dashboards inline in AI conversations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hustcc/mcp-mermaid'
If you have feedback or need assistance with the MCP directory API, please join our Discord server