devopsbymuh_
← All tools
Guide · AWS · MCP

AWS Architecture Diagrams with MCP

Generate professional, best-practice AWS architecture diagrams from plain-English prompts — using Kiro CLI with the AWS Diagram MCP server and AWS Documentation MCP server. The agent reads AWS docs for best practices, then renders a diagram with the Python diagrams package and the official AWS icon set — in minutes instead of hours.

How it fits together: MCP (Model Context Protocol) is an open standard that connects an AI host (Kiro CLI) to lightweight servers that expose tools. Here, one server draws diagrams and another reads AWS docs, so the model designs against real AWS guidance.

Prerequisites

1Install & sign in to Kiro CLI

Install Kiro CLI (standalone), then verify and log in:

kiro-cli --version        # → kiro-cli x.x.x
kiro-cli login            # choose AWS Builder ID to experiment

2Install the MCP server dependencies

Install uv, Python, and GraphViz (the diagrams package renders through GraphViz):

pip install uv
uv python install 3.10
# then install GraphViz for your OS (brew install graphviz, apt-get install graphviz, …)

3Register the MCP servers

Add both servers to ~/.kiro/settings/mcp.json. Kiro CLI auto-discovers them on start:

{
  "mcpServers": {
    "awslabs.aws-diagram-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.aws-diagram-mcp-server"],
      "env": { "FASTMCP_LOG_LEVEL": "ERROR" },
      "autoApprove": [],
      "disabled": false
    },
    "awslabs.aws-documentation-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"],
      "env": { "FASTMCP_LOG_LEVEL": "ERROR" },
      "autoApprove": [],
      "disabled": false
    }
  }
}

4Verify the setup

Launch the chat, confirm the servers loaded, then generate a test diagram:

kiro-cli
/mcp                      # confirm both servers are initialized

Then paste a prompt like:

Create a diagram showing an EC2 instance in a VPC connecting to an
external S3 bucket. Include VPC, subnets, Internet Gateway, Route Table,
Security Groups, and NACLs. Label everything concisely and mark all
resources as us-east-1. Check AWS documentation for best practices first.

Kiro asks you to trust the tool — enter t. A PNG is saved to a generated-diagrams folder.

The MCP tools

list_icons
Lists available icons from the diagrams package, by provider and service category.
get_diagram_examples
Example code for AWS, sequence, flow, and class diagrams.
generate_diagram
Renders a diagram from Python code using the diagrams package.
search_documentation
Searches official AWS documentation via the AWS Docs Search API.
read_documentation
Fetches an AWS docs page and converts it to markdown.
recommend
Returns related AWS documentation for a given page.

When you send a prompt, the agent interprets the requirements, checks AWS docs for best practices, lists the needed icons, generates diagrams Python code, runs it, and returns the image — so you describe what you want, not how to draw it.

Copy-paste example prompts

Simple web application

Create a diagram for a simple web application with an Application Load Balancer, two EC2 instances, and an RDS database. Check the AWS documentation to ensure it adheres to AWS best practices before you create the diagram.

Three-tier architecture

Create a diagram for a three-tier web application with a presentation tier (ALB and CloudFront), application tier (ECS with Fargate), and data tier (Aurora PostgreSQL). Include a VPC with public and private subnets across multiple AZs.

Serverless application

Create a diagram for a serverless web application using API Gateway, Lambda, DynamoDB, and S3 for static hosting. Include Cognito for authentication and CloudFront for content delivery.

Data processing pipeline

Create a diagram for a data processing pipeline organized in clusters for ingestion, processing, storage, and analytics. Include Kinesis, Lambda, S3, Glue, and QuickSight.

Tips for clean diagrams

Prefer a no-install option? Try the System Design Generator — flip on AWS mode to get an AWS-labelled architecture diagram right in the browser, with capacity numbers and a sequence view.

Workflow adapted from the AWS Machine Learning Blog, “Build AWS architecture diagrams using Kiro CLI and MCP.” See the official AWS MCP servers and the AWS Architecture Icons.