Enhancing the Power of Amazon Q: Integrating Open-Source MCP Servers and Creating Seamless AWS Architectural Diagrams
Introduction
In this blog, we will explore how to integrate an open-source MCP server with Amazon Q and unlock its enhanced capabilities, creating seamless architecture diagrams generation.
Take a look at this architectural diagram below –

Diagram generated by Amazon Q + MCP
Isn’t it amazing?
You will be surprised to know it was not created manually by draw.io or any other diagramming websites rather it was generated in just minutes just by giving simple prompts, using the power of AI (Amazon Q + MCP).
By the end of this BLOG you will be able to create such magical diagrams by writing prompts
But before that, let’s quickly understand the basics of LLM’s and MCP
LLM (Large Language Model) – Examples include GPT and Amazon Q. These models are trained on massive datasets and can understand, reason, and generate human-like text. They act as the “brain” that processes your queries and provides intelligent responses.
MCP (Model Context Protocol) – MCP is an open protocol that allows LLMs to connect with external tools, data sources, and services. Think of it as a bridge. that lets your AI go beyond just text generation and actually interact with APIs, databases, and other systems.

mcp-architecture-diagram-aws
When combined, Amazon Q (LLM) + MCP give you a powerful setup —where Amazon Q acts as the intelligent LLM, and MCP extends its capabilities by connecting it with the tools and data you need. Together, they enable faster automation, smarter workflows, and richer integrations.
Read More from AWS Official Documentation
Let’s get started!
We’ll set up MCP server with Amazon Q and tap into the power of open-source MCP servers to generate stunning architecture diagrams of our AWS infrastructure.
For this setup, we’ll be using an Ubuntu EC2 instance on AWS !
Update the system
sudo apt-get update

Update system
Install libfuse
sudo apt install libfuse2

Install libfuse2
Download the Amazon Q Debian package
curl –proto ‘=https’ –tlsv1.2 -sSf https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb -o amazon-q.deb

Install AmazonQ
Install Amazon Q
sudo apt install -y ./amazon-q.deb

AmazonQ Installation
Login!
Next, let’s log in to Amazon Q
Run the following command:
q login
Now we will be prompted with few login methods, for simplicity we will just proceed with “Use Free with Builder ID” and we will be given a Code to confirm on our browser.

q login

Login Confirmation
After confirming the code and allowing the access on our browser, our terminal will show login successful message.

Login succeeded
Using AmazonQ
Now that we have logged with our BuilderID, we can start using AmazonQ
Press q to login into AmazonQ

AmazonQ Logged In
We can start asking questions directly to Amazon Q, and it will respond intelligently with context-aware answers.

Question asked to AmazonQ on EIP charges
Now lets get started
We’ll ask it to generate an architecture diagram for S3 Static website Hosting.
Just a reminder!—we haven’t yet integrated the open-source MCP server. So let’s first see what the output looks like without MCP

Asking AmazonQ to generate Architectural Diagrams
As we can see, Amazon Q is currently relying on Python libraries to generate diagrams.

AmazonQ is Using Pyhton Libraries to build the diagrams
And below is the diagram that AmazonQ generates.

Architectural Diagram created by AmazonQ
They’re decent… but nothing close to the magic we’ll unlock once MCP servers come into play.
Integrating Amazon Q with MCP Servers
Now, let’s integrate Amazon Q with MCP servers and compare the outputs. Open this link to explore AWS MCP servers. When you will open the website you will be able to see and explore a bunch of AWS MCP servers in the left pane. We will use the AWS Diagram MCP Server

AWS MCP servers
After installing the prerequisites (sudo snap install astral-uv –classic) we will configure the MCP server in our AmazonQ by placing the mentioned JSON file in the path /.aws/amazonq/mcp.json

aws mcp servers
Create mcp.json file in the directory /.aws/amazonq

create mcp.json file
Paste the MCP JSON for AWS Architectural diagrams in the mcp.json file

Pasting the mcp server JSON
After configuring the mcp server when we will login again into AmazonQ we will now see that AmazonQ has Loaded our MCP server for AWS Diagrams.

Loaded MCP
Now when we will Give the same prompt to create Architecture diagram of S3 Website Hosting AmazonQ will use the digrams MCP server package to create stunning Architectural diagrams.

Using Diagrams
Below are some Archictectural diagrams created using AmazonQ + MCP integration

Web App with ALB

SNS-Multi-Topic
This is not limited to generating diagrams—there are numerous other MCP servers available online for a variety of use cases. Below are some useful references:
https://awslabs.github.io/mcp/
https://github.com/awslabs/mcp
