Python MCP架构图生成器
使用Amazon Bedrock和MCP协议为ISV解决方案架构师提供AI驱动的AWS架构图生成器。
🚀 快速开始
先决条件
# 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配置AWS
export AWS_ACCESS_KEY_ID=your_key
export AWS_SECRET_ACCESS_KEY=your_secret
export AWS_DEFAULT_REGION=us-east-1生成图表
CLI工具(推荐):
# 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" --drawioWeb界面:
python3 efficient_web_interface.py
# Open http://127.0.0.1:8080📁 核心文件
mcp_cli.py-用于生成图表的CLI工具mcp_server.py-用于图表处理的MCP服务器mcp_diagram_client.py-MCP客户端库efficient_web_interface.py-Web界面requirements.txt-Python依赖关系
🏗️ 建筑
User Input → Bedrock (Claude 3) → MCP Server → Diagrams Library → PNG + Draw.io📄 示例用法
python3 mcp_cli.py "Multi-tenant SaaS with API Gateway, Lambda, DynamoDB, and Cognito" --drawio输出:
saas_web_api_architecture.png-专业图表saas_web_api_architecture.drawio-可编辑文件
🛠️ ISV用例
- AWS市场列表
- 共同销售演示文稿
- 架构审查
- 合规性文件
📋 需求
- Python 3.8+
- 具有Bedrock访问权限的AWS凭据
- Graphviz系统依赖性
