Diagrams MCP Server

Diagrams MCP Server

Enables creation of infrastructure and architecture diagrams as code using the Python diagrams library, supporting 15+ cloud providers, 500+ node types, custom icons, and flowcharts with multiple output formats.

Category
访问服务器

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:
    • macOS: brew install graphviz
    • Ubuntu/Debian: sudo apt-get install graphviz
    • Windows: Download from https://graphviz.org/download/

IDEs

Install in VS Code

Install MCP Server

Claude Desktop

Add to your claude_desktop_config.json:

For published package:

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

For local development:

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

Claude Code

Quick setup (CLI):

Published package:

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

Local development:

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:

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

Verify installation:

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)

Tool Description
create_diagram Full infrastructure/architecture diagrams with all providers
create_diagram_with_custom_icons Diagrams with custom node icons from URLs or local files
create_flowchart Simplified flowchart creation with 24 process shapes

Discovery & Validation (2 tools)

Tool Description
list_available_nodes Search 500+ available nodes by provider, category, or keyword
validate_diagram_spec Dry-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

# Run all tests
uv run poe test

Development Modes

STDIO mode (for Claude Desktop integration):

uv run diagrams-mcp

HTTP mode (for containerised deployments):

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选