Lesson 1 of 3 Model Context Protocol and Amazon Bedrock AgentCore

Connecting AI Applications to Tools with the Model Context Protocol

This lesson explains the Model Context Protocol (MCP), an open standard for connecting AI applications to tools and data, so developers write an MCP server once and any MCP client can use it.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe hosts, clients, servers and the tool, resource and prompt primitives.
  • Distinguish the stdio and Streamable HTTP transports.
  • Explain why MCP separates tool providers from tool consumers.

Clients, servers and primitives

MCP defines hosts (AI applications such as an agent or an IDE assistant), clients inside the host that each maintain a connection to one server, and servers that expose capabilities. Servers offer three primitives: tools (functions the model can call, with JSON Schema inputs), resources (data the application can read, identified by URIs) and prompts (reusable prompt templates). Clients can offer capabilities to servers, such as sampling (the server asks the client's model to generate text) and elicitation (the server asks the user for input).

Messages use JSON-RPC 2.0. A client connects, negotiates capabilities, lists available tools with tools/list and calls them with tools/call. Because discovery is dynamic, an agent picks up new tools added to a server without code changes.

The following diagram shows a host with two clients, each connected to one server.

MCP hosts, clients and servers. A host, such as an agent or an IDE assistant, contains one MCP client per server connection. Each client exchanges JSON-RPC messages with one server, and servers expose three primitives: tools, resources and prompts.
The server names are illustrative.
Sort into groups

Name the MCP primitive

Exam skills 2.1.7

Decide which MCP server primitive each capability is.

Log in to try this activity Interactive activities are free with an account.

Transports

The Model Context Protocol (MCP) defines the messages that clients and servers exchange, using JSON-RPC, and two standard transports that carry them. With stdio, the server runs as a local process that communicates with the client over standard input and output. This suits tools on a developer's machine, such as an IDE assistant reading local files, but not shared services.

With Streamable HTTP, the server runs as a remote HTTP service. Clients send JSON-RPC requests with HTTP POST, and the server responds either with a single JSON response or with a stream of messages using server-sent events, which suits long-running tool calls that report progress. Remote servers can be stateless, handling each request independently, which makes them easy to scale, or they can keep sessions identified by a session ID header when tools need state between calls.

The following diagram compares four separate tool integrations with one shared MCP server.

Replacing four integrations with one MCP server. Four teams had each written their own inventory integration for different agent frameworks, with inconsistent error handling and no central logging. One MCP server with OAuth and logging, used through MCP clients, is maintained once, and new tools reach every agent through discovery.
OAuth is the standard for authenticating remote MCP clients.
Scenario questions

Choosing an MCP transport

Exam skills 2.1.7

Choose the transport for each MCP server.

Log in to try this activity Interactive activities are free with an account.

Why MCP matters for enterprises

MCP separates tool providers from tool consumers. A platform team publishes MCP servers for the CRM, ticketing system and knowledge base, with authentication and logging, and every agent framework (Strands Agents, other open-source frameworks, IDE assistants such as Amazon Q Developer and Kiro) uses them through MCP clients. This gives consistent access patterns, reuse and central control. Security still matters: servers must authenticate clients (OAuth is the standard for remote servers), authorise each tool call and treat tool outputs as untrusted content. The following table summarises the primitives.

PrimitiveProvided byPurpose
ToolsServerFunctions the model can call
ResourcesServerData the application can read
PromptsServerReusable prompt templates
SamplingClientServer requests a model completion
ElicitationClientServer requests information from the user
Worked example

One integration, many agents

Four teams have each written their own integration with the company's inventory API for different agent frameworks, with inconsistent error handling and no central logging.

Publishing one MCP server for the inventory API, with OAuth authentication and logging, and having each agent use an MCP client, replaces four integrations with one, and new tools added to the server appear in every agent through dynamic discovery.

Check yourself

Which MCP transport suits a remote server shared by many clients?

Show answer

Streamable HTTP. stdio is for local servers started by the client.

Exam Tips

Remember for the exam

  • MCP servers expose tools, resources and prompts; clients discover and call them.
  • Transports: stdio for local servers, Streamable HTTP for remote servers.
  • Dynamic tool discovery means new server tools need no client code changes.
  • Authenticate remote MCP servers (OAuth) and treat tool output as untrusted.