Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 1 of 6 · Concept · 15 min · revision 3

Why a Protocol for Tools and Context

Why the Model Context Protocol exists, how hosts, clients and servers divide the work, which transports carry the messages, and what the stateless 2026-07-28 revision changes. Also what MCP does not do for you, such as enforcing safety.

Contentsand lesson path

What you will learn

  • Describe MCP's host-client-server architecture and its server primitives (tools, resources, prompts), and choose the right primitive for a capability.

Prerequisites: Tool Calling

01. Why it matters

A language model on its own can only read text and write text. To be useful as an agent it needs tools (search an issue tracker, query a database, open a file) and context (a schema, a document, the current ticket). Before a shared protocol existed, every AI application wired up each tool with its own glue code. Three applications that each wanted GitHub, Slack and a Postgres database meant nine separate integrations, each with its own way of describing arguments, reporting errors and passing credentials. Add one more application or one more tool and the work grows multiplicatively. People call this the M x N problem: M applications times N tools.

Software tooling met the same problem with code editors and programming languages. The Language Server Protocol (LSP) let each editor speak one protocol and each language ship one server, so the work became M + N instead of M x N. The Model Context Protocol (MCP) does the same for AI applications. Anthropic first published it in November 2024 as an open specification, and its first revision is dated 2024-11-05. A tool author writes an MCP server once; any application that speaks MCP can then discover the server's tools and call them without custom code.

This lesson builds the mental model that the rest of the skill relies on: who the participants are, how their messages travel, and what the current revision, 2026-07-28, changed. It also marks a boundary that is easy to miss: MCP standardises how tools are described and called, not whether calling them is safe.

02. Hosts, clients and servers

MCP has three participants. Keep them apart, because most design questions are really questions about which participant owns a decision.

  • Host: the AI application the user works in, such as an IDE, a chat app or your own agent runtime. The host decides when to call the model, which servers to use, and what the user must approve. It creates one MCP client for each server it connects to.
  • Client: the connector inside the host that speaks MCP to exactly one server. It sends requests, matches replies to them, and turns what the server offers into something the host can use, for example the tool list it passes to the model.
  • Server: a program that offers capabilities: tools, resources and prompts (the next lesson covers these three primitives). It can run on your machine as a child process of the host or as a remote web service. It never runs inside the model.

The model itself does not speak MCP. The host reads the server's tool definitions, hands them to the model in whatever format the model provider expects, and when the model asks for a tool, the host's client sends an MCP tools/call request and returns the result to the model. That is why one server works with any model: the protocol sits between the host and the server, not between the model and the server.

Diagram · one host, two clients, two servers
+---------------------- Host (IDE, chat app, agent) ----------------------+
|  model <---> host logic: consent, which tools to offer, audit           |
|                 |                                 |                     |
|           MCP client A                      MCP client B                |
+-----------------|---------------------------------|---------------------+
                  | stdio (child process)           | Streamable HTTP
                  v                                 v
        local server: files                remote server: issue tracker

03. Two layers: messages and transports

MCP separates what is said from how it travels.

The data layer is a set of JSON-RPC 2.0 messages. A request has a method, optional params and an id; the other side answers with a result or an error carrying the same id. A notification has no id and gets no answer. Method names describe the operation: tools/list, tools/call, resources/read, prompts/get, server/discover.

The transport layer moves those messages. The current revision defines two standard transports:

  1. stdio: the host starts the server as a child process. Messages are single lines of JSON on the server's standard input and output. Standard output is reserved for protocol messages, so a server writes its logs to standard error.
  2. Streamable HTTP: the server exposes one HTTP endpoint, for example https://example.com/mcp. The client sends every request as its own HTTP POST, and the server answers with a single JSON body or with a Server-Sent Events (SSE) stream for that one request. Headers such as MCP-Protocol-Version and Mcp-Method repeat key parts of the body so that gateways can route requests without parsing JSON.

You will still meet the older HTTP+SSE transport from 2024-11-05, which used a long-lived GET stream plus a separate POST endpoint. It has been deprecated since revision 2025-03-26; new servers should not adopt it. A rule of thumb for choosing: stdio for a tool that one person runs on their own machine, Streamable HTTP for a server that several people or services share.

