AWS Logo
Menu
Building AI Agents with Amazon Q CLI and Strands MCP Server

Building AI Agents with Amazon Q CLI and Strands MCP Server

Leveraging AI powered development to create Agents with Strands

Published Jun 2, 2025
Last Modified Jun 3, 2025
In today's rapidly evolving AI landscape, developers are constantly seeking efficient ways to build intelligent agents. Today, we will be looking at two tools to streamline AI agent development: Amazon Q Developer CLI and Strands MCP Server.

Amazon Q Developer CLI: Your AI-Powered Development Companion

Amazon Q Developer CLI brings AI assistance directly to your terminal. As a command-line interface for Amazon's AI assistant, it provides contextual support for coding, AWS services, and development tasks. What makes it particularly powerful is its extensibility through the Model Context Protocol (MCP).

Strands MCP Server: Extending Agent Capabilities

Strands Agent SDK is a framework that building sophisticated AI agent. When configured as an MCP server, it exposes its powerful agent-building capabilities to other applications such as Amazon Q. Upon integration, Amazon Q gains access to Strand's specializes tools for:
  • Document processing and analysis
  • Multi-step reasoning
  • Tool orchestration
  • Custom agent behaviors
This integration allows you leverage Amazon Q's build in AWS expertise while accessing Strand's agent-building capabilities, all through a unified interface.

Setup

  1. Install and configure Amazon Q Developer CLI
  2. Open or create the following file: ~/.aws/amazonq/mcp.json and paste the following:
  1. launch Amazon Q Developer CLI by running:
  1. If everything is configured properly you should see the strands MCP server being initialized and the Amazon Q CLI
Amazon Q CLI Welcome Screen

Integration Architecture

The integration of these technologies follows a layered architecture:
  1. Core Agent Layer: Strands Agent SDK provided the foundation for agent creation
  2. Tool Standardization Layer: MCP enables standardized tool interfaces
  3. Application Layer: Amazon Q Developer CLI serves as the entry point where you guide Agent creation through natural language prompts
The result being the creation of a robust AI Agent with just natural language

From Prompt to Application: Creating with Q developer

Now that we’ve covered the background and setup, let’s walk through how to actually build an agent-powered application using Amazon Q Developer CLI. We’ll use a news briefing assistant as our example, but the steps apply to any idea you want to bring to life. The key is writing a clear prompt, letting Q generate the app, and iterating as needed.

Define your Agent's Goals Clearly

Every project begins with a clear, outcome-focused prompt. You’re telling the agent what to build—so think in terms of functionality, inputs, outputs, and any tools or APIs it should use.

Craft a Structured Prompt

The prompt isn’t just about what to build—it’s about how to build it. A strong prompt is clear, structured, and gives the agent enough context to make smart decisions.
  • Start with: "Build a Strands Agent that..."
  • Clearly state the overall goal
  • List expected functionality in logical order
  • Mention technical requirements (e.g., programming language, APIs, output format)
  • Include notes about code quality/structure, API key management, folder structure, README generation, etc.
Example Prompt:

Run the Prompt in Q CLI

After running the prompt, Q will:
  • Describe its understanding of the task
  • List the tools and services it will use
  • Show which files and folders it will create
  • Begin generating the code
  • Flag any errors, missing details, or ask for clarification
Your role is to observe, approve, or refine as needed
Sample Initial output:
Sample Initial Output

Verify and Iterate

Once Q completes the generation:
  • Open the project folder
  • Review the structure and files
  • Test the app locally
Final Output from Amazon Q Developer:
Here is how our New Briefing Agent Turned out:
News Briefing Agent

 If everything works, you've now got a functional agent! If not, just prompt Q again with specific feedback, and it will make the necessary changes. Continue iterating until you're satisfied.
Happy building!
 

Comments