
AWS Strands Agents: Building and Connecting Your First MCP Server
Deploy an MCP server that searches for stock photography based on your current location and conditions using third-party APIs, and orchestrate it with Strands Agents and the Amazon Q Developer CLI.
Published Jun 4, 2025
The Model Context Protocol (MCP) provides a standardized interface that enables AI agents to interact seamlessly with external services. In this post, we’ll demonstrate how to build an MCP server that integrates with Shutterstock — my favorite platform for high-quality licensed images, videos, music, and creative tools — using their robust API. We’ll then show how to expose these rich media search capabilities to agents developed with Strands Agents, AWS’s code-first framework for building production-ready AI agents. For more information on Strands Agents, see my previous post, Introducing AWS Strands Agents: A New Paradigm in AI Agent Development. By orchestrating multiple agents, we’ll enable them to access the National Weather Service (NWS) API, intelligently select contextually relevant photos based on current weather conditions, and deliver results that showcase the power of reasoning and context-aware automation.
Finding images on Shutterstock based on current weather conditions
We will create two versions of the MCP server to demonstrate the two current standard transport mechanisms for client-server communication: STDIO (Standard Input/Output) and Streamable HTTP. Streamable HTTP, introduced in March 2025, is the latest transport, replacing the older HTTP+SSE (Server-Sent Events) approach.
We’ll test the MCP servers with both Postman and MCP Inspector. Once validated, we’ll integrate the MCP servers with agents built using the Strands Agents framework. Finally, we’ll connect the MCP servers with Amazon Q Developer CLI, which uses Strands Agents as its underlying framework for building, orchestrating, and running AI-powered agents in the terminal.
MCP server integrated with Amazon Q Developer CLI
All of the open-source code for this blog post is available on GitHub.
The Shutterstock API is available for cURL, Node.js, PHP, and the command line interface (CLI), while the MCP SDK is available for TypeScript, Python, Java, Kotlin, and C#. Given this, we will utilize Node.js to host our MPC servers, which are written in JavaScript. The agents built using the Strands Agents framework will be written in Python.
- Git distributed version control system
- Node.js v22.16.01 LTS or newer (MCP servers)
- Python 3.13.x (Strands Agents)
- AWS Account (for access to Amazon Bedrock generative AI models; other model providers are also supported)
- Free Shutterstock Test Account (Register at Shutterstock Developers)
- Optional: Amazon Q Developer CLI for last part of post
The Shutterstock API is a RESTful service that lets developers search, preview, and access Shutterstock’s extensive library of images, videos, and music. Secure authentication enables seamless integration of stock media and metadata into apps, websites, and creative workflows, making it ideal for building media-rich digital experiences.

Sign up for a Shutterstock Free Test Account if you don’t already have one. This plan offers access to a curated selection of 3 million high-quality, royalty-free images across Shutterstock’s search categories. The Free Account is intended for personal projects and early-stage applications, with image downloads limited to 500 assets per month and API calls capped at 100 requests per hour. For access to a larger library, videos, and music tracks, consider upgrading to an Unlimited or Pay Per Use plan.
Once logged in, navigate to your account page and click on the Developers section. There, click Create new app to register your application. In the popup, fill in details such as your app name, callback URL (for most cases, you can leave this as localhost for testing), company name, website, intended use, and a description of how you plan to use the API. Accept the Terms of Service and save your application.


After saving, your new application will appear on the My Apps page, where you’ll find your consumer key and consumer secret.

To generate an OAuth token, go to your application’s details page, click Generate token, select the required scopes, and follow the prompts to authenticate. Copy the token when it is displayed, as it will only be shown once.


You can now use this token to authenticate your Shutterstock API requests.

To get started, clone this post’s GitHub repository and install the necessary Node packages. This example uses Yarn as the package manager:
The post’s GitHub repository includes a package.json file with all required dependencies:
Our first MCP server uses STDIO (Standard Input/Output) transport mechanism for client-server communication. According to the MCP documentation, in the STDIO transport, the client launches the MCP server as a subprocess. The server reads JSON-RPC messages from its standard input (stdin) and sends messages to its standard output (stdout). The MCP server’s JavaScript code is based on the example provided in the MCP TypeScript SDK.
To demonstrate the capabilities of MCP, in addition to the Shutterstock image search tool, search_shutterstock, I’ve included a few additional basic tools, including echo, greet, calculate_area, and get_api_key:
Our next MCP server uses the Streamable HTTP transport mechanism for client-server communication. Streamable HTTP was introduced in March 2025 as the newest transport mechanism, replacing the older HTTP+SSE (Server-Sent Events) approach. In the Streamable HTTP transport, the server operates as an independent process that can handle multiple client connections. This transport uses HTTP POST and GET requests. This MCP server’s JavaScript code is also based on an example provided in the MCP TypeScript SDK. This server relies on Express, the lightweight, flexible, and minimalist web application framework for Node.
To start the two MCP servers, I recommend opening separate terminal windows and starting each server in its own window, in the foreground, using the following node commands:

