S1 · E5 · Advanced · Season 1: AI Agents & Tools

What's inside an MCP server?

Explained with Pizza

An MCP server is a program that offers an AI app three kinds of things through the Model Context Protocol: tools (actions the model can call), resources (read-only data for context) and prompts (ready-made templates the user picks).

In short

  • Tools are actions the model decides to call. Example: issue_write in the GitHub MCP server creates or updates an issue.
  • Resources are read-only data for context, like the contents of a file. The app decides what to attach.
  • Prompts are ready-made templates that you pick on purpose. They point the model to the right tools and resources.
  • Under the hood it's JSON-RPC: the app asks for tools/list, then sends tools/call with the tool name and its arguments.
  • Fewer tools, fewer risks: the GitHub MCP server lets you enable only the toolsets you need, or run it with --read-only.

Three things, three owners

In episode 1 we saw MCP as one standard way for AI apps to connect to tools. Now let's open a server up. Every MCP server can offer three kinds of things, and the important detail is who is in control of each one.

  • Tools: controlled by the model. The model reads the list of tools and decides when to call one.
  • Resources: controlled by the app. Read-only data, like a file's contents or a database schema. The app decides what to attach as context.
  • Prompts: controlled by the user. Ready-made templates that you pick on purpose, for example from a menu or a slash command.

Tools: actions the model can call

A tool is an action with a name, a description and a schema for its inputs. The GitHub MCP server, for example, has a tool called issue_write that creates or updates an issue.

Because tools can change things in the real world, apps usually show you what the model wants to do and can ask for your approval first.

Resources: data for context

Resources are read-only. They give the model something to read, not something to do: the contents of a file, a list of records, documentation. The app decides which resources to attach to the conversation.

Prompts: templates you pick

Prompts are templates written by the server's authors. You choose one on purpose, and it fills in a good starting instruction that points the model to the right tools and resources for the job.

Under the hood: JSON-RPC

MCP messages are JSON-RPC 2.0. To use a tool, the app first asks the server what it has with a tools/list request. The server answers with each tool's name, description and input schema.

When the model decides to use one, the app sends a tools/call request with the tool name and its arguments. The MCP specification's example calls a get_weather tool with the location New York. The server runs the tool and sends back the result, which goes to the model.

Pro tip: fewer tools, fewer risks

Every tool you expose is something the model could call, including by mistake or because of a prompt injection. So expose only what the task needs.

The GitHub MCP server makes this easy. You can enable only the toolsets you need, for example just issues and pull requests. Or you can run it with --read-only, so it offers only read-only tools and no write tools at all.

Test yourself

5 quick questions. Pick an answer to check it.

1. In MCP, who decides when a tool is called?
2. Which of these is a resource?
3. Who picks a prompt in MCP?
4. In what order does the app use a tool?
5. What does running the GitHub MCP server with --read-only do?

Sources

Checked November 22, 2026.