LearnThatStack Ace your next interview
AI Engineering
Model Context Protocol (MCP).
Change topic Change
Practice · Questions

All questions

Showing of 55
Beginner 12
01

What is the Model Context Protocol, and what problem does it solve?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

The Model Context Protocol (MCP) is an open standard for connecting AI applications to data sources and tools. Think of it as one shared connector instead of a custom integration for every pair of systems.

Without MCP, each AI application needs separate code for every service it uses. For example, three AI applications connecting to four services may require twelve custom integrations. Each one needs its own tool definitions, authorization, and glue code.

MCP changes that pattern. Each application implements one client, and each external system gets one server. Compliant clients and servers can then connect without a new pair-specific integration.

The protocol standardizes four areas:

  • Discovery of tools, resources, and prompts.
  • Standard request and response messages.
  • Transport options for local and remote connections.
  • Session setup, capability negotiation, and notifications.
Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

02

Explain the MCP architecture: what are hosts, clients, and servers?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

MCP defines three roles.

The host is the AI application the user actually interacts with: Claude Desktop, Claude Code, an IDE like Cursor, or your own agent. The host owns the model loop, the UI, and the security policy. It decides which servers to connect, gathers user consent, filters which tools reach the model, and mediates approvals.

A client is the protocol connector object the host creates to talk to one server. Each client maintains a 1:1 stateful session with exactly one server, handling initialization, capability negotiation, request/response correlation, and notifications. A host that connects to five servers runs five clients.

A server is the program that exposes capabilities: tools it can execute, resources it can read, and prompt templates it offers.

A useful mental model:

Host (Claude Desktop)
  Client 1  <->  Server A (filesystem, stdio)
  Client 2  <->  Server B (GitHub, Streamable HTTP)

The host receives a tool-use request from the model and routes it through the right client. It gets the result and inserts it back into the model's context.

Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

03

What are the three server primitives in MCP, and who controls each one?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

MCP servers expose three kinds of capability, distinguished by who decides when they are used.

Tools are model-controlled. They are executable functions (query a database, send a message, create a ticket) that the language model chooses to invoke during generation. Invocation is subject to host approval. Tools are the action surface and carry the most risk, so hosts typically require user confirmation for consequential calls.

Resources are application-controlled. They are read-only data items with an address, such as a file, schema, or log stream. The host decides when to fetch and attach them.

Prompts are user-controlled. They are reusable, parameterized message templates the server publishes, which hosts typically surface as slash commands or menu items.

For example, a code review server might expose a review_pr prompt that the user selects. The application could attach a git://repo/diff resource, while the model could call a post_review_comment tool after approval.

Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

04

What exactly is an MCP tool, and how does a client discover and call one?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

A tool is a callable function a server exposes to the model. Each tool definition has a name, a human-and-model-readable description, an inputSchema (JSON Schema describing the arguments), and optionally an outputSchema, a title, and behavioral annotations.

Discovery and execution use two protocol methods. The client calls tools/list to get definitions and tools/call to execute one:

{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": { "city": "Berlin" }
  }
}

The result contains a content array with text, image, audio, or resource blocks. It may also include structuredContent when the tool declares an output schema, plus an isError flag for failures. The host displays the result or returns it to the model.

Two details matter in practice. First, the model chooses tools based almost entirely on names and descriptions, so those are effectively prompt engineering. Second, if the server declares the listChanged capability it can push a notifications/tools/list_changed notification, after which the client re-fetches the list. Tool sets are dynamic, not fixed at startup.

Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

05

How do resources differ from tools in MCP, and when would you expose data as a resource?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Resources are read-only context, not actions. Each resource has a uniform resource identifier (URI), such as file:///home/user/report.pdf, plus metadata like name, description, and mimeType.

The key differences from tools: resources are meant to have no side effects, they are addressed by identity rather than invoked with arbitrary arguments. They are application-controlled: the host or user decides which ones to load into context, rather than the model calling them mid-generation.

Servers can let clients subscribe to an address and send notifications/resources/updated when it changes. This suits live logs or documents.

Expose data as a resource when it is naturally "a thing you attach": files, schemas, configuration, documentation pages, records with stable identity.

One practical compatibility issue: some hosts historically had stronger tool support than resource support. Server authors therefore sometimes add a companion tool that reads the same data to maximize compatibility.

Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

06

What are MCP prompts, and how do they show up in a host application?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Prompts are server-defined, reusable message templates that users explicitly invoke. A prompt definition includes a name, title, description, and a list of typed arguments. Clients discover them via prompts/list and expand one via prompts/get, passing argument values; the server returns fully-formed messages (role plus content blocks) ready to insert into the conversation.

Prompt content can embed resources, so a template can pull in live data at expansion time.

{
  "name": "review_code",
  "description": "Review code for quality and security issues",
  "arguments": [
    { "name": "language", "description": "Programming language", "required": true }
  ]
}

Because users choose prompts, hosts show them as commands, menu items, or buttons.

The value is that the server author, who knows the domain, can encode the best way to ask. That means the right framing, the right context to include, and the right output format.

Instead of every user hand-writing "summarize this incident and check the runbook," the incident-management server ships an analyze_incident prompt that does it consistently. Prompts also support argument autocompletion through the completion/complete request, so hosts can offer suggestions while the user fills in parameters.

Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

07

What is the wire format of MCP messages? Describe the JSON-RPC 2.0 basics the protocol relies on.

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

MCP uses JSON-RPC (JSON Remote Procedure Call) 2.0, a request-and-response message standard, encoded as Unicode text. There are three message shapes.

