
MCP + Amazon Q CLI: Boost DevOps Workflows
Learn to set up MCP servers locally, integrate with Amazon Q CLI, and generate infra like diagrams, Terraform, and Kubernetes using natural language.
Published Jun 8, 2025

Let’s dive in!
Amazon Q CLI is Amazon’s AI-powered coding assistant designed to work directly from your terminal. With it, you can:
- Generate application boilerplate code
- Create infrastructure as code
- Draft Kubernetes YAMLs
- Build architecture diagrams (especially when MCP is enabled)
- And much more…
When paired with MCP (Model Context Protocol) servers, Amazon Q becomes an intelligent DevOps assistant capable of understanding broader context and handling more sophisticated multi-step operations.
Before we begin, you’ll need:
- Amazon Q CLI installed
- A free Builder ID from AWS (required to authenticate Amazon Q CLI)
- Basic terminal knowledge (Mac/Linux/WSL)
- Optionally: uvx to run MCP servers locally
brew install amazon-q
Or you can download the installer directly from Amazon Q's official site.
Files are installed to ~/.local/bin by default.
sudo apt-get update
sudo apt install libfuse2
sudo apt install libfuse2
curl --proto '=https' --tlsv1.2 -sSf https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb -o amazon-q.deb
sudo apt install -y ./amazon-q.deb
Once installed, log in using:
q login
Authenticate with your Builder ID, and you're ready to roll!
After login, just run:
q
You’ll enter the interactive prompt mode. Now try something like:
Write an blog on AWS EC2,=
Or if you're a Vim user:
/editor
This opens an in-terminal editor. Type your multi-line instructions, then press Esc + :wq to execute.
Within seconds, Amazon Q CLI will scaffold a complete project. Yes, AI is your new intern now.
While Amazon Q CLI is powerful on its own, adding MCP server support makes it smarter and more context-aware, enabling use cases like:
- Generating real AWS architecture diagrams from natural language
- Creating full-stack infrastructure blueprints
- Drafting cloud-native patterns based on complex prompts
Model Context Protocol (MCP) allows models to be enriched with context from tools, plugins, or local services, which significantly enhances their reasoning capability. Think of it as giving your AI assistant superpowers.
We’ll use uvx for this setup. You can also use npx or Docker if you prefer.
brew install uv
sudo snap install astral-uv --classic
Now create a config file for MCP servers:
mkdir -p ~/.aws/amazonq
nano ~/.aws/amazonq/mcp.json
Paste the following configuration:
Now rerun:
q
And you’ll see the MCP servers initializing in the background. Amazon Q CLI is now enhanced with contextual awareness.

Minimize imageEdit imageDelete image
Let’s try a sample command now:
Draw an architecture diagram for a web app hosted on AWS using S3 and CloudFront.

Also you get modification as well to your diagram.
can you add aws SNS as well.

Amazon Q CLI + MCP will generate a realistic, visual architecture diagram using its plugin server (e.g., aws-diagram-mcp-server). No need for drag-and-drop tools!
With Amazon Q CLI and MCP support, you’re no longer limited by templates or boilerplate generators. You now have an AI that:
- Writes working infrastructure code
- Generates architecture diagrams
- Creates cloud-native DevOps workflows
- Understands your intent, deeply
Whether you're a DevOps engineer, cloud architect, or developer—this setup will save you hours and unleash creativity like never before.
If you build something awesome using this setup, share it with me on LinkedIn. I’d love to see your AI-powered DevOps workflows!