Mermaid MCP 服务器

Mermaid MCP 服务器

一个将 Mermaid 图表转换为 PNG 图像的 Model Context Protocol (MCP) 服务器。

快速入门

  1. 克隆仓库: git clone https://github.com/peng-shawn/mermaid-mcp-server.git

  2. 构建项目: npx tsc

  3. 使用示例运行服务:

    • 启动服务器:node dist/index.js
    • 使用 Inspector 调试:npx @modelcontextprotocol/inspector node dist/index.js
  4. 基本用法:

    • 输入 Mermaid 代码生成图表,例如: { "code": "flowchart TD\n A[Start] --> B{Is it?}\n B -->|Yes| C[OK]\n B -->|No| D[End]" }
  5. Docker 支持:确保容器安装了 Puppeteer 的依赖项。

更多高级用法请参考 README 文档。