Architect Like a Pro: Amazon Q CLI + MCP Servers Setup Guide
When Anthropic released their new Model Context Protocol (MCP), it opened up new dimensions for developers and DevOps engineers seeking a powerful, context-aware experience while working with AI tools. If you're someone like me, who’s always experimenting with cutting-edge automation and cloud tooling, then integrating MCP with Amazon Q CLI is something you’ll absolutely love.
In this article, I’ll walk you through how to set up and run MCP servers locally, integrate them with Amazon Q CLI, and supercharge your development workflows—especially for generating architecture diagrams, Terraform modules, Kubernetes manifests, and more—using just natural language prompts.
Let’s dive in!
🚀 What is Amazon Q CLI?
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.
🛠️ Prerequisites
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
🧩 Step 1: Install Amazon Q CLI
✅ For macOS
Or you can download the installer directly from Amazon Q's official site.
✅ For Windows (WSL)
Files are installed to ~/.local/bin by default.
✅ For Ubuntu/Linux
Once installed, log in using:
Authenticate with your Builder ID, and you're ready to roll!
🧪 Step 2: Run Your First Prompt
After login, just run:
You’ll enter the interactive prompt mode. Now try something like:
Or if you're a Vim user:
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.
⚙️ Step 3: Enable MCP Server Support
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
What’s MCP?
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.
🧰 Installing MCP Servers
We’ll use uvx for this setup. You can also use npx or Docker if you prefer.
✅ macOS
✅ Linux / WSL
Now create a config file for MCP servers:
Paste the following configuration:
Now rerun:
And you’ll see the MCP servers initializing in the background. Amazon Q CLI is now enhanced with contextual awareness.
🎨 Use Case: Generate AWS Architecture Diagram
Let’s try a sample command now:
Also you get modification as well to your diagram.
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!
🌟 Conclusion
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.
🎥 Bonus: Watch the Video Tutorial
If you prefer visual walkthroughs, I’ve made a complete YouTube video tutorial demonstrating all these steps, including real examples and troubleshooting tips.
👉 Watch it here :https://youtu.be/1wvuhvVl6pk
🙌 Let’s Connect
If you build something awesome using this setup, share it with me on LinkedIn. I’d love to see your AI-powered DevOps workflows!
DevOps/Cloud Engineer & Technical Instructor | Transforming Infrastructure Through Automation | AWS • Azure • GCP • Kubernetes • CI/CD | Empowering Teams with Cloud Excellence
2moGreat. Indeed you told me last week you are back again. Thank you sir so much for your effort to see we grow in DevOps. Please sir can you do a video on PHP app deployed on AWS or if you have can you send it to me. Remain blessed sir