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.
README
Diagrams MCP Server
MCP server for generating infrastructure and architecture diagrams as code using the Python diagrams library.
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/
- macOS:
IDEs
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:
- Tests pass, and new ones are added if applicable
- Code is linted & formatted
- Type hints are included
- Clear, actionable error messages are provided
Support
For issues and questions, please open an issue on GitHub.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.