aws-diagram
Overview
The aws-diagram MCP server is a Model Context Protocol (MCP) server that enables AI assistants and agents to programmatically generate professional diagrams — such as AWS architecture diagrams, sequence flows, and class diagrams — through a prompt-driven interface. It uses the Python diagrams package DSL to turn structured diagram descriptions into visual output, making it easy to include infrastructure visuals inside AI-augmented workflows.
Transport
stdio
Tools
Key Capabilities
- Diagram generation — Produce AWS architecture diagrams, sequence diagrams, workflow charts, class diagrams, and more from Python code via AI prompts.
- Multiple diagram types — Support for diverse categories including cloud architecture, flow charts, sequence flows, and custom visuals.
- Structured examples — Built-in example retrieval helps agents and users quickly get started with template code for common diagram scenarios.
- Customizable visuals — Customize diagram layout, styling, and component arrangement using parameters exposed through the MCP interface.
- Secure generation pipeline — Diagram execution includes code scanning and validation to ensure safety before rendering.
How It Works
The aws-diagram MCP server runs as a local or containerized MCP service and listens for diagram generation requests from AI clients. When a tool like generate_diagram is invoked, the server takes Python code written in the diagrams DSL — either generated by the AI assistant or provided by the user — and uses the diagrams package along with GraphViz to render the visual output.
Clients configure the server in their MCP settings (e.g., via a mcp.json entry) so that AI tools like Amazon Q CLI, Kiro, or IDE integrations (VS Code, Cursor) can call it as a native capability. Once connected, agents can request diagrams by describing the desired architecture or workflow; the server executes the diagram code and returns structured metadata including the file path and rendering status.