How to generate AWS Architecture diagram using AWS MCP server and Amazon Q CLI

Recently AWS started adopted Model Context Protocol (MCP) and created first set of AWS MCP servers. In this blog, I will show you how to generate entire AWS architecture diagrams using single prompt with this new AWS MCP server and Amazon Q CLI. Here is the generated AWS Architecture diagram Read more to find out how … What is MCP? Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. MCP provides a standardized way to connect AI models to different data sources and tools. You can read more about MCP from their website. LLMs are essentially text-in-text-out or data-in-data-out systems. Agents or tools give LLMs ability to interact with real world. MCP standardizes the interaction between these agents/tools and the applications, typically via MCP Client on the agent/tool side and MCP server on the application side. MCP has become popular after AWS, OpenAI, Google, and Microsoft decided to adopt the standard making it go to protocol. Now we have lots of open source MCP servers ready to use. I have tried many MCP Hosts/MCP Clients and Amazon Q CLI is the most simple and straight-forward one. Install Q CLI, login to your AWS Builder ID, and you are good to go on a free tier. AWS handles the LLM calling transparently. No need of any configurations for LLM. Amazon Q CLI Amazon Q is a generative AI assistant. Recently Amazon Q CLI announced MCP support. This is a big announcement for me as it simplifies using MCP as simple as calling the Amazon Q CLI. I am a terminal guy and have been using generative AI CLI tools like Claude Code and now Amazon Q CLI. Steps to install Amazon Q CLI What I love about Amazon Q CLI is the installation and usage. Installation is a single command in your Mac. brew install amazon-q You must login using either AWS Builder ID or your AWS credentials. Use AWS Builder ID if you are just getting started. This is an easy way to try it using the free tier. q login And then you just use it by calling: q chat Architecture Even though we don't interact with LLM directly, Amazon Q CLI uses LLM transparent to the user in the background. Based on the user's query it decides to use the AWS Diagram server via MCP Client inside AWS Q CLI. The MCP Client talks to AWS Diagrams MCP server via Model Context Protocol. Internally it pulls the needs icons, generates diagrams using Python diagrams package DSL. Once the image is generated, Q CLI stores it in the user directory. Demo In this demo I am setting up AWS Diagrams MCP server which is the tool/MCP server which Amazon Q CLI calls to generate AWS architecture diagram. Prerequisite: Install GraphViz before. See https://www.graphviz.org/ Installing GraphViz in Mac: brew install graphviz Watch below demo where I setup the MCP server and generate AWS architecture diagrams using LLM with a single prompt. Relevant URLs Model Context Protocol Amazon Q CLI AWS MCP Servers AWS Diagram MCP server My personal blog

May 3, 2025 - 23:53
 0
How to generate AWS Architecture diagram using AWS MCP server and Amazon Q CLI

Recently AWS started adopted Model Context Protocol (MCP) and created first set of AWS MCP servers.

In this blog, I will show you how to generate entire AWS architecture diagrams using single prompt with this new AWS MCP server and Amazon Q CLI.

Here is the generated AWS Architecture diagram
Data pipeline

Read more to find out how …

What is MCP?

Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. MCP provides a standardized way to connect AI models to different data sources and tools. You can read more about MCP from their website.

LLMs are essentially text-in-text-out or data-in-data-out systems. Agents or tools give LLMs ability to interact with real world. MCP standardizes the interaction between these agents/tools and the applications, typically via MCP Client on the agent/tool side and MCP server on the application side.

MCP has become popular after AWS, OpenAI, Google, and Microsoft decided to adopt the standard making it go to protocol. Now we have lots of open source MCP servers ready to use.

I have tried many MCP Hosts/MCP Clients and Amazon Q CLI is the most simple and straight-forward one. Install Q CLI, login to your AWS Builder ID, and you are good to go on a free tier.
AWS handles the LLM calling transparently. No need of any configurations for LLM.

Amazon Q CLI

Amazon Q is a generative AI assistant. Recently Amazon Q CLI announced MCP support. This is a big announcement for me as it simplifies using MCP as simple as calling the Amazon Q CLI. I am a terminal guy and have been using generative AI CLI tools like Claude Code and now Amazon Q CLI.

Steps to install Amazon Q CLI

What I love about Amazon Q CLI is the installation and usage.

Installation is a single command in your Mac.

brew install amazon-q

You must login using either AWS Builder ID or your AWS credentials. Use AWS Builder ID if you are just getting started. This is an easy way to try it using the free tier.

q login

And then you just use it by calling:

q chat

Architecture

Even though we don't interact with LLM directly, Amazon Q CLI uses LLM transparent to the user in the background. Based on the user's query it decides to use the AWS Diagram server via MCP Client inside AWS Q CLI.

The MCP Client talks to AWS Diagrams MCP server via Model Context Protocol. Internally it pulls the needs icons, generates diagrams using Python diagrams package DSL. Once the image is generated, Q CLI stores it in the user directory.

MCP Amazon Q CLI diagram

Demo

In this demo I am setting up AWS Diagrams MCP server which is the tool/MCP server which Amazon Q CLI calls to generate AWS architecture diagram.

Prerequisite: Install GraphViz before. See https://www.graphviz.org/

Installing GraphViz in Mac:

brew install graphviz

Watch below demo where I setup the MCP server and generate AWS architecture diagrams using LLM with a single prompt.

Relevant URLs