MCP Server Mermaid
MCP Mermaid

使用 AI MCP 动态生成 mermaid 图表。你也可以使用:
mcp-server-chart 来生成图表、图形和地图。
Infographic 来生成信息图,例如
Timeline(时间轴)、Comparison(对比)、List(列表)、Process(流程)等。🖼️ figure.ling.pub/gallery 用于浏览和分享使用 mcp-mermaid 及其他工具生成的 AI 图表和图形。
✨ 功能特性
全面支持
Mermaid的所有功能和语法。支持
backgroundColor和theme配置,使大型 AI 模型能够输出丰富的样式配置。支持导出为
base64、svg、mermaid、file以及对远程友好的svg_url和png_url格式,并对Mermaid进行验证,以方便模型进行多轮输出正确的语法和图形。使用outputType: "file"可以自动将 PNG 图表保存到磁盘供 AI 代理使用,或者使用 URL 模式通过公共的 mermaid.ink 链接分享图表。
Related MCP server: Mermaid-MCP
🤖 使用方法
若要在 Claude、VSCode、Cline、Cherry Studio 等 桌面应用 中使用,请添加以下 MCP 服务器配置。在 Mac 系统上:
{
"mcpServers": {
"mcp-mermaid": {
"command": "npx",
"args": [
"-y",
"mcp-mermaid"
]
}
}
}在 Windows 系统上:
{
"mcpServers": {
"mcp-mermaid": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"mcp-mermaid"
]
}
}
}此外,你也可以在 aliyun、modelscope、glama.ai、smithery.ai 或其他支持 HTTP 和 SSE 协议的平台上使用它。
访问点:
SSE:
http://localhost:3033/sseStreamable:
http://localhost:1122/mcp
可用的 Docker 标签:
susuperli/mcp-mermaid:latest- 最新稳定版本在 Docker Hub 查看所有可用标签
🚰 使用 SSE 或 Streamable 传输运行
选项 1:全局安装
全局安装该包:
npm install -g mcp-mermaid使用你偏好的传输选项运行服务器:
# For SSE transport (default endpoint: /sse)
mcp-mermaid -t sse
# For Streamable transport with custom endpoint
mcp-mermaid -t streamable选项 2:本地开发
如果你在本地处理源代码:
# 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 1122访问点
然后你可以通过以下地址访问服务器:
SSE 传输:
http://localhost:3033/sseStreamable 传输:
http://localhost:1122/mcp(本地) 或http://localhost:3033/mcp(全局)
🎮 CLI 选项
运行 MCP 服务器时,你也可以使用以下 CLI 选项。通过运行 cli -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🔨 开发
安装依赖:
npm install构建服务器:
npm run build启动 MCP 服务器
使用 MCP Inspector(用于调试):
npm run start使用不同的传输协议:
# SSE transport (Server-Sent Events)
npm run start:sse
# Streamable HTTP transport
npm run start:streamable直接使用 node 命令:
# 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 使用
使用 Docker 运行 MCP Mermaid:
# 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📄 许可证
MIT@hustcc。
Maintenance
Tools
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.51
- AlicenseNot gradedqualityDmaintenanceAn 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.14MIT
Related MCP Connectors
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Let Claude, Cursor, or ChatGPT author Mermaid diagrams your team can read and share.
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
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