A request carries jsonrpc: "2.0", a unique id (string or number, never null), a method, and optional params. A response echoes the id and contains exactly one of result or error, where error has a numeric code, a message, and optional data.

A notification has a method and params but no id, and must never be answered.

{ "jsonrpc": "2.0", "id": 1, "method": "resources/read",
  "params": { "uri": "file:///notes.md" } }

{ "jsonrpc": "2.0", "id": 1, "result": {
  "contents": [{ "uri": "file:///notes.md", "mimeType": "text/markdown", "text": "..." }] } }

MCP layers its own method namespace on top: initialize, tools/list, tools/call, resources/read, prompts/get, sampling/createMessage, notifications/..., and so on. Both sides can send requests, which is unusual and important: servers can call back into clients (sampling, roots, elicitation). The protocol is therefore bidirectional and sessions are stateful.

Requests may be answered out of order; the id does the correlation.

Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

08

What transports does MCP support today, and how do you choose between them?

Part of Pro
09

How do you connect an MCP server to Claude Desktop?

Part of Pro
10

What is the MCP Inspector, and how do you use it during development?

Part of Pro
11

What are the practical differences between local and remote MCP servers?

Part of Pro
12

At a high level, what happens when an MCP client first connects to a server?

Part of Pro
Intermediate 21
13

Walk me through capability negotiation in detail. Why does MCP bother with it?

Part of Pro
14

How is the MCP specification versioned, and how do client and server agree on a version?

Part of Pro
15

What role do notifications play in MCP? Give concrete examples.

Part of Pro
16

Describe the stdio transport precisely. What rules trip people up?

Part of Pro
17

Explain how the Streamable HTTP transport works, including sessions and streaming.

Part of Pro
18

What was the original HTTP+SSE transport, why was it deprecated, and how do implementations stay backwards compatible?

Part of Pro
19

How would you build a minimal MCP server in Python? What is FastMCP?

Part of Pro
20

How would you build the same minimal server in TypeScript with the official SDK?

Part of Pro
21

What makes a good tool schema? Give concrete design guidelines.

Part of Pro
22

What are tool annotations, and why must hosts treat them as untrusted?

Part of Pro
23

What is structured tool output in MCP, and how does it interact with backwards compatibility?

Part of Pro
24

How do resource subscriptions work, and what does a server need to implement?

Part of Pro
25

What are resource templates, and how does argument completion work with them?

Part of Pro
26

How does pagination work for MCP list operations?

Part of Pro
27

What is sampling in MCP? Describe the flow and why it is designed with a human in the loop.

Part of Pro
28

What are roots in MCP, and what guarantees do they provide?

Part of Pro
29

Explain elicitation. When was it added and what constraints does it have?

Part of Pro
30

How do you configure MCP servers in Claude Code, and what do its scopes mean?

Part of Pro
31

What are Multi Round-Trip Requests (MRTR) in MCP, and which server-initiated requests do they replace?

Part of Pro
32

What is the MCP Tasks extension, and when would you put a long-running tool call behind a task?

Part of Pro
33

How do you test an MCP server, from unit tests to end-to-end client tests?

Part of Pro
Expert 22
34

Walk through the OAuth 2.1 authorization flow for a remote MCP server.

Part of Pro
35

Why does MCP lean on dynamic client registration, and what are the alternatives?

Part of Pro
36

What is token audience binding in MCP, and why is token passthrough forbidden?

Part of Pro
37

Explain the confused deputy problem in the context of MCP.

Part of Pro
38

How does prompt injection threaten MCP-based agents, and what mitigations actually help?

Part of Pro
39

What are tool poisoning and rug-pull attacks on MCP, and how do you defend against them?

Part of Pro
40

When should you use MCP versus plain function calling in your own application?

Part of Pro
41

Compare stateful and stateless designs for a Streamable HTTP MCP server. What breaks when you go stateless?

Part of Pro
42

How do progress reporting, cancellation, and timeouts work for long-running MCP requests?

Part of Pro
43

How should MCP servers handle errors? Distinguish protocol errors from tool execution errors.

Part of Pro
44

An agent connected to many MCP servers starts performing worse. Why, and what do you do about it?

Part of Pro
45

How do you debug an MCP server's behavior in production, and what does the protocol's logging capability provide?

Part of Pro
46

Describe the MCP ecosystem and how the official registry works.

Part of Pro
47

You are deploying a remote MCP server to production for external users. What is on your security checklist?

Part of Pro
48

Design a multi-tenant remote MCP server for a SaaS product. What are the hard problems?

Part of Pro
49

Trace the evolution of the MCP specification across its major revisions. What migration concerns does each introduce?

Part of Pro
50

You are implementing sampling support in a host application. What design and security decisions do you face?

Part of Pro
51

What happens when an MCP server is also an MCP client? Discuss composition patterns and their risks.

Part of Pro
52

Your platform team wants agents to use 50 MCP servers with hundreds of tools efficiently. How do you architect this?

Part of Pro
53

A remote MCP integration works in testing but fails intermittently in production. Walk through your systematic debugging approach.

Part of Pro
54

How would you migrate an MCP server from the 2025-11-25 spec to the stateless 2026-07-28 revision?

Part of Pro
55

What is the MCP extensions framework, and how does the feature deprecation policy work?

Part of Pro

No matches

Try a different filter or search term.

Know someone prepping for Model Context Protocol (MCP)? Send them this set.
Pro · $10/mo

48 of 55 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.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

Serverless on AWS

Serverless Architecture on AWS

Flutter Mobile

Flutter Cross-Platform Mobile Development

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

AI Engineer

LLMs, RAG, Agents, Evals

AI-Powered Developer

Claude Code, Copilot, Agentic Workflows

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git