Skip to content

Practice: How MCP connects AI to tools

A short retrieval pass. Answer in your head (or on paper) before opening the collapsible.

1. What problem does MCP solve? Explain it in two or three sentences.

Show answer

Without a standard, each model or app could expect tools to be described in its own custom way, so the same tool could have to be built again for each one. The Stanford lecturer points to this repeated work as the thing to avoid.

MCP, the Model Context Protocol, is a shared standard for connecting AI apps to tools. A tool maker can build one MCP server that several compatible AI apps can use. Each app handles how it presents the available tools to its model. The official documentation compares it to a USB-C port.

2. Name the three roles in an MCP connection and describe the job of each.

Show answer

Host: the AI application you actually use (a chat assistant, a code editor with AI features, a company chatbot). The conversation with the model happens here.

Client: a piece inside the host that holds the connection to one server. The host creates one client for each server it connects to.

Server: a program that offers capabilities to AI apps. The lecturer describes it as the program that serves the tools. It is often built by whoever knows the underlying system, such as the company that makes it.

3. Does the model talk to the server directly? Explain what happens instead.

Show answer

No. The model only requests actions and reads results. The client asks the server which tools it has, and the host hands that list to the model. The model picks a call, the same way as Stage 1 in the function-calling lesson. The client sends that call to the server, the server runs it, and the result goes back into the conversation for the model to read.

What moved compared with the previous lesson: Stage 2 (running the function) can now happen inside a server someone else built, reached through the standard plug.

4. Distinguish tools, resources, and prompts. Who controls each one?

Show answer

Tools are actions, such as searching for flights or sending a message. The model chooses when to call them.

Resources are read-only data, such as file contents or database records. The app manages them and decides how much to pass to the model.

Prompts are reusable templates that tell the model how to work with the server's tools and data. The user picks them: typically, you choose one in the app, and the app uses it to prepare a request for the model.

The short test: the model chooses tools, the app manages resources, the user picks prompts.

5. "We already have Playwright. Why do we need Playwright MCP?" Answer the manager from the lesson.

Show answer

Playwright is browser automation software that programmers drive with code. A language model cannot open a browser or click anything on its own; it can only ask something else to act. Playwright MCP is an MCP server built on Playwright, so an AI app can reach it through the standard plug.

Who does what: MCP is the connection (listing tools, sending calls, returning results). Playwright does the browser work. The model chooses the next step and reads the outcome, which by default comes back as a structured text description of the page.

6. A coworker wants to connect a server that nobody has vetted. Using the MCP specification, give two reasons to pause, and name one thing MCP cannot do for you.

Show answer

Any two of these: tools can run arbitrary code, so they need careful handling; the host app must get your explicit permission before it runs any tool; you should know what a tool does before you allow it; a tool's own description should not be trusted unless the server it comes from is trusted.

What MCP cannot do: enforce these principles by itself. The apps that use MCP are expected to build the consent screens and permission settings.

About 12 minutes. Pen and paper. No installing anything.

Your company stores its documents in an online document service. The service announces an MCP server. The announcement lists what the server offers:

  • Search documents by keyword
  • The text of the company policy handbook
  • Create a new document
  • A "Draft a weekly status report" template
  • A list of your recently opened files
  • Delete a document

You use an AI chat assistant at work, and your IT team is considering connecting it to this server.

Step 1. In this setup, which part is the host, which is the server, and where is the client?

Show one possible answer

Host: the AI chat assistant you use at work. Server: the document service's MCP server. Client: a piece inside the chat assistant that holds the one connection to the document service's server. If IT later connects a second server, the assistant would create a second client for it.

Step 2. Sort the six listed offerings into tools, resources, and prompts. For each, say who controls it.

Show one possible answer

Tools (the model chooses when to call them): search documents by keyword, create a new document, delete a document.

Resources (read-only data the app manages): the text of the policy handbook, the list of your recently opened files.

Prompts (templates the user picks): "Draft a weekly status report."

A quick check: the three tools are all actions. The two resources are information to read. The template only runs when a person chooses it.

Step 3. A coworker says, "So MCP is what searches our documents." Explain what MCP does here and what the document service's own software does.

Show one possible answer

MCP is the connection: the agreed way for the assistant's client to ask for the server's list of tools, send a call such as "search for this keyword," and get the result back. The document service's own software does the actual searching, creating, and deleting. The model picks which tool to call and reads the result. It never sees how the search works inside, only the tool's description and what comes back.

This is the same split as Playwright MCP: the connection is MCP, the work is done by the product behind the server.

Step 4. Before IT connects the server, write down the questions you would ask. Which listed tool deserves the most care, and why?

Show one possible answer

The four questions from the lesson:

  1. Who built the server, and do we trust them? (Here, the document service itself, which you already trust with the documents.)
  2. What can it reach? (Every document your account can see, possibly the whole company's.)
  3. Which tools can change things, rather than only read? (Create a new document, and especially delete a document.)
  4. Will the assistant ask before each action, or act on its own?

Delete a document deserves the most care, because it changes things and may not be reversible. The specification says the host app must get your explicit permission before it runs any tool, so a reasonable request to IT is: confirm that the assistant asks you before every tool call, especially deletions. Remember too that tool descriptions and results are text that flows into the model's decisions, so the server's builder matters.

Eight cards. Click any card to reveal the answer. Use the Print flashcards button to lay out the full set as one card per page.

Q. What does MCP stand for, and what is it in one sentence?
A.

The Model Context Protocol. It is an open standard for connecting AI apps to outside tools and data, so a tool maker can build one server that any MCP-speaking app can connect to.

Q. What problem did the Stanford lecturer say MCP addresses?
A.

Repeated work. Each model could expect tools to be described in its own custom way, so the same tool could have to be built again for each one. With MCP, a tool maker can build one server that several compatible AI apps can use.

Q. Name the three roles in an MCP connection.
A.

Host: the AI app you use. Client: the piece inside the host that holds the connection to one server. Server: the program that offers capabilities. The host creates one client per server.

Q. Does the model connect to the server directly?
A.

No. The model requests an action and reads the result. The client sends the model's chosen call to the server and brings the result back into the conversation.

Q. Distinguish tools, resources, and prompts by who controls them.
A.

Tools are actions the model chooses to call. Resources are read-only data the app manages. Prompts are templates the user picks, which then instruct the model.

Q. In the lecturer's poetry-book example, who would probably build the server, and why?
A.

The book provider, because they are the experts at serving that kind of content. Its tools might find or recommend books; its resources might be the bear's collection or popular books that people buy.

Q. In Playwright MCP, what does MCP do and what does Playwright do?
A.

MCP is the connection: listing tools, sending calls, returning results. Playwright does the browser work, such as opening a page or clicking. The model chooses the next step and reads a structured text description of the page.

Q. What four questions should you ask before connecting an MCP server?
A.

Who built it, and do I trust them? What can it reach? Which of its tools can change things, rather than only read? Will my AI app ask me before each action, or act on its own?