Skip to main content

Cloud Native Architecture MCP Server

An MCP (Model Context Protocol) server that provides tools to generate architecture diagrams for cloud-native infrastructure:

  • Kubernetes cluster diagrams
  • AWS infrastructure diagrams
  • GCP infrastructure diagrams

Built using the Diagrams library to create professional, visual architecture diagrams programmatically.

Features

  • Three specialized tools for different cloud platforms
  • Visual diagram generation with proper cloud provider icons
  • Cluster/VPC grouping support for organizing components
  • Connection mapping between components
  • Returns diagrams as images directly in MCP responses

Installation

From PyPI (Recommended)

pip install cloud-native-architecture-mcp

Or use with uvx for on-demand execution:

uvx cloud-native-architecture-mcp

From Source

git clone https://github.com/yourusername/cloud-native-architecture-mcp-server
cd cloud-native-architecture-mcp-server
pip install -e .

Prerequisites

This package requires Graphviz to be installed on your system:

macOS:

brew install graphviz

Ubuntu/Debian:

sudo apt-get install graphviz

Windows: Download from graphviz.org

Usage with MCP Clients

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "cloud-architecture": {
      "command": "uvx",
      "args": ["cloud-native-architecture-mcp"]
    }
  }
}

AgentGateway

Add to your AgentGateway configuration:

mcp_servers:
  - name: cloud-architecture
    stdio:
      cmd: uvx
      args: ["cloud-native-architecture-mcp"]

Available Tools

1. build-kubernetes-diagram

Build Kubernetes architecture diagrams with support for:

  • Deployments, StatefulSets, DaemonSets, Jobs, Pods
  • Services, Ingress
  • PVCs, PVs, StorageClass
  • ConfigMaps, Secrets
  • HPA (Horizontal Pod Autoscaler)
  • Namespace clustering

Example Input:

{
  "name": "microservices-app",
  "components": [
    {"type": "deployment", "name": "api-server", "replicas": 3},
    {"type": "service", "name": "api-svc"},
    {"type": "ingress", "name": "main-ingress"},
    {"type": "deployment", "name": "worker", "replicas": 2},
    {"type": "pvc", "name": "shared-storage"}
  ],
  "clusters": [
    {
      "name": "Production Namespace",
      "components": ["api-server", "api-svc", "worker"]
    }
  ],
  "connections": [
    {"from": "main-ingress", "to": "api-svc", "label": "HTTPS"},
    {"from": "api-svc", "to": "api-server"},
    {"from": "api-server", "to": "shared-storage"}
  ]
}

2. build-aws-diagram

Build AWS infrastructure diagrams with support for:

  • Compute: EC2, ECS, EKS, Lambda
  • Database: RDS, DynamoDB, ElastiCache, Redshift
  • Storage: S3, EBS, EFS
  • Network: ALB, NLB, ELB, CloudFront, Route53, VPC
  • Integration: SQS, SNS, EventBridge
  • VPC grouping

Example Input:

{
  "name": "webapp-infrastructure",
  "components": [
    {"type": "route53", "name": "dns"},
    {"type": "alb", "name": "load-balancer"},
    {"type": "ec2", "name": "web-server"},
    {"type": "rds", "name": "postgres-db"},
    {"type": "s3", "name": "assets-bucket"},
    {"type": "elasticache", "name": "redis-cache"}
  ],
  "vpcs": [
    {
      "name": "Production VPC",
      "components": ["web-server", "postgres-db", "redis-cache", "load-balancer"]
    }
  ],
  "connections": [
    {"from": "dns", "to": "load-balancer"},
    {"from": "load-balancer", "to": "web-server"},
    {"from": "web-server", "to": "postgres-db"},
    {"from": "web-server", "to": "redis-cache"},
    {"from": "web-server", "to": "assets-bucket"}
  ]
}

3. build-gcp-diagram