04. Every request stands alone (revision 2026-07-28)

Earlier revisions started each connection with an initialize handshake: the client proposed a protocol version, both sides swapped capabilities, and the result held for the rest of the session. Revision 2026-07-28 removed that handshake and protocol sessions. MCP is now stateless: every request carries what the server needs to process it in its params._meta field.

  • io.modelcontextprotocol/protocolVersion (required): the revision this request uses, such as 2026-07-28.
  • io.modelcontextprotocol/clientCapabilities (required): what the client can do for this request.
  • io.modelcontextprotocol/clientInfo (recommended): the client's name and version.

A server accepts or rejects each request on its own. If it does not support the requested version, it returns an UnsupportedProtocolVersionError that lists the versions it does support. A client that wants to know a server's versions, capabilities and identity up front can call server/discover, which every 2026-07-28 server must implement; calling it is optional.

Statelessness has practical effects. Any replica behind a load balancer can answer any request, and a restarted stdio server loses nothing but the requests in flight. A server that needs state across calls, such as a database transaction, hands the client an explicit identifier to pass back as an ordinary tool argument. Servers and hosts built for 2025-11-25 or earlier still use the handshake; lesson 5 covers how the two eras interoperate.

05. What MCP does not do for you

It is tempting to treat a standard protocol as a safety layer. The specification says plainly that MCP cannot enforce its security principles at the protocol level; it asks implementers to build them in. In practice:

  • Consent lives in the host. Hosts should show which tools are exposed, ask the user before invoking tools, and show the arguments first. Because every call arrives as a structured tools/call request, the host is a convenient place for approval prompts, audit logs and rate limits, but only if the host actually implements them.
  • Descriptions are claims, not guarantees. Tool descriptions and annotations such as readOnlyHint come from the server. Treat them as untrusted unless you trust the server.
  • A stdio server is not a sandbox. Running as a separate process means a crash or hang does not take the host down. It does not limit what the server can do: it runs with your user account and can read your files and environment variables. Run only servers you trust, or run them in a container or virtual machine with narrow mounts.
  • Remote access needs authorisation. For HTTP servers the specification defines an optional OAuth 2.1-based authorisation framework; the MCP Servers skill covers it.

Finally, compare MCP with direct function calling. With a provider's tool-calling API, your own application executes every tool, so it can gate calls just as an MCP host can. What MCP adds is reuse and discovery: one server serves many hosts, and hosts learn its tools at run time. If you have one application with a few in-process functions, direct function calling (see Tool Calling) is often simpler. MCP pays off when tools are shared across applications or teams.

06. Check your understanding

Practice check · 3 questions

Practice check

Answer from what this lesson explained.

Q1. Your team wants the same GitHub integration in an IDE plugin, a chat app and a CI agent. What changes if you write it once as an MCP server?
Q2. A colleague says: "stdio servers run in their own process, so any server from the internet is safe to run locally." What is wrong with this?
Q3. Under revision 2026-07-28, how does a server know which protocol version a `tools/call` request uses?
Practice only: not graded, not saved, not evidence.

07. Apply it

The practice task for this skill connects two open-source servers to a host and to a client you write: a filesystem server limited to one folder and a fetch server that downloads web pages. Before you install anything, write a one-page plan:

  1. For each server, pick the transport (stdio or Streamable HTTP) and say why.
  2. List what each server could do with your account if it misbehaved, and how you will limit that: an allowed folder, a container, a read-only mount.
  3. Decide which calls your host should ask you to approve, and where the audit log goes.
  4. Note which protocol revision your host uses. If its documentation does not say, the lab in lesson 3 shows how to find out.

08. Review prompt

Without looking back, explain to a colleague: why MCP turns M x N integrations into M + N; what the host, the client and the server each own; when you would choose stdio over Streamable HTTP; what a 2026-07-28 request carries in _meta and why; and two things MCP does not do for you.

References

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

6 questions · about 5 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check