Skip to content

Building with agents, lesson 3.1

MCP fundamentals: servers, clients, tools

MCP is one standard way to connect an agent to your systems. This lesson follows a single request from the app you work in, through a client, to a server and back, and names the three things a server can offer.

What do you run?

Every example below changes to fit what you pick. The businesses are made up for teaching.

The picture, one step at a time

Each box is one stage. The picture lights up as you scroll.

Step 1 of 6

One plug instead of many

Every agent needs to reach your systems: orders, files, tests. Without a standard, every app wires every system its own way, and you build the same connection again for each app. The Model Context Protocol, MCP, is a standard way to make that connection once and use it from any app that supports it.

Anthropic released MCP as an open standard on 25 November 2024. In December 2025 it handed MCP to the Agentic AI Foundation, part of the Linux Foundation, with OpenAI and Block as co-founders.

Step 2 of 6

The host is the app you work in

The host is the app the person uses: a coding tool, an editor, a chat app. It holds the whole conversation, decides which servers to connect, and asks you before anything risky happens. Servers never see the whole conversation, and never see into each other.

Step 3 of 6

One client for each server

Inside the host, a client is the connector for one server. Connect three servers and the host runs three clients, each talking to exactly one. For an orders server for your support agent, that is one client, one server, and a clear line between that system and everything else.

Step 4 of 6

A server offers three kinds of thing

A server can offer tools, resources and prompts. The difference is who is in control. Tools are actions the model chooses to call. Resources are data, like a file or a log, that the app attaches. Prompts are ready-made templates a person picks, like a slash command.

Which of the three does the model decide to use on its own, mid-task?

Step 5 of 6

How a call travels

The client asks the server for its list of tools, with each tool's name, description and the inputs it takes. The model picks one and fills in the inputs. The client sends the call, the server does the work, and the result goes back into the conversation. If the tool fails, the error goes back too, marked as an error, so the model can try again.

The messages use JSON-RPC, a simple "call this, here is the answer" format. A server on your own machine talks through its standard input and output (stdio). A remote one uses Streamable HTTP. As of November 2026 the latest version of the specification is dated 2026-07-28.

Step 6 of 6

Permission stays with a person

A server is someone else's code, and its tools can do real things. The specification says a person should always be able to refuse a tool call, and that the host should get your consent before invoking a tool. It also says to treat what a server claims about its own tools as untrusted unless you trust the server.

A server you found online says its delete tool is "safe and read-only". What should you assume?

Tool, resource or prompt?

Here are four things an MCP server offers in your business. Sort each one by who is in control: the model (tool), the app (resource) or a person (prompt).

  1. 1get_order: the model looks up order 4412 when a customer asks where it is.

  2. 2Your returns policy, offered as a document the app can attach to the conversation.

  3. 3A "/damaged-parcel reply" item in the menu that a support person picks to start a ready-made request.

  4. 4issue_refund: the model refunds an order once it has checked the parcel is lost.

0 of 4 right so far, 4 to go.

An MCP cheat sheet

This is what you keep: the parts of MCP and what each one does, on one card.

An MCP cheat sheet

  1. Host: the app you work in. It holds the conversation and asks your permission.
  2. Client: a connector inside the host, one for each server.
  3. Server: a small program that opens one system to any host that speaks MCP.
  4. Tools are for the model to call. Resources are data the app attaches. Prompts are templates a person picks.
  5. Local servers talk over standard input and output. Remote servers talk over Streamable HTTP.
  6. A tool's error goes back to the model marked as an error, so it can correct itself and try again.

Connect a server only if you would hand its maker the same keys, and keep a person able to say no to any tool call.

Next: Lesson 3.2: Designing tools an agent can use well. Names, descriptions and answers that help a model pick the right tool the first time.