We can test the MCP servers using Postman, a platform for designing, building, and scaling APIs, before integrating the servers with Strands Agents. Postman natively allows you to interact with an MCP server with MCP requests. As you interact with the server, it returns a response.
Create a Postman Collection with two MCP requests, one for the STDIO transport server version and one for the Streamable HTTP transport.

For the STDIO transport version, you will need to input the path to your local installation of Node.js as well as the path to the STDIO transport version of the MCP server, for example:
/usr/local/bin/node /your/path/to/mcp-server.js

For the Streamable HTTP transport version of the MCP server, you will need the URL of the server,
http://localhost:3000/mcp
.
As an alternative to Postman, we can also use MCP Inspector, an interactive developer tool for testing and debugging MCP servers. To get up and running right away with the MCP Inspector UI, execute the following command in your terminal:
npx @modelcontextprotocol/inspector
The MCP Inspector UI should start on
http://localhost:6274
.
To connect to the two MCP servers, use the same connection methods you used for Postman, above. Once connected, use the ‘List Tools’ button to list all the available tools offered by either of the MCP servers.

Next, we will connect to the two MCP servers with agents built using the Strands Agents framework. First, we need to install a few Python packages:
strands-agents-tools
, strands-agents-builder
, and mcp
. I recommend creating a new Python virtual environment for this project.The following version of the Python script, which contains agents built using the Strands Agents framework, is designed to access the STDIO transport mechanism version of the MCP Server. The code includes two agents, a primary orchestrator agent,
orchestrator_agent
, and a specialized tool agent, weather_agent
. The specialized tool agent is wrapped in a callable function, weather_assistant
, which accesses The National Weather Service (NWS) API using Strands Agents’ http_request
tool — tools calling tools. The specialized tool agent is a variation of the Strands Agents’ Weather Forecaster example, found on GitHub.This architectural pattern is referred to as Agents as Tools, which is an approach in AI systems where specialized AI agents are wrapped as callable functions (tools) that other agents can use. This pattern creates a hierarchical structure in which the primary “orchestrator” agent handles user interaction and determines which specialized agent to invoke. The specialized “tool agents” perform domain-specific tasks when called by the orchestrator, such as getting the current weather.
The agent uses Amazon Bedrock to access Amazon Nova Lite, a very low-cost, multimodal model that is lightning-fast for processing image, video, and text inputs. The use of Amazon Bedrock is optional, as Strands Agents supports several other model providers beyond Amazon Bedrock, including Anthropic, LiteLLM, Llama API, Ollama, OpenAI, and custom providers.
Make sure you update the
StdioServerParameters
section of the script to reflect the correct path to your project’s root and Node.js path.Run the Python script, whose agents connect to the STDIO transport mechanism version of the MCP server:
The Amazon Q Developer CLI is an AI-powered command-line assistant that brings generative, agentic capabilities directly into your terminal environment. Designed to enhance developer productivity, it enables natural language interactions, contextual code understanding, and intelligent command suggestions for hundreds of popular CLIs like
git
, npm
, docker
, and aws
. Amazon Q Developer CLI and Strands Agents are closely related because Amazon Q Developer CLI leverages Strands Agents as its underlying framework for building, orchestrating, and running AI-powered agents in the terminal.Similar to how we integrated our MCP servers with agents built using the Strands Agents framework, we can easily incorporate those servers with Amazon Q Developer CLI with only a few lines of JSON. Assuming you already have Amazon Q Developer CLI installed and configured, you can import the MCP server configuration, mcp.json, included in the GitHub repository, into Amazon Q Developer CLI using the qchat command.
With Strands Agents, we integrated the STDIO transport version of the MCP server with the agents. For Amazon Q Developer CLI, we will integrate the Streamable HTTP transport version of the MCP server with Amazon Q Developer CLI. Update the command to reflect the correct path to your project’s root before running:
qchat mcp import --file /your/path/to/mcp.json global
To confirm the command was successful, run the qchat mcp list command:

For the demonstration, start Amazon Q Developer CLI with the q chat command, and trust all the tools:
q chat --trust-all-tools

Recall, the weather_agent agent and associated weather_assistant tool are part of the Stands Agents Python script and not the MCP servers. Therefore, the weather functionality will not be available in the Amazon Q Developer CLI. However, we can also try out all the other tools included with the MCP server, such as searching for images on Shutterstock.




Building and connecting your first MCP server with AWS Strands Agents demonstrates the power of standardized AI integration. Leveraging both STDIO and Streamable HTTP transports provides flexible communication options, while integrating APIs like Shutterstock and the National Weather Service showcases how agents can use reasoning to deliver context-aware results, such as weather-based photo searches. Unifying these capabilities with Strands Agents and Amazon Q Developer CLI enables you to automate complex tasks and build intelligent applications that respond dynamically to real-world data. This approach empowers you to rapidly develop and deploy AI-powered solutions that are both adaptable and future-ready.
This blog represents my viewpoints and not those of my employer, Amazon Web Services (AWS). All product names, images, logos, and brands are the property of their respective owners.