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.
Available Tools
1 toolgenerate_mermaid_diagramBInspect
Generate mermaid diagram and chart with mermaid syntax dynamically. Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development.
| Name | Required | Description | Default |
|---|---|---|---|
| mermaid | Yes | The mermaid diagram syntax used to be generated, such as, graph TD; A-->B; A-->C; B-->D; C-->D;. | |
| theme | No | Theme for the diagram (optional). Default is 'default'. | default |
| backgroundColor | No | Background color for the diagram (optional). Default is 'white'. | white |
| outputType | No | The output type of the diagram. Can be 'base64', 'svg', 'mermaid', 'file', 'svg_url', or 'png_url'. Default is 'base64'. 'base64' returns PNG image as base64 encoded string. 'file' saves the PNG image to disk. The *_url options return public mermaid.ink links for remote-friendly sharing. | base64 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fails to disclose behavioral traits such as side effects, performance, or limitations. It only broadly states dynamic generation without specifics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences, but the second sentence focuses on Mermaid's general purpose rather than the tool's specific behavior. No filler words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description does not explain the output format or how to use the returned data. With no output schema, relying on the outputType parameter is insufficient for complete understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the parameters are already well-documented. The description adds no additional meaning beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: generating mermaid diagrams and charts dynamically. It explains what Mermaid is, providing context for the tool's functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool or when not to use it. There are no alternatives mentioned, and the description lacks explicit usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of confusion between tools. The tool's purpose is clear and stands alone.
Since there is only one tool, naming consistency is not applicable, but the single name follows a clear descriptive pattern.
A single tool for generating Mermaid diagrams is minimal. While it covers the core functionality, the scope feels thin (1 tool) compared to typical MCP servers that handle diagramming workflows.
The tool covers the primary task of generating diagrams, but lacks auxiliary operations such as validation, styling, or export options that would enhance completeness for a diagramming server.
Maintenance
Related MCP Connectors
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
Generate org charts, MCD/ERD data models, and C4 architecture diagrams — pilot OrgGen AI via MCP.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Related MCP Servers
- TypeScriptMIT
- AlicenseNot gradedqualityDmaintenanceAn 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.11MIT
- FlicenseNot gradedqualityFmaintenanceNarasimhaponnada/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.52
- AlicenseNot gradedqualityDmaintenanceEnables automatic generation of UML class diagrams and entity-relationship diagrams from natural language descriptions or structured JSON data. It integrates with MCP agents to create visual representations of code structures and system designs without manual Mermaid coding.151MIT
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