All questions
Showing of 55What 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 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.
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 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.
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 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.
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 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.
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 -
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.
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 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.
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 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.
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?
Walk me through capability negotiation in detail. Why does MCP bother with it?
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 the same minimal 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?
Walk through the OAuth 2.1 authorization flow for a remote MCP server.
Why does MCP lean on dynamic client registration, and what are the alternatives?
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 should MCP servers handle errors? Distinguish protocol errors from tool execution errors.
An agent connected to many MCP servers starts performing worse. Why, and what do you do about it?
How do you debug an MCP server's behavior in production, and what does the protocol's logging capability provide?
Describe the MCP ecosystem and how the official registry works.
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?
What is the MCP extensions framework, and how does the feature deprecation policy work?
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.
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.
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.