While trying to follow the official AWS tutorial “Build AWS architecture diagrams using Amazon Q CLI and MCP” to generate architecture diagrams for my projects, I hit a wall: the MCP server awslabs.aws-diagram-mcp-server has been discontinued. All versions were yanked from PyPI.

The functionality migrated to the Agent Skills system in the deploy-on-aws plugin from awslabs/agent-plugins. In this post, I share the updated path to configure everything and generate professional diagrams in .drawio format.

What Changed?

Before (Deprecated)Now (Current)
awslabs.aws-diagram-mcp-serverAgent Skill aws-architecture-diagram
Generated PNG via Python diagrams + GraphvizGenerates .drawio XML with official AWS4 icons
Required Graphviz installedNo Graphviz needed
Static diagram (image)Editable diagram (draw.io)
No dark modeNative dark mode support

The new approach is superior: it generates editable diagrams with official AWS4 icons, numbered step badges, color-coded category containers, and dark mode support.

Prerequisites

  • Kiro CLI installed and configured
  • Python 3.10+
  • uv (Python package manager)
  • bun (for plugin installation)
  • defusedxml (XML validation for diagrams)
  • draw.io desktop (optional, for PNG/SVG/PDF export)

Step-by-Step Installation

1. Install base dependencies

# Install uv (if not present)
pip install uv

# Install bun (required for plugin installer)
curl -fsSL https://bun.sh/install | bash

# Install defusedxml (XML validation)
sudo apt-get install -y python3-defusedxml
# or: pip3 install "defusedxml>=0.7.1"

2. Install the deploy-on-aws plugin

COMPOUND_PLUGIN_GITHUB_SOURCE=https://github.com/awslabs/agent-plugins \
  bunx @every-env/compound-plugin install deploy-on-aws --to kiro --output ~/.kiro

This installs two skills:

  • aws-architecture-diagram — generates draw.io diagrams with AWS4 icons
  • deploy — analyzes codebase, recommends AWS services, estimates costs

3. Fix directory structure (if needed)

The installer may create an extra nesting level. Check:

# If it ended up in ~/.kiro/.kiro/skills/, move it:
mv ~/.kiro/.kiro/skills/deploy ~/.kiro/skills/
mv ~/.kiro/.kiro/skills/aws-architecture-diagram ~/.kiro/skills/
rmdir ~/.kiro/.kiro/skills

Expected final structure:

~/.kiro/skills/
├── aws-architecture-diagram/
│   ├── SKILL.md
│   └── references/
│       ├── aws4-shapes-services.md
│       ├── style-guide.md
│       ├── xml-rules.md
│       ├── xml-templates-structure.md
│       └── example-*.drawio
└── deploy/
    ├── SKILL.md
    └── references/

4. Configure MCP Servers

Add to your ~/.kiro/settings/mcp.json:

{
  "mcpServers": {
    "awsknowledge": {
      "type": "http",
      "url": "https://knowledge-mcp.global.api.aws",
      "disabled": false
    },
    "aws-documentation": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"],
      "env": { "FASTMCP_LOG_LEVEL": "ERROR" },
      "disabled": false
    },
    "terraform": {
      "command": "uvx",
      "args": ["awslabs.aws-iac-mcp-server@latest"],
      "env": { "FASTMCP_LOG_LEVEL": "ERROR" },
      "disabled": false
    },
    "aws-pricing": {
      "command": "uvx",
      "args": ["awslabs.aws-pricing-mcp-server@latest"],
      "env": { "FASTMCP_LOG_LEVEL": "ERROR" },
      "disabled": false
    }
  }
}

Note: The old awslabs.aws-diagram-mcp-server no longer works. Remove it from your config if present.

5. Remove the deprecated server (if present)

If you followed the old tutorial and have awslabs.aws-diagram-mcp-server configured, remove it:

# Check if it's in your mcp.json
grep "aws-diagram" ~/.kiro/settings/mcp.json

The error you’ll see if you try to use it:

× No solution found when resolving tool dependencies:
  Because awslabs-aws-diagram-mcp-server>=0.8.2025141004 was yanked
  (reason: Superceeded by diagram agent skill in the deploy-on-aws plugin)

How to Use

Brainstorm Mode (from scratch)

Start Kiro CLI and describe the architecture:

kiro-cli

Then in the chat:

Generate an architecture diagram for a serverless REST API with 
API Gateway, Lambda, DynamoDB and Cognito authentication

Analysis Mode (from existing code)

Inside your project directory:

analyze my codebase and generate an architecture diagram

The skill automatically detects:

  • CloudFormation (AWSTemplateFormatVersion, AWS::*)
  • CDK (cdk.json, constructs)
  • Terraform (resource "aws_*")
  • Docker (Dockerfiles, docker-compose)

Explicit invocation

If the skill doesn’t activate automatically:

Use the aws-architecture-diagram skill to create a diagram of my infrastructure

Style options

  • Sketch mode: "create a sketch-mode diagram..." (hand-drawn style)
  • No legend: "...without legend"
  • Export PNG: "...and export as PNG" (requires draw.io desktop)

Generated Diagram Examples

Serverless REST API

Serverless REST API

Generated with: "Generate a serverless REST API diagram with Cognito, API Gateway, Lambda and DynamoDB"

Event-Driven Data Pipeline

Event-Driven Pipeline

Generated with: "Create an event-driven pipeline with S3, EventBridge, SQS, Lambda and DynamoDB"

Generated diagram features:

  • Official AWS4 icons (48x48) inside colored containers (120x120)
  • Numbered step badges in teal (#007CBD)
  • Title + subtitle + AWS orange separator
  • Category-based colors (Compute=orange, Database=purple, Storage=green, etc.)
  • Adaptive dark mode via light-dark()
  • Edges with orthogonalEdgeStyle and clean routing
  • Editable .drawio format

Troubleshooting

“No solution found when resolving tool dependencies”

The awslabs.aws-diagram-mcp-server has been deprecated. Remove it from mcp.json and use the skill instead.

Skill doesn’t activate automatically

Invoke explicitly: "Use the aws-architecture-diagram skill to..."

“bunx: command not found”

Install bun: curl -fsSL https://bun.sh/install | bash

Diagrams don’t validate

Check if defusedxml is installed: python3 -c "import defusedxml; print('OK')"

References

Conclusion

The migration from MCP server to Agent Skills represents a significant evolution:

  1. Editable diagrams instead of static images
  2. Official AWS4 icons always up-to-date
  3. Native dark mode
  4. Automatic XML validation
  5. Browser preview via app.diagrams.net

If you found the AWS tutorial and hit the deprecated package error, now you know the correct path. The new approach is more powerful and produces professional results that can be edited and refined in draw.io.


This post was written after finding the official AWS tutorial outdated and making the necessary corrections to work with the current version of the tools.