MCP美人鱼

生成 美人鱼 使用AI MCP动态绘制图表。您还可以使用:
✨ 特性
- 完全支持的所有功能和语法
Mermaid. - 支持配置
backgroundColor和theme,使大型AI模型能够输出丰富的样式配置。 - 支持导出到
base64,svg,mermaid,file,远程友好svg_url,png_url格式,带有验证Mermaid以促进模型多轮输出正确的语法和图形。使用outputType: "file"自动将PNG图表保存到磁盘供AI代理使用,或通过公共mermaid.ink链接共享图表的URL模式。
🤖 用法
与一起使用 Desktop APP,如Claude、VSCode、Cline、Cherry Studio等,在下面添加MCP服务器配置。在Mac系统上:
JSON``` 1 2 3 4 5 6 7 8 9 10 11{ “mcpServers”: { “mcp-mermaid”: { “command”: “npx”, “args”: [ “-y”, “mcp-mermaid” ] } } }
On Window系统:
JSON```
1
2
3
4
5
6
7
8
9
10
11
12
13{
"mcpServers": {
"mcp-mermaid": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"mcp-mermaid"
]
}
}
}
此外,您还可以在阿里云、modelscope、glama.ai、smithery.ai或其他具有HTTP、SSE协议的平台上使用它。
接入点:
- 上海证券交易所
http://localhost:3033/sse - 可流式传输:
http://localhost:1122/mcp
可用的Docker标签:
susuperli/mcp-mermaid:latest-最新稳定版本- 查看所有可用标签 Docker 中心
🚰 使用SSE或流媒体传输运行
选项1:全局安装
全局安装软件包:
BASH``` 1npm install -g mcp-mermaid
使用首选传输选项运行服务器:
BASH```
1
2
3
4# For SSE transport (default endpoint: /sse)
mcp-mermaid -t sse
# For Streamable transport with custom endpoint
mcp-mermaid -t streamable
方案2:地方发展
如果您在本地使用源代码:
BASH``` 1 2 3 4 5 6 7 8# 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/sse`
- 可流动运输: `http://localhost:1122/mcp` (本地)或 `http://localhost:3033/mcp` (全球)
## 🎮 CLI选项
运行MCP服务器时,您还可以使用以下CLI选项。使用run-cli命令选项 `-h`.
PLAIN```
1
2
3
4
5
6
7
8MCP 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
🔨 发展
安装依赖项:
BASH``` 1npm install
构建服务器:
BASH```
1npm run build
启动MCP服务器
使用MCP检查器(用于调试):
BASH``` 1npm run start
**使用不同的传输协议:**
BASH```
1
2
3
4# SSE transport (Server-Sent Events)
npm run start:sse
# Streamable HTTP transport
npm run start:streamable
直接节点命令:
BASH``` 1 2 3 4 5 6# 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:
BASH```
1
2
3
4
5
6# 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
📄 许可证
麻省理工学院@hustcc.