mermaid-mcp
2
总安装量
2
周安装量
#68281
全站排名
安装命令
npx skills add https://github.com/zekiwest/mermaid-mcp-skill --skill mermaid-mcp
Agent 安装分布
amp
2
github-copilot
2
codex
2
kimi-cli
2
gemini-cli
2
cursor
2
Skill 文档
Mermaid MCP Skill
This skill provides the ability to generate Mermaid diagrams using the Mermaid MCP server.
What This Skill Does
- Generates swimlane diagrams for business processes
- Creates flowcharts for workflows
- Produces sequence diagrams for API interactions
- Supports 22+ diagram types
When to Invoke
Invoke this skill when:
- User asks to create a diagram
- User mentions “swimlane diagram” or “æ³³éå¾”
- User wants to visualize a process or workflow
- User needs flowcharts, sequence diagrams, or other Mermaid diagrams
Installation
Prerequisites
- Node.js 18+
- npm or yarn
Install Mermaid MCP Server
npm install -g @narasimhaponnada/mermaid-mcp-server
Configure MCP Settings
Add the following to your MCP settings file:
macOS/Linux: ~/.trae/mcp.json
{
"mcpServers": {
"mermaid": {
"command": "node",
"args": ["/path/to/mermaid-mcp-server/dist/index.js"],
"env": {}
}
}
}
Replace /path/to/ with the actual installation path. To find the path:
npm root -g
The full path would be: {npm-root}/@narasimhaponnada/mermaid-mcp-server/dist/index.js
Available MCP Tools
| Tool | Description |
|---|---|
generateDiagram |
Generate and render diagrams to SVG files |
validateDiagram |
Validate syntax with detailed error reporting |
getDiagramInfo |
Analyze diagram complexity and metadata |
listSupportedTypes |
List all 22+ supported diagram types |
convertDiagram |
Convert diagrams to different formats |
listTemplates |
Browse 50+ pre-built templates |
getTemplate |
Get specific template code |
searchTemplates |
Search templates by keyword |
Usage Examples
Generate a Swimlane Diagram
请çæä¸ä¸ªç¨æ·è´ç©æµç¨çæ³³éå¾
Generate a Flowchart
请å建ä¸ä¸ªç»å½æµç¨å¾
Generate a Sequence Diagram
请çæä¸ä¸ªAPIè°ç¨åºåå¾
Supported Diagram Types
- Flowcharts
- Sequence diagrams
- Class diagrams
- State diagrams
- ER diagrams
- Gantt charts
- Git graphs
- Mindmaps
- Timelines
- And 13+ more types!
Troubleshooting
MCP Server Not Found
If the MCP server is not found, verify:
- Node.js is installed (v18+)
- The package is installed globally
- The path in mcp.json is correct
Diagram Generation Fails
- Check the Mermaid syntax
- Use
validateDiagramtool to identify errors - Refer to Mermaid documentation