🎨 MCP-Mermaid
智能Mermaid图表生成工具,支持布局优化、主题系统和高质量输出的MCP服务器。
✨ 核心特性
- 🎯 智能布局优化 - 自动分析图表结构,选择最优布局方案
- 🎨 多主题系统 - 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!
- Fork项目
- 创建功能分支 (
git checkout -b feature/amazing-feature) - 提交更改 (
git commit -m 'Add amazing feature') - 推送分支 (
git push origin feature/amazing-feature) - 开启Pull Request
📄 许可证
本项目采用MIT许可证 - 查看 LICENSE 文件了解详情。
🔗 相关链接
📈 更新日志
查看 CHANGELOG.md 了解版本更新详情。
Metadata
Release files for mcp-mermaid 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_mermaid-0.3.5.tar.gz | 950.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_mermaid-0.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.9 MB
Release files / mcp_mermaid-0.3.5.tar.gz
| Download URL | mcp_mermaid-0.3.5.tar.gz |
|---|---|
| Size | 950.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
042c4a1d65e2b5053450edc6341956a9b94e42a5441a2eb463d46e39d600d17e
|
|
BLAKE2b-256 checksum How to use checksums |
40eadefcddb1f7eead4321bb231bf7f1db48ca227b05bf874b1a90cf9168dae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.
Transparency logRelease files / mcp_mermaid-0.3.5-py3-none-any.whl
| Download URL | mcp_mermaid-0.3.5-py3-none-any.whl |
|---|---|
| Size | 928.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15c79cb89ce74941ba3a6925fb20a601bc7fa3fe56781ddb308f472aaf8fbf52
|
|
BLAKE2b-256 checksum How to use checksums |
5f762e2abc704115a5a530073dba32621448d09be68086fb227a8980d3a75fab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.
Transparency logSecurity for mcp-mermaid 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mcp_mermaid-0.3.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.