
Run Amazon Q CLI with MCP Server Using Docker Simplified Setup for DevOps Projects
"This blog guides you in running Amazon Q CLI with the MCP server using a Docker image
Published May 19, 2025
Inspired by the official TrainWithShubham blog on setting up Amazon Q CLI with the MCP Server, I’ve taken it a step further by containerizing the entire setup using Docker.
In this article, I’ll walk you through how to quickly get started with Amazon Q CLI and MCP Server—without any manual installation—by building and running a Docker container locally.
While the Docker image is not published on Docker Hub, this guide demonstrates the complete process so you can replicate it on your own machine.
Whether you're exploring architecture diagrams, automating DevOps workflows, or experimenting with Amazon Q capabilities, this containerized setup provides speed, isolation, and repeatability.
I have build the docker image using following command :
docker build -t amazon-q .
docker build -t amazon-q .
This command runs an interactive Docker container from the
amazon-q-mcp
image, mounts your local q-architecture
folder to /app
inside the container, names it amazon-q
, and automatically removes it after exit. The login command is inserted automatically.

To start Amazon Q, simply use the
q
command inside the container.
This is the context I provided to Amazon Q.

The architecture diagram was generated by AWS Q + MCP.

Happy Learning!