# Diagrams MCP Server
MCP server for generating infrastructure and architecture diagrams as code using the Python [diagrams](https://diagrams.mingrammer.com/) library.
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://smithery.ai/server/@apetta/diagrams-mcp)
## 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
[](vscode:mcp/install?%7B%22name%22%3A%22diagrams%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22diagrams-mcp%22%5D%7D)
[](https://cursor.com/en-US/install-mcp?name=diagrams&config=eyJjb21tYW5kIjoidXZ4IGRpYWdyYW1zLW1jcCJ9)
### 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)
| 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
```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.
Raw data
{
"_id": null,
"home_page": null,
"name": "diagrams-mcp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "mcp, diagrams, architecture, infrastructure, cloud, aws, azure, gcp, kubernetes, devops, graphviz",
"author": "Akshay Petta",
"author_email": "Akshay Petta <33671231+apetta@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/c6/b1/45248b73acd6c20eef05350155259f5ba118505829b12849dc82d33974d8/diagrams_mcp-1.0.0.tar.gz",
"platform": null,
"description": "# Diagrams MCP Server\n\nMCP server for generating infrastructure and architecture diagrams as code using the Python [diagrams](https://diagrams.mingrammer.com/) library.\n\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n[](https://smithery.ai/server/@apetta/diagrams-mcp)\n\n## Features\n\n**5 Diagram Tools** for infrastructure, architecture, and flowcharts:\n\n- **Infrastructure Diagrams** - 15+ providers (AWS, Azure, GCP, K8s, On-Prem, SaaS)\n- **500+ Node Types** - Compute, database, network, storage, security\n- **Custom Icons** - Web URLs (HTTPS) and local files\n- **Flowcharts** - 24 shapes for process diagrams\n- **Validation** - Dry-run before generation\n\n**Advanced Capabilities:**\n\n- Multiple output formats (PNG, PDF, JPG, DOT)\n- Cluster grouping with unlimited nesting\n- Edge styling (colours, labels, line styles)\n- Graphviz attribute customisation\n\n## Installation\n\n**System Requirements:**\n\n- Graphviz must be installed:\n - macOS: `brew install graphviz`\n - Ubuntu/Debian: `sudo apt-get install graphviz`\n - Windows: Download from https://graphviz.org/download/\n\n### IDEs\n\n[](vscode:mcp/install?%7B%22name%22%3A%22diagrams%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22diagrams-mcp%22%5D%7D)\n\n[](https://cursor.com/en-US/install-mcp?name=diagrams&config=eyJjb21tYW5kIjoidXZ4IGRpYWdyYW1zLW1jcCJ9)\n\n### Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n**For published package:**\n\n```json\n{\n \"mcpServers\": {\n \"diagrams\": {\n \"command\": \"uvx\",\n \"args\": [\"diagrams-mcp\"]\n }\n }\n}\n```\n\n**For local development:**\n\n```json\n{\n \"mcpServers\": {\n \"diagrams:local\": {\n \"command\": \"uv\",\n \"args\": [\n \"--directory\",\n \"/ABSOLUTE/PATH/TO/diagrams-mcp\",\n \"run\",\n \"diagrams-mcp\"\n ]\n }\n }\n}\n```\n\n### Claude Code\n\n**Quick setup (CLI):**\n\nPublished package:\n\n```bash\nclaude mcp add --transport stdio math -- uvx diagrams-mcp\n```\n\nLocal development:\n\n```bash\nclaude mcp add --transport stdio math -- uvx --from /absolute/path/to/diagrams-mcp diagrams-mcp\n```\n\n**Team setup (project-level):**\n\nAdd `.mcp.json` to your project root:\n\n```json\n{\n \"mcpServers\": {\n \"diagrams\": {\n \"command\": \"uvx\",\n \"args\": [\"diagrams-mcp\"]\n }\n }\n}\n```\n\n**Verify installation:**\n\n```bash\nclaude mcp list\n```\n\nOr check in IDE: View \u2192 MCP Servers, or use `/mcp` command.\n\n## Try It\n\nOnce installed, try these prompts:\n\n- \"Create an AWS 3-tier web application diagram with Route53, ELB, EC2 instances, and RDS\"\n- \"Generate a Kubernetes microservices architecture with ingress, services, and pods\"\n- \"Build a flowchart for a CI/CD pipeline with decision points\"\n- \"Create a diagram using a custom icon from my company logo URL\"\n- \"Show me all available AWS compute nodes\"\n\nMap to tools: `create_diagram`, `create_diagram_with_custom_icons`, `create_flowchart`, `list_available_nodes`, `validate_diagram_spec`\n\n## Tool Reference\n\nAll tool parameters and descriptions are available in your IDE's autocomplete.\n\n### Diagram Generation (3 tools)\n\n| Tool | Description |\n| ---------------------------------- | ------------------------------------------------------------ |\n| `create_diagram` | Full infrastructure/architecture diagrams with all providers |\n| `create_diagram_with_custom_icons` | Diagrams with custom node icons from URLs or local files |\n| `create_flowchart` | Simplified flowchart creation with 24 process shapes |\n\n### Discovery & Validation (2 tools)\n\n| Tool | Description |\n| ----------------------- | ------------------------------------------------------------- |\n| `list_available_nodes` | Search 500+ available nodes by provider, category, or keyword |\n| `validate_diagram_spec` | Dry-run validation before generation |\n\n## Custom Icons\n\n### Web URL Icons\n\n- HTTPS-only (HTTP rejected)\n- 5MB file size limit\n- 5-second download timeout\n- Image format validation (PNG, JPG)\n- Automatic caching (~/.diagrams_mcp/icon_cache)\n\n### Local File Icons\n\n- Path validation (file must exist)\n- Format validation\n- Sandboxed execution\n\n## Development\n\n### Running Tests\n\n```bash\n# Run all tests\nuv run poe test\n```\n\n### Development Modes\n\n**STDIO mode** (for Claude Desktop integration):\n\n```bash\nuv run diagrams-mcp\n```\n\n**HTTP mode** (for containerised deployments):\n\n```bash\nuv run diagrams-mcp-http --port 8000\n```\n\n## License\n\nMIT License. See `LICENSE` file for details.\n\n## Contributing\n\nContributions welcome via PRs! Please ensure:\n\n1. Tests pass, and new ones are added if applicable\n2. Code is linted & formatted\n3. Type hints are included\n4. Clear, actionable error messages are provided\n\n## Support\n\nFor issues and questions, please open an issue on GitHub.\n",
"bugtrack_url": null,
"license": null,
"summary": "MCP server for generating infrastructure and architecture diagrams as code using the Python diagrams library",
"version": "1.0.0",
"project_urls": null,
"split_keywords": [
"mcp",
" diagrams",
" architecture",
" infrastructure",
" cloud",
" aws",
" azure",
" gcp",
" kubernetes",
" devops",
" graphviz"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1827a3b7b75ed5dbde53074c3aeb916ae762076005e199cabb8155e487138434",
"md5": "18767a62f464c277a01d5708fbf163a6",
"sha256": "6c2619de1a6747c12d644ec80540508fa5174ca168adda03d413cbbbe36dd97e"
},
"downloads": -1,
"filename": "diagrams_mcp-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "18767a62f464c277a01d5708fbf163a6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 26716,
"upload_time": "2025-11-09T13:08:21",
"upload_time_iso_8601": "2025-11-09T13:08:21.722205Z",
"url": "https://files.pythonhosted.org/packages/18/27/a3b7b75ed5dbde53074c3aeb916ae762076005e199cabb8155e487138434/diagrams_mcp-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c6b145248b73acd6c20eef05350155259f5ba118505829b12849dc82d33974d8",
"md5": "94d1c723561645af5e3eeb3fc4c8189d",
"sha256": "4099b77793f87f8f61461fcb4f0d5f7b101ec92c293a3d0623fd15938912692e"
},
"downloads": -1,
"filename": "diagrams_mcp-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "94d1c723561645af5e3eeb3fc4c8189d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 22643,
"upload_time": "2025-11-09T13:08:22",
"upload_time_iso_8601": "2025-11-09T13:08:22.650163Z",
"url": "https://files.pythonhosted.org/packages/c6/b1/45248b73acd6c20eef05350155259f5ba118505829b12849dc82d33974d8/diagrams_mcp-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-11-09 13:08:22",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "diagrams-mcp"
}