Room 42, home

MCP fundamentals: what the protocol does

What the Model Context Protocol is, the problem it solves, its three server primitives, and how a request flows from start to finish.

MCPintermediate4 min readUpdated 12 Jun 2026

In short

  1. 01MCP is an open standard that lets AI apps connect to tools and data through one common interface instead of bespoke integrations.
  2. 02It has three roles: the host that coordinates, a client per server, and servers that expose capabilities.
  3. 03A server offers up to three primitives: tools the model can call, read-only resources, and reusable prompts.
  4. 04Servers connect over stdio for local subprocesses or Streamable HTTP for hosted, shared ones.
Contents · 6 sections
  1. 1What problem does MCP solve?
  2. 2What are the three roles in MCP?
  3. 3What does an MCP server expose?
  4. 4How does an MCP request flow?
  5. 5What is the difference between stdio and HTTP?
  6. 6Where you'll meet it

The Model Context Protocol (MCPAn open standard from Anthropic that lets AI apps connect to tools and data the same way every time, instead of one custom integration per service.) is how AI applications talk to your tools and data through one common standard, instead of a different bespoke integration for every pairing. Anthropic open-sourced it in late 2024, and it is now the way Claude Code, Claude Desktop, and most agents reach the outside world. This guide is the mental model you need before you configure or build anything.

What problem does MCP solve?

Before MCP, connecting M AI applications to N tools and data sources meant writing M times N integrations. Every app needed custom code for every service.

MCP turns that into M plus N. Each app speaks MCP once, each tool speaks MCP once, and they all interoperate. The common shorthand is that MCP is "USB-C for AI applications": one port, many devices.

What are the three roles in MCP?

MCP has three parts, and the names matter because the docs use them precisely:

  • Host · the AI application that coordinates everything (Claude Code, Claude Desktop, an IDE, your own agent).
  • Client · a connector the host creates to talk to one server. The host runs one client per server, each holding its own dedicated connection.
  • Server · a program that exposes tools and data. It runs locally as a subprocessA separate program launched and managed by another program, running as its own child process., or remotely over HTTP.

So a host with three servers connected is running three clients, each with its own one-to-one link.

What does an MCP server expose?

A server offers up to three kinds of capability, called primitivesThe basic building-block capability types defined by the protocol that every server is built from.:

  • Tools · functions the model can call to do something: query a database, open a pull request, send a message. The model decides when to call them. For how that call-and-return cycle works, see tool calling explained.
  • Resources · read-only data the model can pull in for context: a file's contents, a database schema, an API response.Common gotchaResources are usually application-driven: the host or user picks what to attach, the model does not fetch them on its own.If you want the model to grab data autonomously, expose it as a tool, not a resource.
  • Prompts · reusable templates the host can offer the user, like a pre-built "review this PR" flow with the right instructions baked in.

The canonical example is a single database server that exposes a tool to run a query, a resource for the schema, and a prompt with good few-shot examples. To see what real servers expose, browse useful MCP servers.

How does an MCP request flow?

When you ask Claude to do something that needs a server, this happens:

  1. On startup, the host and each server shake hands and agree on a protocol versionThe agreed version of the rules both sides will follow, settled once at startup so each knows what the other supports. and what each side supports.
  2. The host asks every server for its tool list and merges them into one set the model can see.
  3. The model decides to call a tool. The host catches that, routes it to the right client, and the client sends the call to its server.
  4. The server runs the work and returns the result.
  5. The host feeds the result back to the model as context, and the model continues.

Seen over time, the startup handshake happens once, then the tool-call loop repeats for every tool the model decides to use.Common gotchaMany readers picture the model dialing out and reaching a server itself, so they try to grant it network access or hand it API keys. It cannot.All the model ever produces is a request to call a tool by name, and everything past that point belongs to the host: routing the call, running it, returning the answer. Gate access where the wire is. That means the host or the server, never a phantom model connection.

What is the difference between stdio and HTTP?

Servers connect over one of two transports:

  • stdioStandard input/output: the plain text streams a program reads from and writes to. Here the host launches the server and they talk over those streams, no network involved. · the host launches the server as a local subprocess and talks to it over standard input and output. No network, runs on your machine. This is the common case for local tools.
  • Streamable HTTP · the server runs remotely and the host reaches it over HTTP, with support for tokens, API keys, and OAuthA standard way to grant an app limited access to your account without handing over your password.. This is how hosted, shared servers work.

You may still see an older SSE transport mentioned. It is deprecated and kept only for backward compatibility; new servers use Streamable HTTP.

Where you'll meet it

You do not have to build anything to benefit from MCP. You meet it the moment you add a server to Claude Code, wire one into Claude Desktop, or connect an approved remote connector. To put this into practice, install your first MCP server, or to go the other way and build an MCP server of your own.