Diagrams

DevOps

by apetta

本地或远程 MCP server,基于 Python diagrams 库以代码生成基础设施、架构和流程图,适合快速绘制云资源与系统设计。

什么是 Diagrams

本地或远程 MCP server,基于 Python diagrams 库以代码生成基础设施、架构和流程图,适合快速绘制云资源与系统设计。

README

Diagrams MCP Server

MCP server for generating infrastructure and architecture diagrams as code using the Python diagrams library.

Python 3.11+ License: MIT Smithery

Features

5 Diagram Tools for infrastructure, architecture, and flowcharts:

  • Infrastructure Diagrams - 15+ providers (AWS, Azure, GCP, K8s, On-Prem, SaaS)
  • 500+ Node Types - Compute, database, network, storage, security
  • Custom Icons - Web URLs (HTTPS) and local files
  • Flowcharts - 24 shapes for process diagrams
  • Validation - Dry-run before generation

Advanced Capabilities:

  • Multiple output formats (PNG, PDF, JPG, DOT)
  • Cluster grouping with unlimited nesting
  • Edge styling (colours, labels, line styles)
  • Graphviz attribute customisation

Installation

System Requirements:

  • Graphviz must be installed:

IDEs

Install in VS Code

Install MCP Server

Claude Desktop

Add to your claude_desktop_config.json:

For published package:

json
{
  "mcpServers": {
    "diagrams": {
      "command": "uvx",
      "args": ["diagrams-mcp"]
    }
  }
}

For local development:

json
{
  "mcpServers": {
    "diagrams:local": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/diagrams-mcp",
        "run",
        "diagrams-mcp"
      ]
    }
  }
}

Claude Code

Quick setup (CLI):

Published package:

bash
claude mcp add --transport stdio math -- uvx diagrams-mcp

Local development:

bash
claude mcp add --transport stdio math -- uvx --from /absolute/path/to/diagrams-mcp diagrams-mcp

Team setup (project-level):

Add .mcp.json to your project root:

json
{
  "mcpServers": {
    "diagrams": {
      "command": "uvx",
      "args": ["diagrams-mcp"]
    }
  }
}

Verify installation:

bash
claude mcp list

Or check in IDE: View → MCP Servers, or use /mcp command.

Try It

Once installed, try these prompts:

  • "Create an AWS 3-tier web application diagram with Route53, ELB, EC2 instances, and RDS"
  • "Generate a Kubernetes microservices architecture with ingress, services, and pods"
  • "Build a flowchart for a CI/CD pipeline with decision points"
  • "Create a diagram using a custom icon from my company logo URL"
  • "Show me all available AWS compute nodes"

Map to tools: create_diagram, create_diagram_with_custom_icons, create_flowchart, list_available_nodes, validate_diagram_spec

Tool Reference

All tool parameters and descriptions are available in your IDE's autocomplete.

Diagram Generation (3 tools)

ToolDescription
create_diagramFull infrastructure/architecture diagrams with all providers
create_diagram_with_custom_iconsDiagrams with custom node icons from URLs or local files
create_flowchartSimplified flowchart creation with 24 process shapes

Discovery & Validation (2 tools)

ToolDescription
list_available_nodesSearch 500+ available nodes by provider, category, or keyword
validate_diagram_specDry-run validation before generation

Custom Icons

Web URL Icons

  • HTTPS-only (HTTP rejected)
  • 5MB file size limit
  • 5-second download timeout
  • Image format validation (PNG, JPG)
  • Automatic caching (~/.diagrams_mcp/icon_cache)

Local File Icons

  • Path validation (file must exist)
  • Format validation
  • Sandboxed execution

Development

Running Tests

bash
# Run all tests
uv run poe test

Development Modes

STDIO mode (for Claude Desktop integration):

bash
uv run diagrams-mcp

HTTP mode (for containerised deployments):

bash
uv run diagrams-mcp-http --port 8000

License

MIT License. See LICENSE file for details.

Contributing

Contributions welcome via PRs! Please ensure:

  1. Tests pass, and new ones are added if applicable
  2. Code is linted & formatted
  3. Type hints are included
  4. Clear, actionable error messages are provided

Support

For issues and questions, please open an issue on GitHub.

常见问题

Diagrams 是什么?

本地或远程 MCP server,基于 Python diagrams 库以代码生成基础设施、架构和流程图,适合快速绘制云资源与系统设计。

相关 Skills

环境密钥管理

by alirezarezvani

Universal
热门

统一梳理dev/staging/prod的.env和密钥流程,自动生成.env.example、校验必填变量、扫描Git历史泄漏,并联动Vault、AWS SSM、1Password、Doppler完成轮换。

统一管理环境变量、密钥与配置,减少泄露和部署混乱,安全治理与团队协作一起做好,DevOps 场景很省心。

DevOps
未扫描15.4k

可观测性设计

by alirezarezvani

Universal
热门

面向生产系统规划可落地的可观测性体系,串起指标、日志、链路追踪与 SLI/SLO、错误预算、告警和仪表盘设计,适合搭建监控平台与优化故障响应。

把监控、日志、链路追踪串起来,帮助团队从设计阶段构建可观测性,排障更快、系统演进更稳。

DevOps
未扫描15.4k

更新日志

by alirezarezvani

Universal
热门

基于 Conventional Commits 自动解析提交记录、判断语义化版本升级并生成规范 changelog,适合在 CI、发版前检查提交格式并批量输出可审计发布说明。

自动生成和管理更新日志与发布说明,帮团队把版本变更说清楚;聚焦版本化与流程自动化,省时又更规范。

DevOps
未扫描15.4k

相关 MCP Server

kubefwd

编辑精选

by txn2

热门

kubefwd 是让 AI 帮你批量转发 Kubernetes 服务到本地的开发神器。

微服务开发者最头疼的本地调试问题,它一键搞定——自动分配 IP 避免端口冲突,还能用自然语言查询状态。但依赖 AI 工作流,纯命令行爱好者可能觉得不够直接。

DevOps
4.1k

Cloudflare

编辑精选

by Cloudflare

热门

Cloudflare MCP Server 是让你用自然语言管理 Workers、KV 和 R2 等云资源的工具。

这个工具解决了开发者频繁切换控制台和文档的痛点,特别适合那些在 Cloudflare 上部署无服务器应用、需要快速调试或管理配置的团队。不过,由于它依赖多个子服务器,初次设置可能有点繁琐,建议先从 Workers Bindings 这类核心功能入手。

DevOps
3.8k

Terraform

编辑精选

by hashicorp

热门

Terraform MCP Server 是让 AI 助手直接操作 Terraform Registry 和 HCP Terraform 的桥梁。

如果你经常在 Terraform 里翻文档找模块配置,这个服务器能省不少时间——直接问 Claude 就能生成准确的代码片段。最适合管理多云基础设施的团队,但注意它目前只适合本地使用,别在生产环境里暴露 HTTP 端点。

DevOps
1.4k

评论