Table of contents
Open Table of contents
The integration problem
Imagine an AI assistant that can answer questions about a support queue. The queue lives in one service, documentation lives in another, and the assistant runs inside a third application. Without a shared protocol, each application needs a custom connector for every service. Each connector has its own way to describe tools, fetch context, and return results.
The Model Context Protocol (MCP) standardizes that connection. It gives an AI application a common way to discover and use capabilities offered by another program. The program providing those capabilities might be a local process or a remote service.
MCP is related to model tool calling, but it connects a different pair of systems. Tool calling is the model asking its application to perform an action. MCP is one protocol the application can use to talk to a service that provides that action or related context. The model does not connect to an MCP server by itself.
Three participants and two layers
MCP uses three roles:
- The host is the AI application. It owns the conversation, the model interaction, and the policy for using external capabilities.
- An MCP client lives inside the host. It manages a connection to one MCP server and speaks the protocol.
- An MCP server is the program that offers capabilities, such as looking up an issue, reading a document, or providing a reusable prompt.
One host can create several clients, usually one per server. A client does not have to be a separate application or machine; it is a component in the host.
+-------------------------+
| MCP Host |
| AI app, model, policy |
| |
| +----------+ +--------+|
| | Client A | |Client B||
| +----+-----+ +---+----+|
+-------|-----------|-----+
| |
JSON-RPC | | JSON-RPC
over stdio | | over HTTP
v v
+-----------+ +-----------+
| Local MCP | | Remote MCP|
| server | | server |
+-----+-----+ +-----+-----+
| |
local files ticket service
The protocol has two layers. The data layer defines JSON-RPC messages, capability negotiation, and features such as tools and resources. The transport layer defines how those messages travel, including how a connection is established and how messages are framed. Keeping these layers separate lets the same capability contract work over different connections.
First, the client and server agree
When a client connects, it starts an initialization exchange. The client identifies itself and says which protocol version and client-side capabilities it supports. The server replies with the version it will use, its own information, and the capabilities it offers. The client then sends an initialized notification, after which normal requests can begin.
This small handshake prevents both sides from assuming that the other supports a feature it has never heard of. The negotiated capabilities might say, for example, that the server offers tools and resources, while the client supports progress notifications. Each side can then stay within the features that were agreed upon.
MCP messages use JSON-RPC 2.0 conventions. A request has a method, parameters, and an ID; a response with the same ID carries either a result or an error. A notification has no ID because the sender does not expect a response. These familiar shapes make requests, replies, and one-way events distinguishable even when they are carried over different transports.
Discover a tool, then call it
Suppose the support assistant needs the current owner of ticket SUP-42. A server may describe a get_ticket tool with a short explanation and a JSON input schema. A simplified exchange looks like this:
MCP Client MCP Server
| |
|--- tools/list ------------------>| What tools are available?
|<-- get_ticket + input schema ----|
| |
|--- tools/call ------------------>| get_ticket({"id":"SUP-42"})
|<-- ticket details ---------------|
| |
The host can make the discovered tool description available to its model. If the model asks to use get_ticket, the host decides whether to allow the request, and the MCP client sends tools/call to the server. The server performs its work and returns a result. The host then supplies that result to the model so it can continue answering.
The call is not a direct path from model to service. The host remains in the middle: it chooses which capabilities to expose, applies user and application policy, and decides how a result re-enters the conversation. The protocol gives both programs a shared message format; it does not decide whether a particular user should be allowed to close a ticket.
Tools are only one kind of capability
MCP defines several related primitives:
| Primitive | What it provides | Example |
|---|---|---|
| Tools | Actions a model can request through the host | Search tickets or create a draft |
| Resources | Data an application can read or attach as context | A document, schema, or issue record |
| Prompts | Reusable prompt templates that an application can present | A template for summarizing an incident |
Clients discover these with methods such as tools/list, resources/list, and prompts/list. They use methods such as tools/call, resources/read, or prompts/get to use them. Servers can also send notifications when a list changes, so a client does not have to assume that a tool catalog is fixed forever.
The distinction is useful when designing a server. A read-only document might be better exposed as a resource than as a tool named read_document; an operation that changes a ticket belongs in a tool because it performs an action. The protocol supplies the vocabulary, while the server designer chooses what each capability actually means.
The transport changes the connection, not the contract
For a local integration, a host can launch a server process and exchange messages through stdio. The process boundary is local, but it is still a client-server connection: the host’s client sends protocol messages and reads responses from the server process.
For a remote integration, clients can use Streamable HTTP. The server is reachable over a network and can serve multiple clients. The transport handles connection details, framing, and—where configured—authorization. Both transports carry MCP’s data-layer messages, so a host can reason about capabilities without treating every server as a one-off API.
MCP does not require every server to use the same programming language or storage system. A server can wrap a database, a service API, or local files. Its implementation and the meaning of its tools remain the server author’s responsibility.
Where the safety boundary remains
Standardized messages do not automatically make an integration safe. A tool schema describes the shape of an input; it does not prove that the current user is authorized to use that tool or that the requested action is appropriate.
- The host should review which servers and tools it exposes, and use confirmation steps for consequential actions.
- The server should validate each request and enforce its own authorization rules. It should not rely on a tool description as access control.
- A local server runs with the permissions of the process that starts it, so the host should treat its launch command and environment as part of the trust decision.
- A remote server needs an authenticated, protected connection and narrowly scoped access to the data or actions it provides.
- Tool output is data from another system. The host should not silently treat text in a document or search result as a trusted instruction.
Think of MCP as a common connector shape. It reduces custom integration work, but the host still controls how capabilities enter an AI conversation, and each server still protects the systems behind its interface.
References
- Model Context Protocol, Architecture — host, client, server, layers, and primitives.
- Model Context Protocol, Specification, version 2025-11-25 — lifecycle, messages, capabilities, and transports.
- JSON-RPC Working Group, JSON-RPC 2.0 Specification — request, response, and notification message shapes.
- Anthropic, Introducing the Model Context Protocol — the original motivation for a shared integration protocol.