← Table of Contents · Page 166 of 868
THE MODEL CONTEXT PROTOCOL (MCP) AND TOOL STANDARDS
Part 3 of 11
CLIENTS, SERVERS, AND TRANSPORTS
MCP uses three main ideas.
The client.
In MCP, a host is the AI application the user works with, such as a chat app, a coding assistant, or your own custom agent.
Inside the host, an MCP client is the piece of code that keeps one connection to one server.
An agent that uses several servers has several client connections.
The server.
An MCP server is a program that offers capabilities to clients in the standard way.
A server might wrap a company database, a calendar, a code hosting site, or a folder of documents.
The server decides which capabilities to expose and how they work.
The transport.
A transport is the delivery method, the road along which messages travel between client and server.
Two standard transports are widely used.
The first is standard input and output (stdio).
Here the client launches the server as a program on the same computer and the two exchange messages through the program's ordinary input and output channels, the way two people might pass notes through a slot in a door.
It is simple, fast, needs no network, and is often used for local tools such as a file reader.
The second is a network transport, called Streamable Hypertext Transfer Protocol (HTTP) in the current specification, which lets a client reach a server hosted elsewhere across the internet or a company network.
An older network transport that used a technique called server-sent events was used in early versions of the standard and has been replaced by Streamable HTTP in newer revisions, so you may still see references to both.
Underneath the transports, MCP messages are written in a format called JSON Remote Procedure Call (JSON-RPC) version 2.0.
A remote procedure call is a request to run a function that lives in another program, and JSON-RPC is a simple way to write down such requests and replies as JSON text.
You do not need to memorize this to use MCP, because the SDKs handle it for you.
Advertisement
Read Aloud:
0:00 / 0:00