Enabling MCP Tools
Introduction
Welcome back to Putting Bedrock Models to Action with Strands Agents! You've made remarkable progress through this course, building intelligent agents from the ground up, enhancing them with calculation and custom tools, and connecting them to knowledge bases for powerful document retrieval. Now, in this final unit, we're expanding your agent's horizons beyond internal knowledge bases to embrace the broader ecosystem of external data sources through the Model Context Protocol (MCP).
This lesson introduces you to MCP integration with Strands agents, enabling your AWS Technical Assistant to access real-time information from external servers and services. We'll explore the strands.tools.mcp module, master MCP client configuration patterns, and connect to the AWS documentation MCP server for live access to the latest AWS service information. You'll discover how MCP tools can complement your existing agent capabilities, providing access to dynamic external data that traditional knowledge bases cannot offer.
By the end of this unit, your agent will seamlessly combine its established tool repertoire with MCP-powered external data access, creating a comprehensive system capable of both internal knowledge retrieval and real-time external information gathering. This integration represents the cutting edge of agent architecture, where AI reasoning meets the boundless landscape of external data sources.
Understanding the Model Context Protocol
Model Context Protocol (MCP) establishes a standardized framework for connecting AI agents to external data sources and services through a three-component architecture. At its core, MCP operates with a host (your AI application) and one or more servers (external services providing capabilities and context), each with a corresponding client that handles the communication between the host and the specific MCP server. This architecture enables your agents to seamlessly access live systems, real-time APIs, and dynamic data sources that extend far beyond traditional knowledge bases.
MCP operates through two distinct layers:
- The data layer defines the types of information and capabilities that servers can expose. Specifically, it implements a JSON-RPC 2.0 based exchange protocol that defines the message structure and semantics, including lifecycle management, server and client features.
- The transport layer manages the actual communication channels and authentication between clients and servers. It handles connection establishment, message framing, and secure communication between MCP participants. MCP supports two transport mechanisms:
stdiotransport for direct process communication between local processes on the same machine.streamable HTTPtransport for client-to-server messages with optional Server-Sent Events for streaming capabilities. This transport enables remote server communication and supports standard HTTP authentication methods including bearer tokens, API keys, and custom headers. MCP recommends using OAuth to obtain authentication tokens.
This separation ensures that regardless of how you connect to an MCP server, the capabilities it provides remain consistent and predictable.
