All posts
July 17, 2026·4 min read

Model Context Protocol Explained: How the Protocol Actually Works

A technical breakdown of Model Context Protocol (MCP) — what it's made of, how the client-server relationship works, what transports exist, and why the standard was needed in the first place.

There's a plain-language explanation of MCP, and for most people that's enough. But if you want to understand how the protocol works under the hood — what it's made of, how the two sides talk, and why it solved a problem nothing else had solved before it — it's worth digging deeper. That's what this is for.

What problem the protocol solves

It's easier to start with the pain MCP removed. Before it, every integration between a model and an external tool was written separately, for that specific pairing. Want to connect a model to a database? Write an integration. Connect a different model to the same database? Write it again, because the interfaces differ.

Mathematically this looked like N×M: each of N clients had to be individually paired with each of M tools. As both numbers grew, this turned into combinatorial hell.

MCP reduced the problem to N+M. A client implements the protocol once, a server implements the protocol once — and after that, any client works with any server. That's exactly why a tool written once fits different agents without rework. Anthropic came up with the protocol and open-sourced it, and that's why it quickly became a shared standard.

Clients and servers

The foundation is a simple split of roles. There's the client (also called the host) — the application with the model in it, a desktop agent, for instance. And there are servers — separate programs, each giving access to some resource or tool: a filesystem, a database, a tracker, an API.

The client connects to servers, learns what they can do, and lets the model use it. One client can hold several servers at once — the model's set of available tools just grows.

What a server provides

A server doesn't hand the client just anything — it offers three clearly defined kinds of capability.

Tools are actions the model can perform: make a request, send a message, change data. This is what people usually mean when they talk about MCP.

Resources are read-only data the server can hand the model as context: a file's contents, a database record, a document.

Prompts are prepared templates and scenarios the server offers so routine tasks get handled consistently.

The split isn't arbitrary — it lets a server clearly draw the line between what the model can read and what it can do, instead of one blurry "access to everything."

Transports: local and remote

Next question: how do the client and server physically talk to each other? The protocol defines two main transports.

The first is stdio: the server runs as a child process on the same machine, and communication happens over standard input/output streams. This is the option for local servers, and it's also the most private one — nothing leaves the computer.

The second is HTTP: the server works as a remote endpoint, reachable over the network. You need this when the server doesn't live on your machine but somewhere else.

Choosing a transport is largely a choice about privacy and topology. A local stdio server keeps everything with you; a remote HTTP server is more convenient for shared services, but the data is already going over the network.

What this looks like in a real agent

The theory gets clearer with a live example. In Doka, MCP servers connect locally, over stdio: you specify the launch command and parameters, and every time a task starts, the app spins up the enabled servers, collects their tools, and registers them under readable names. The model calls them right alongside the built-in ones, and the calls route back to the right server.

So the whole protocol, in practice, boils down for the user to a couple of fields in the settings.

Why this matters beyond the hype

MCP often gets pitched as a trendy acronym, but the value underneath is pretty down-to-earth. A shared standard means the tool ecosystem grows independently of which specific model you happen to be using. A server written today for one agent will work with a different one tomorrow. For the user, that means the agent's capabilities grow through the whole ecosystem, not just through one vendor's effort.

The point of all this

Model Context Protocol is a way to standardize how a model reaches the outside world: client and server, tools-resources-prompts, local or remote transport. Behind the apparent complexity is a simple goal — write a tool once, have it work everywhere. To try it hands-on, download Doka — MCP is already inside.