Skip to content
All articles

MCP · Architecture

Tool, resource or prompt? Who decides

An MCP server offers tools, resources and prompts. The specification separates them by who decides when each is used, and that distinction drives most design decisions.

· 4 min read

An MCP host contains one client per connection, and each client talks to one server, which is a separate program. The model never talks to the server; the host decides what the model may see and when to ask the person. Messages are JSON-RPC 2.0 over stdio or Streamable HTTP. A server offers three kinds of capability, by who decides when each is used: tools, decided by the model during a task, such as search_issues; resources, decided by the application or the person as context to attach, such as teamboard://projects; and prompts, decided by the person, often as a slash command, such as triage_issue.

MCP has three roles and three kinds of thing a server offers. Learn those and each feature has an obvious place to go.

Host, client, server

The host is the AI application a person uses: Claude Code, Codex, a chat app, or a program you write. Inside it, one client per connection talks to one server, a separate program that offers capabilities. The model never talks to your server. The host decides which of your tools the model may see, shows the person what is happening, asks for approval when its rules say so, sends the call and hands the result back.

So you are writing for a model that reads your descriptions, through a host that may filter, truncate or block what you send.

Messages are JSON-RPC 2.0. Two transports carry them: stdio, where the client starts your server as a child process and writes one JSON message per line, and Streamable HTTP, where each message is an HTTP POST to one endpoint. With stdio, nothing but protocol messages may ever be written to standard output.

Three primitives, by who decides

PrimitiveWho decides when it is usedExample from the course's TeamBoard server
ToolsThe model, during a tasksearch_issues, create_issue
ResourcesThe application or the person, as context to attachteamboard://projects
PromptsThe person, by choosing one, often as a slash commandtriage_issue

Mental Model

Pick the primitive by who should decide, not by what is easiest to code. Everything exposed as a tool is something the model may decide to call.

A worked choice

You want the person to attach "every open issue assigned to me" to a conversation, without the model deciding to fetch it. That is a resource: context the application or person attaches, such as teamboard://me/issues. A tool would leave the decision to the model, and a prompt is a reusable instruction the person runs, not the right way to offer plain data.

Get one diagram a week

A short article built around one engineering diagram, from the same library as these courses.

One diagram-led article a week on AI and systems engineering. We email you once to confirm, and every newsletter has an unsubscribe link. Privacy policy