概览
What is AWS Strands Agents: Building and Connecting Your First Model Context Protocol (MCP) Server?
This demo project deploys an MCP server that searches for stock photography from Shutterstock based on your location and current weather conditions, then orchestrates it with Strands Agents and the Amazon Q Developer CLI. It is intended for developers building production-ready AI agents that interact with external APIs through the Model Context Protocol.
How to use AWS Strands Agents: Building and Connecting Your First Model Context Protocol (MCP) Server?
Clone the repository, install Node.js packages with yarn install, set environment variables (API_KEY and SHUTTERSTOCK_API_TOKEN), start the MCP server (either node mcp-server.js for STDIO or node mcp-server-remote.js for Streamable HTTP transport), create a Python virtual environment, install Python dependencies, and run the agent with python agent_stdio_multi_agent.py.
Key features of AWS Strands Agents: Building and Connecting Your First Model Context Protocol (MCP) Server?
- Integrates with Shutterstock API for stock photography search.
- Integrates with National Weather Service (NWS) API for weather data.
- Uses Strands Agents code‑first framework for production AI agents.
- Supports both STDIO and Streamable HTTP MCP transports.
- Contextually selects relevant photos based on current weather conditions.
- Orchestrates multiple agents with reasoning and context‑aware automation.
Use cases of AWS Strands Agents: Building and Connecting Your First Model Context Protocol (MCP) Server?
- Building an AI agent that fetches live weather and retrieves contextually appropriate stock photos.
- Demonstrating how to connect external APIs to agents using the Model Context Protocol.
- Creating a reference architecture for multi‑agent orchestration with AWS services and Amazon Bedrock.
FAQ from AWS Strands Agents: Building and Connecting Your First Model Context Protocol (MCP) Server?
What are the prerequisites?
You need Git, Node.js v22.16.01+, npm/Yarn, Python 3.13.x, a pip/Poetry package manager, an AWS account (for Amazon Bedrock), and a free Shutterstock test account with an API token.
What transport protocols are supported?
The MCP server supports both STDIO transport (via mcp-server.js) and Streamable HTTP transport (via mcp-server-remote.js).
How do I obtain a Shutterstock API token?
Register for a free Shutterstock Test Account at the Shutterstock Developers portal to get your API token.
What is the AWS account used for?
The AWS account provides access to Amazon Bedrock generative AI models; other model providers are also supported.
What programming languages are used?
The MCP servers are written in JavaScript (Node.js), and the Strands Agents orchestration is written in Python.