Building MCP Servers / Chapter 1 — Getting Started with MCP (lessons 1–4) / Lesson 1
What MCP Is: Hosts, Clients, and Servers
Time needed: about 10 min (estimate)
Reading settings
These settings are remembered on this device only.
You can try the opening of this lesson without an account.
A shared contract between AI apps and outside tools
The Model Context Protocol (MCP) is a contract for how AI-powered apps use outside tools and data. Build a feature such as reading notes, doing a calculation, or looking up company data once as an MCP server, and any MCP-capable app can connect to it and use it. As a design principle, the spec says servers should be extremely easy to build, and it leaves the heavy coordination to the app. This course takes the side of the people who build those servers.
Three roles: host, client, and server
The host is the AI app itself, and it creates and manages clients. Deciding which servers may connect, applying security policy and user consent, talking to the LLM, and pulling the gathered context together are all the host's job. A client lives inside the host, and each client talks to exactly one server (one to one). The server is the side that offers features, and it can be a process running on your machine or a remote service.
Diagram
The three things a server offers
A server offers three things: tools (functions that can be called), resources (content that can be read), and prompts (instruction templates). The spec separates them by who mainly decides when they are used. For tools, the model decides whether to call them; for resources, the app decides how to bring them into context; prompts are chosen by the user (for example, as slash commands). Which of them a server offers is written in the capabilities of its reply. The code below reads a real reply from the notes server built in this course (notes-demo).
Tab indents. To leave the editor, press Esc, then Tab.
Create a free account to keep reading
With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.
Report a problem with this lesson
Log in to send a report.