Practise Model Context Protocol (MCP) one question at a time. Answer out loud or in writing, get graded, and see exactly what you missed.
What is the Model Context Protocol, and what problem does it solve?
The Model Context Protocol (MCP) is an open standard that lets AI applications connect to outside tools and data through one common interface. Anthropic released it in November 2024.
The problem it solves is integration cost. Before MCP, every AI app wrote custom glue for every system: one connector for GitHub, another for Postgres, another for Slack. With M apps and N systems, you maintain M times N connectors.
MCP turns that into M plus N. You expose a system once as an MCP server, and any MCP-capable app can use it. The official analogy is a USB-C port for AI applications: one connector, many devices.
The real payoff is portability. Integrations move between hosts, and you add one without rewriting the app.
Missed:
“OK, so a server can offer three kinds of things: tools, resources and prompts, and what really separates them is who gets to decide when each one is used. Tools are up to the model. Say I've got a Jira server with a create_ticket tool: the model sees it in the list and decides in the middle of the conversation to call it, and the host would normally check with me before it actually runs. Resources are driven by the application. They're read-only things with a URI, like a project's README or a table schema, and the host chooses what to attach as context, the model doesn't go and fetch them itself. And prompts belong to the user: they're templates I kick off myself, say a 'draft release notes' command. I'd use that split when designing a server too: anything that changes state goes in a tool, so there's an approval step in front of it.”
Knew itNames all three primitives with correct control owners and solid examples for each. Would be stronger noting that sampling, roots and elicitation are client primitives, not server ones, since that's a common follow-up trap.
Missed: Doesn't mention that sampling, roots, and elicitation are client-side primitives, not server ones
Get your own answers graded
Sign up free. Your account comes with 50 credits for grading, and it remembers what you missed.
What it covers
- What MCP is and where it fits
- Tools, resources and prompts
- Protocol messages and lifecycle
- Transports and server state
- Building, configuring and testing servers
- Tool design and error handling
- Sampling, roots and elicitation
- Spec versions and migration
- OAuth authorization for remote servers
- Attacks and security hardening
- Production architecture and debugging
All 56 questions
What MCP is and where it fits
The problem MCP solves, the host-client-server roles, and how it compares with REST, RAG, A2A and plain function calling.
- What is the Model Context Protocol, and what problem does it solve?
- Explain the MCP architecture: what are hosts, clients, and servers?
- How is MCP different from a REST API? Pro
- How is MCP different from RAG, and do they compete? Pro
- How does MCP differ from A2A, and when would you use each? Pro
- When should you use MCP versus plain function calling in your own application? Pro
Tools, resources and prompts
The three server primitives, who controls each, how they are discovered and called, plus resource templates and subscriptions.
- What are the three server primitives in MCP, and who controls each one?
- What exactly is an MCP tool, and how does a client discover and call one?
- How do resources differ from tools in MCP, and when would you expose data as a resource?
- What are MCP prompts, and how do they show up in a host application?
- How do resource subscriptions work, and what does a server need to implement? Pro
- What are resource templates, and how does argument completion work with them? Pro
Protocol messages and lifecycle
JSON-RPC message shapes, connecting to a server, notifications, pagination, and progress, cancellation and tasks for long-running calls.
- What is the wire format of MCP messages? Describe the JSON-RPC 2.0 basics the protocol relies on.
- At a high level, what happens when an MCP client first connects to a server? Pro
- What role do notifications play in MCP? Give concrete examples. Pro
- How does pagination work for MCP list operations? Pro
- What is the MCP Tasks extension, and when would you put a long-running tool call behind a task? Pro
- How do progress reporting, cancellation, and timeouts work for long-running MCP requests? Pro
Transports and server state
stdio and Streamable HTTP, local versus remote servers, the retired HTTP+SSE transport, and stateful versus stateless designs.
- What transports does MCP support today, and how do you choose between them? Pro
- What are the practical differences between local and remote MCP servers? Pro
- Describe the stdio transport precisely. What rules trip people up? Pro
- Explain how the Streamable HTTP transport works, including sessions and streaming. Pro
- What was the original HTTP+SSE transport, why was it deprecated, and how do implementations stay backwards compatible? Pro
- Compare stateful and stateless designs for a Streamable HTTP MCP server. What breaks when you go stateless? Pro
Building, configuring and testing servers
Writing servers with the Python and TypeScript SDKs, wiring them into Claude Desktop and Claude Code, testing them, and the registry.
- How do you connect an MCP server to Claude Desktop? Pro
- What is the MCP Inspector, and how do you use it during development? Pro
- How would you build a minimal MCP server in Python? What is FastMCP? Pro
- How would you build a minimal MCP server in TypeScript with the official SDK? Pro
- How do you configure MCP servers in Claude Code, and what do its scopes mean? Pro
- How do you test an MCP server, from unit tests to end-to-end client tests? Pro
- Describe the MCP ecosystem and how the official registry works. Pro
Tool design and error handling
Writing tool schemas the model can use well, annotations and why they are untrusted, structured output, and protocol versus tool errors.
- What makes a good tool schema? Give concrete design guidelines. Pro
- What are tool annotations, and why must hosts treat them as untrusted? Pro
- What is structured tool output in MCP, and how does it interact with backwards compatibility? Pro
- How should MCP servers handle errors? Distinguish protocol errors from tool execution errors. Pro
Sampling, roots and elicitation
Client-side features a server can ask for, how multi round-trip requests replaced server-initiated requests, and building sampling in a host.
- What is sampling in MCP? Describe the flow and why it is designed with a human in the loop. Pro
- What are roots in MCP, and what guarantees do they provide? Pro
- Explain elicitation. When was it added and what constraints does it have? Pro
- What are Multi Round-Trip Requests (MRTR) in MCP, and which server-initiated requests do they replace? Pro
- You are implementing sampling support in a host application. What design and security decisions do you face? Pro
Spec versions and migration
Date-based versioning, extensions and deprecation, how the spec changed across revisions, and moving a server to the stateless revision.
- How is the MCP specification versioned, and how do client and server agree on a version? Pro
- What is the MCP extensions framework, and how does the feature deprecation policy work? Pro
- Trace the evolution of the MCP specification across its major revisions. What migration concerns does each introduce? Pro
- How would you migrate an MCP server from the 2025-11-25 spec to the stateless 2026-07-28 revision? Pro
OAuth authorization for remote servers
The OAuth 2.1 flow for remote servers, client registration, token audience binding, and the confused deputy problem.
Attacks and security hardening
Prompt injection through tool output, tool poisoning and rug pulls, and the security checklist for a public remote server.
Production architecture and debugging
Multi-tenant servers, gateways and composition, scaling to many servers and tools, and debugging servers in production.
- How do you debug an MCP server's behavior in production, and what does the protocol's logging capability provide? Pro
- Design a multi-tenant remote MCP server for a SaaS product. What are the hard problems? Pro
- What happens when an MCP server is also an MCP client? Discuss composition patterns and their risks. Pro
- Your platform team wants agents to use 50 MCP servers with hundreds of tools efficiently. How do you architect this? Pro
- A remote MCP integration works in testing but fails intermittently in production. Walk through your systematic debugging approach. Pro
All questions
Showing of 56What is the Model Context Protocol, and what problem does it solve?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The Model Context Protocol (MCP) is an open standard that lets AI applications connect to outside tools and data through one common interface. Anthropic released it in November 2024.
The problem it solves is integration cost. Before MCP, every AI app wrote custom glue for every system: one connector for GitHub, another for Postgres, another for Slack. With M apps and N systems, you maintain M times N connectors.
MCP turns that into M plus N. You expose a system once as an MCP server, and any MCP-capable app can use it. The official analogy is a USB-C port for AI applications: one connector, many devices.
The real payoff is portability. Integrations move between hosts, and you add one without rewriting the app.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the MCP architecture: what are hosts, clients, and servers?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
MCP splits an integration into three roles: a host, one or more clients inside it, and servers that expose capabilities.
Host (Claude Desktop, IDE, agent)
├── Client A <--> Server A (filesystem, local)
├── Client B <--> Server B (GitHub, remote)
└── Client C <--> Server C (database, local)
The host is the AI application the user sees. It holds the model conversation, renders the UI, and asks the user for permission.
A client is a connector the host creates, and each client talks to exactly one server. Ten servers means ten clients. Since the 2026-07-28 revision, every request a client sends carries its own protocol version and capabilities, so no session state sits between requests.
A server is a separate program offering capabilities to its client. It may run locally as a subprocess or remotely over HTTP.
That one-to-one pairing is the isolation boundary. A server sees only what its own client sends, never other servers or the full conversation.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are the three server primitives in MCP, and who controls each one?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
MCP servers expose three primitives: tools, resources, and prompts. They differ mainly in who decides when each one is used.
- Tools are model-controlled. The LLM chooses and calls them mid-turn, normally behind user approval.
- Resources are application-controlled. The host decides what data to read and attach as context.
- Prompts are user-controlled. The user picks them on purpose, like a slash command or menu item.
This control axis should drive your design. Anything with side effects belongs in a tool, so the host can gate it. Plain read-only context belongs in a resource, so the host stays in charge of the context window. A workflow a person should trigger belongs in a prompt.
Sampling, roots, and elicitation are client primitives, not server ones.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What exactly is an MCP tool, and how does a client discover and call one?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A tool is a function a server exposes that the model can choose to call. Each tool has a unique name, a description, and an inputSchema, the JSON Schema that describes its arguments.
Discovery and calling are two JSON-RPC methods. The client sends tools/list and hands the returned definitions to the model. When the model picks one, the client sends tools/call with the name and arguments. The server returns content blocks such as text, images, or embedded resources.
// client -> server
{"jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": {"name": "get_weather", "arguments": {"city": "Berlin"}}}
// server -> client
{"jsonrpc": "2.0", "id": 2,
"result": {"content": [{"type": "text", "text": "18C, cloudy"}], "isError": false}}
Two details matter. Tools are model-controlled, so hosts should ask the user before running one. And if the server declares the listChanged capability, it can send notifications/tools/list_changed, and the client must re-list to stay current.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
How do resources differ from tools in MCP, and when would you expose data as a resource?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A tool is an action the model calls, while a resource is read-only data the host reads and puts into context.
| Tools | Resources | |
|---|---|---|
| Who invokes it | the model | the host or user |
| Purpose | perform work | supply context |
| Addressed by | name plus arguments | a URI |
| Side effects | allowed | none expected |
| Method | tools/call |
resources/read |
Roughly, resources are GET and tools are POST.
{
"uri": "file:///project/schema.sql",
"name": "Database schema",
"mimeType": "text/plain"
}
Expose data as a resource when it is stable, addressable content a user may want to attach: a file, a schema, a log. Host support varies, though, and some clients ignore resources. If the model itself must fetch the data, also ship a tool.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are MCP prompts, and how do they show up in a host application?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Prompts are reusable message templates that a server exposes by name. They are user-controlled, so a person picks one and the model does not invoke it on its own.
A client lists them with prompts/list and fetches one with prompts/get, passing any declared arguments. The server returns a list of messages, each with a role and content, which the host puts into the conversation.
{
"description": "Review a diff for bugs",
"messages": [
{ "role": "user", "content": { "type": "text", "text": "Review this diff:\n..." } }
]
}
In hosts they appear as explicit user actions, such as slash commands namespaced by server in Claude Code and menu items in Claude Desktop. Message content can embed resources, so one pick pulls in files plus instructions.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the wire format of MCP messages? Describe the JSON-RPC 2.0 basics the protocol relies on.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
MCP messages are JSON-RPC 2.0 messages, UTF-8 JSON objects that carry "jsonrpc": "2.0". The transport only decides how they are framed and delivered.
There are three shapes. A request has an id, a method, and optional params, and expects exactly one reply. A response repeats that id with either result or error, never both. A notification has a method but no id, so nothing is sent back.
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_weather","arguments":{"city":"Oslo"}}}
{"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"12C, clear"}]}}
An id is a string or an integer, never null, and a sender never reuses one still awaiting its reply. An error holds an integer code, a message, and optional data. Batching was allowed early on, then removed in the 2025-06-18 revision.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What transports does MCP support today, and how do you choose between them?
How do you connect an MCP server to Claude Desktop?
What is the MCP Inspector, and how do you use it during development?
What are the practical differences between local and remote MCP servers?
At a high level, what happens when an MCP client first connects to a server?
How is MCP different from a REST API?
How is MCP different from RAG, and do they compete?
How is the MCP specification versioned, and how do client and server agree on a version?
What role do notifications play in MCP? Give concrete examples.
Describe the stdio transport precisely. What rules trip people up?
Explain how the Streamable HTTP transport works, including sessions and streaming.
What was the original HTTP+SSE transport, why was it deprecated, and how do implementations stay backwards compatible?
How would you build a minimal MCP server in Python? What is FastMCP?
How would you build a minimal MCP server in TypeScript with the official SDK?
What makes a good tool schema? Give concrete design guidelines.
What are tool annotations, and why must hosts treat them as untrusted?
What is structured tool output in MCP, and how does it interact with backwards compatibility?
How do resource subscriptions work, and what does a server need to implement?
What are resource templates, and how does argument completion work with them?
How does pagination work for MCP list operations?
What is sampling in MCP? Describe the flow and why it is designed with a human in the loop.
What are roots in MCP, and what guarantees do they provide?
Explain elicitation. When was it added and what constraints does it have?
How do you configure MCP servers in Claude Code, and what do its scopes mean?
What are Multi Round-Trip Requests (MRTR) in MCP, and which server-initiated requests do they replace?
What is the MCP Tasks extension, and when would you put a long-running tool call behind a task?
How do you test an MCP server, from unit tests to end-to-end client tests?
How does MCP differ from A2A, and when would you use each?
How should MCP servers handle errors? Distinguish protocol errors from tool execution errors.
Describe the MCP ecosystem and how the official registry works.
What is the MCP extensions framework, and how does the feature deprecation policy work?
Walk through the OAuth 2.1 authorization flow for a remote MCP server.
Why did MCP lean on dynamic client registration, and what replaced it?
What is token audience binding in MCP, and why is token passthrough forbidden?
Explain the confused deputy problem in the context of MCP.
How does prompt injection threaten MCP-based agents, and what mitigations actually help?
What are tool poisoning and rug-pull attacks on MCP, and how do you defend against them?
When should you use MCP versus plain function calling in your own application?
Compare stateful and stateless designs for a Streamable HTTP MCP server. What breaks when you go stateless?
How do progress reporting, cancellation, and timeouts work for long-running MCP requests?
How do you debug an MCP server's behavior in production, and what does the protocol's logging capability provide?
You are deploying a remote MCP server to production for external users. What is on your security checklist?
Design a multi-tenant remote MCP server for a SaaS product. What are the hard problems?
Trace the evolution of the MCP specification across its major revisions. What migration concerns does each introduce?
You are implementing sampling support in a host application. What design and security decisions do you face?
What happens when an MCP server is also an MCP client? Discuss composition patterns and their risks.
Your platform team wants agents to use 50 MCP servers with hundreds of tools efficiently. How do you architect this?
A remote MCP integration works in testing but fails intermittently in production. Walk through your systematic debugging approach.
How would you migrate an MCP server from the 2025-11-25 spec to the stateless 2026-07-28 revision?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
Model Context Protocol (MCP) in pictures.
A quick recap of Model Context Protocol (MCP) in 37 short animated pictures, one idea at a time. About 10 min to get the whole topic back in your head before you walk in. Pause any picture, slow it down, or step through it.
Pro The first chapter is free to play. The other 33 pictures come with Pro.
Model Context Protocol (MCP) cheatsheet
- Hosts, clients & servers01
- Tools, resources & prompts02
- Messages & versions03
- stdio & HTTP transports04
- Build & connect a server05
- Tool schemas & errors06
- Server-to-client requests07
- Auth & security08
- Run MCP at scale09
- Spec versions & migration10
- The model11
- + 5 more inside
This picture is part of Pro. The first chapter is free to play; the other 33 pictures come with Pro.
Get Pro · $10/mo Already Pro? Sign in49 of 56 Model Context Protocol (MCP) answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.