Understand the Model Context Protocol
See the problem MCP solves and the roles of hosts, clients and servers.
- Explain the integration problem MCP solves
- Describe the roles of an MCP host, client and server
- Tell local servers from remote ones
An AI assistant becomes far more useful when it can read your files, check your calendar or open a ticket. Before MCP, every AI application wrote its own integration for every service: 4 apps × 5 services = 20 custom connectors, each built and maintained separately.
The Model Context Protocol (MCP) is an open standard for that connection - often compared to a USB-C port for AI applications. A service implements MCP once and works with every MCP-capable app; an app implements MCP once and can use every MCP server. 4 + 5 = 9 implementations instead of 20.
apps, services = 4, 5
print("custom connectors:", apps * services)
print("with a shared protocol:", apps + services)custom connectors: 20 with a shared protocol: 9
Hosts, clients and servers
- The host is the AI application you use - a chat app, an IDE, an agent. It owns the user experience, talks to the language model, and decides what the model may do.
- For each server it connects to, the host runs an MCP client that speaks the protocol to that one server.
- An MCP server exposes capabilities: tools to call, resources to read, prompts to use.
A server can run locally - launched by the host as a subprocess, talking over standard input/output - or remotely, reached over HTTP. MCP standardizes the conversation; it does not decide which model the host uses, and connecting to a server does not make that server trustworthy.
Try it
Up to 15 XPWho does what?
Sort each responsibility to the part of an MCP setup that owns it.
“Ask the user to confirm before a tool sends an email”
“Send a tools/call request over the connection to one server”
“Expose a “create_ticket” tool and actually create the ticket”
“Choose which language model to use”
“Validate the arguments of a tool call before running it”
“Combine the tool lists of three servers for the model”
Key takeaways
MCP turns N × M custom integrations into N + M implementations of one protocol.
The host is the app and decision-maker; it runs one client per server; servers expose capabilities.
Servers run locally (subprocess) or remotely (HTTP); speaking MCP doesn’t make a server trustworthy.
Lesson quiz
6 questions · pass with 5 correct · up to 50 XP
Passing this quiz completes the lesson and keeps your streak going. Questions you miss come back in review sessions later.
Practice: build an MCP server
Write Python in the editor and run it against sample inputs. Python runs locally in your browser using a WebAssembly runtime.
Count the integrations
Read the number of AI applications and the number of services on one line. Print custom: X - one connector per app and service pair - and then mcp: Y - one MCP implementation per app and per service.
- 4 apps, 5 services
- 1 app, 1 service
Python runs in a sandboxed browser worker with a 60 second time limit. Its runtime loads from the Pyodide CDN; your code stays in this browser.
Questions about this lesson
Stuck? Ask. Figured something out? Share it. Explaining is one of the best ways to learn.
Loading posts…