Lesson 13 — What MCP is
One standard plug for tools
So far every tool lived inside your agent's own code. The Model Context Protocol (MCP) is an open standard that lets an AI app use tools that live somewhere else. A program called an MCP server offers tools (and can also offer resources — data such as files). The AI app runs an MCP client that:
- discovers what the server offers — it asks for the list of tools;
- calls a tool by name with arguments, and gets the result back.
Each tool is described with a name, a description and an inputSchema (JSON Schema, like Lesson 8 — note the spelling differs from Anthropic's input_schema). The client passes these descriptions to the model; when the model picks a tool, the client sends the call to the server.
Why it matters: without a standard, every app needs its own code for every tool. With MCP, one server (say, for a calendar) works with any app that speaks MCP.
Watch out: the MCP spec says there should always be a human able to deny tool calls, and servers must validate inputs. A server you connect to can run real actions, so only connect to ones you trust.
In this lesson the "server" is an object in memory. The client sees only the descriptions — never the Python functions. Next lesson you will speak the real message format.
Finish TinyServer: list_tools() returns name, description and inputSchema of every tool (no "fn"); call_tool() runs a known tool and returns {"isError": False, "text": str(result)}.
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
A quick 3-question quiz on this lesson — instant feedback.