Skip to main content

MCP Server for generating Mermaid diagrams with built-in features

Project description

🎨 MCP-Mermaid

智能Mermaid图表生成工具,支持布局优化、主题系统和高质量输出的MCP服务器。

Python Version License PyPI

✨ 核心特性

  • 🎯 智能布局优化 - 自动分析图表结构,选择最优布局方案
  • 🎨 多主题系统 - 5种专业主题,适配不同使用场景
  • 📸 高质量输出 - 支持多种分辨率,确保图表清晰度
  • ☁️ 自动上传 - 集成ImageBB,生成永久访问链接
  • 🔧 MCP协议 - 完整的Model Context Protocol支持
  • 🌐 跨平台 - 支持Linux、macOS、Windows

🚀 快速开始

安装

pip install mcp-mermaid

基本使用

# 查看版本
mcp-mermaid --version

# 查看可用工具
mcp-mermaid --help-tools

# 启动MCP服务器
mcp-mermaid

MCP客户端集成

MCP-Mermaid可以作为工具被AI助手调用,生成高质量的Mermaid图表:

# 示例:通过MCP协议生成流程图
{
    "content": "graph TD; A-->B; B-->C; C-->D",
    "optimize_layout": True,
    "theme": "professional", 
    "quality": "high",
    "upload_image": True
}

🎨 主题展示

支持5种专业主题:

  • professional - 商务专业风格
  • compact - 紧凑信息密集型
  • minimal - 极简清爽风格
  • dark-pro - 深色专业主题
  • default - 经典默认样式

📋 系统要求

  • Python 3.8+
  • Node.js 16+ (用于图表渲染)
  • 系统emoji字体支持

🔧 高级配置

质量设置

  • low - 快速生成,适合预览
  • medium - 平衡质量与速度
  • high - 最高质量,适合正式文档

布局优化

智能识别图表类型并自动优化:

  • 高密度图表 → TB方向 + 紧凑布局
  • 层次结构 → 分层显示优化
  • 流程图表 → LR方向 + 流程对齐
  • 网络图表 → 力导向布局

🤝 贡献指南

欢迎提交Issue和Pull Request!

  1. Fork项目
  2. 创建功能分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m 'Add amazing feature')
  4. 推送分支 (git push origin feature/amazing-feature)
  5. 开启Pull Request

📄 许可证

本项目采用MIT许可证 - 查看 LICENSE 文件了解详情。

🔗 相关链接

📈 更新日志

查看 CHANGELOG.md 了解版本更新详情。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_mermaid-0.3.2.tar.gz (948.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_mermaid-0.3.2-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_mermaid-0.3.2.tar.gz.

File metadata

  • Download URL: mcp_mermaid-0.3.2.tar.gz
  • Upload date:
  • Size: 948.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_mermaid-0.3.2.tar.gz
Algorithm Hash digest
SHA256 79615f1b91adcee10a7e65673f3c3522088ff88d201dcf2ebe6990015a7b288e
MD5 0a45bc2fd2069615c54c789a950bb0ad
BLAKE2b-256 805d4eb2ee925438897c39c9c74a07550a7c201a4637fbdaf56c4ba03d38190e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_mermaid-0.3.2.tar.gz:

Publisher: publish.yml on phoenixwu0229/mcp-mermaid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_mermaid-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: mcp_mermaid-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_mermaid-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a03db6eb03ac764dfa13f39573e5db2ce54d4b238a886866b562d0ab0ed0304a
MD5 67d4bd4cea65dae309a054bab3940da1
BLAKE2b-256 3bce251261bf5cd8b8246c22962d72fabceff42a00bc43a6a99920f6abccf322

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_mermaid-0.3.2-py3-none-any.whl:

Publisher: publish.yml on phoenixwu0229/mcp-mermaid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page