Introduction

The Model Context Protocol, commonly written as MCP, is an open standard that defines how an AI application connects to external tools and data sources. A protocol is an agreed set of rules for communication between two programs. This guide explains what MCP is, why it exists, how it operates, and how it is used on AWS. The broader idea of an agent that uses tools is covered in the guide on AI agents.

What is it?

MCP defines a common interface between two parts. An MCP client is the part of the AI application that connects to servers and makes requests on behalf of the model. An MCP server exposes capabilities to the client. These capabilities include tools, which are actions the model can call, resources, which are data the model can read, and prompts, which are reusable instructions. Because the interface is standard, a tool that is exposed by one server can be used by any client that supports the protocol.

Why does it exist?

Before a standard existed, every connection between an AI application and an external tool was built with custom code. A tool that was integrated for one application could not easily be reused by another, and each integration had to be maintained separately. MCP was created so that tools and data sources are exposed once, through a common interface, and are then available to any AI application that speaks the protocol. This reduces duplicated effort and makes integrations reusable.

How it works

The AI application contains an MCP client. The client connects to one or more MCP servers and asks each server what it offers. Each server responds with the list of tools, resources, and prompts that it exposes. When the model decides that a tool is needed, the client sends the request to the appropriate server, the server performs the action, and the result is returned to the model. On AWS, an MCP server can be built to expose AWS services or Lambda functions, so that an agent can reach them through the standard interface.

Architecture diagram

AI application (contains an MCP client) | | standard requests v MCP server(s) --> expose tools, resources, and prompts | | | |-- a tool runs a Lambda function or calls a service | |-- a resource returns data the model can read v Result returned to the model through the client

Advantages

Disadvantages

Common use cases

Best practices

Common mistakes

Further reading in this library

Frequently Asked Questions

What is the Model Context Protocol?
MCP is an open standard that defines how an AI application connects to external tools and data sources. It allows the same tool to be used by different AI applications through a common interface.
What is the difference between an MCP client and an MCP server?
An MCP client is the part of the AI application that connects to servers and makes requests on behalf of the model. An MCP server exposes tools, data, and prompts to the client.
How does MCP relate to AI agents?
An agent needs tools in order to act. MCP provides a standard way for an agent to discover and call those tools, so that each tool does not require custom integration code.
Is MCP specific to AWS?
No. MCP is an open standard and is not specific to any single provider. On AWS, a server can expose AWS services or Lambda functions to an agent, but the protocol itself is general.
Is MCP secure?
Security depends on how a server is configured. Because a server grants access to tools and data, it should authenticate its clients, validate inputs, and grant only the permissions that are required.
Building AI Agents on AWS cover
Go deeper ยท Book as a Service™
Building AI Agents on AWS

This article is the summary. The book is the full, continuously updated reference: MCP integration, tool design, agent security, and multi-agent systems on AWS.

View the book