Build GCP infrastructure diagrams with support for:

  • Compute: GCE, GKE, Cloud Functions
  • Database: Cloud SQL, Firestore, BigTable, Spanner
  • Storage: GCS, Persistent Disk
  • Network: Load Balancing, Cloud DNS, VPC
  • Analytics: BigQuery, Dataflow, Pub/Sub
  • VPC/Network grouping

Example Input:

{
  "name": "data-processing-pipeline",
  "components": [
    {"type": "gcs", "name": "input-bucket"},
    {"type": "functions", "name": "process-files"},
    {"type": "pubsub", "name": "events"},
    {"type": "dataflow", "name": "etl-pipeline"},
    {"type": "bigquery", "name": "data-warehouse"}
  ],
  "connections": [
    {"from": "input-bucket", "to": "process-files", "label": "trigger"},
    {"from": "process-files", "to": "events"},
    {"from": "events", "to": "etl-pipeline"},
    {"from": "etl-pipeline", "to": "data-warehouse"}
  ]
}

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/yourusername/cloud-native-architecture-mcp-server
cd cloud-native-architecture-mcp-server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode with dev dependencies
pip install -e ".[dev]"

Testing Locally

You can test the MCP server directly:

# Run the server
python -m cloud_native_architecture_mcp.server

Or use with an MCP client like the MCP Inspector:

npx @modelcontextprotocol/inspector uvx cloud-native-architecture-mcp

Publishing to PyPI

Prerequisites

  1. Create accounts on:

  2. Install build tools:

pip install build twine

Build and Publish

  1. Build the package:
python -m build
  1. Test on TestPyPI first:
twine upload --repository testpypi dist/*
  1. Install from TestPyPI to verify:
pip install --index-url https://test.pypi.org/simple/ cloud-native-architecture-mcp
  1. Publish to PyPI:
twine upload dist/*
  1. Verify installation:
pip install cloud-native-architecture-mcp

Architecture

cloud-native-architecture-mcp-server/
├── src/
│   └── cloud_native_architecture_mcp/
│       ├── __init__.py
│       └── server.py          # Main MCP server implementation
├── pyproject.toml             # Package configuration
├── README.md
└── LICENSE

How It Works

  1. MCP Client (Claude Desktop, AgentGateway, etc.) calls one of the three tools
  2. MCP Server receives the component configuration (JSON)
  3. Diagrams Library generates the architecture diagram using Graphviz
  4. Server returns the diagram as a base64-encoded PNG image
  5. Client displays the visual diagram to the user

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Education

Resources

Support

For issues, questions, or contributions, please visit the GitHub repository.

Why So Much JSON?

MCP communicates via the JSON-RPC protocol. All tools within an MCP Server, parameters, and responses are transmitted as JSON. If the JSON didn't exist, the MCP client wouldn't know what parameters to send and what the tool actually does. JSON-RPC is the MCP communication protocol

Metadata

Release files for cloud-native-architecture-mcp 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloud-native-architecture-mcp 0.1.5
File Size Uploaded
cloud_native_architecture_mcp-0.1.5.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloud-native-architecture-mcp 0.1.5
File Interpreter ABI Platform
cloud_native_architecture_mcp-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / cloud_native_architecture_mcp-0.1.5.tar.gz

Download URL cloud_native_architecture_mcp-0.1.5.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
afbb33719cb11155b1ebe1afa8a8c3eccaa591dd6bd18f9960a22b5b80044089
BLAKE2b-256 checksum
How to use checksums
cd843ee66e43738de0ca37a938b07f0a1b2fc30fcaff4d333381cc19faa33438
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / cloud_native_architecture_mcp-0.1.5-py3-none-any.whl

Download URL cloud_native_architecture_mcp-0.1.5-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bbe0513b2bd2abe374ed15b411b2f4c273542ffa540f4c7cb26566165507cbf
BLAKE2b-256 checksum
How to use checksums
27d3cf6b116a5d11138d44492f3711de7635b8cc1cf6d48a9d4277be773af086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page