Skip to content

AWS architecture diagram generator using Python Diagrams package and AWS Diagrams MCP Server in Python code for command line or web interfaces

License

Notifications You must be signed in to change notification settings

cwcala/python-mcp-diagram-generator

Repository files navigation

Python MCP Architecture Diagram Generator

AI-powered AWS architecture diagram generator using Amazon Bedrock and MCP protocol for ISV Solutions Architects.

🚀 Quick Start

Prerequisites

# Install system dependencies
brew install graphviz  # macOS
# sudo apt-get install graphviz  # Ubuntu

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Configure AWS

export AWS_ACCESS_KEY_ID=your_key
export AWS_SECRET_ACCESS_KEY=your_secret
export AWS_DEFAULT_REGION=us-east-1

Generate Diagrams

CLI Tool (Recommended):

# PNG only
python3 mcp_cli.py "Create a serverless web API with Lambda and DynamoDB"

# PNG + Draw.io
python3 mcp_cli.py "Create a serverless web API with Lambda and DynamoDB" --drawio

Web Interface:

python3 efficient_web_interface.py
# Open http://127.0.0.1:8080

📁 Core Files

  • mcp_cli.py - CLI tool for diagram generation
  • mcp_server.py - MCP server for diagram processing
  • mcp_diagram_client.py - MCP client library
  • efficient_web_interface.py - Web interface
  • requirements.txt - Python dependencies

🏗️ Architecture

User Input → Bedrock (Claude 3) → MCP Server → Diagrams Library → PNG + Draw.io

📄 Example Usage

python3 mcp_cli.py "Multi-tenant SaaS with API Gateway, Lambda, DynamoDB, and Cognito" --drawio

Output:

  • saas_web_api_architecture.png - Professional diagram
  • saas_web_api_architecture.drawio - Editable file

🛠️ ISV Use Cases

  • AWS Marketplace listings
  • Co-sell presentations
  • Architecture reviews
  • Compliance documentation

📋 Requirements

  • Python 3.8+
  • AWS credentials with Bedrock access
  • Graphviz system dependency

About

AWS architecture diagram generator using Python Diagrams package and AWS Diagrams MCP Server in Python code for command line or web interfaces

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published