Skip to content
PrepMint

MCP & AI Agents

MCP Fundamentals

What MCP is and how it works

50 questions
Easy· 20Medium· 20Hard· 10

Last reviewed

Recommended

MCP Fundamentals — Timed Test 5 (10 questions)

TimedEasy10 questions · 10 min
Start test

No account needed. Answers and explanations arrive when you submit.

What this topic tests

The mix every MCP Fundamentals set is built to, and the questions published against it so far. Nothing here is hidden before you start.

MCP Fundamentals — target difficulty mix and published question count per level
LevelTarget sharePublished
Easy40%20
Medium40%20
Hard20%10
Total50

MCP Fundamentals — the theory

The Problem A Standard Solves

Before MCP, every pairing of an AI application and an external system needed its own connector. Four applications and six systems meant twenty-four separate integrations.

MCP replaces that multiplication with one contract. MCP (Model Context Protocol) is an open-source standard for connecting AI applications to external systems. The documentation's own analogy is a good one: Think of MCP like a USB-C port for AI applications. Build the port once and everything that speaks it plugs in — MCP is an open protocol supported across a wide range of clients and servers.

MCP standardises the exchange of context, not the use of it — which is why one server works behind a chat app, an IDE and a terminal agent without knowing which it is talking to.

Three Participants, And The One Most People Get Wrong

MCP Host: The AI application that coordinates and manages one or multiple MCP clients. The host is the thing you open — an IDE, a desktop app, a terminal agent.

The client is not that. MCP Client: A component that maintains a connection to an MCP server and obtains context from an MCP server for the MCP host to use. It is a component inside the host, and there is one per server: The MCP host accomplishes this by creating one MCP client for each MCP server. Connect four servers and your one application is running four clients.

And MCP Server: A program that provides context to MCP clients. Note what that leaves out: where it runs. MCP servers can execute locally or remotely. "Local server" and "remote server" name the transport in use, not two kinds of program.

What A Server Offers, And Who Decides To Use It

Servers provide functionality through three building blocks: tools, resources and prompts. The distinction that matters is not what they carry but who reaches for them.

Tools are the model's. Tools are model-controlled, meaning AI models can discover and invoke them automatically. That is not a licence to act unsupervised — Tools may require user consent prior to execution, helping to ensure users maintain control over actions taken by a model.

Resources are the application's. Resources are application-driven, giving them flexibility in how they retrieve, process, and present available context. The host decides what to pull in and how much of it to show the model.

Prompts are the user's, and this is the label that misleads. Prompts are designed to be user-controlled, meaning they are exposed from servers to clients with the intention of the user being able to explicitly select them for use. The documentation then says exactly what that does not mean: This refers to who decides when the prompt is used, not who authors its content. The server writes the template. You choose when to fire it.

What The Client Offers Back — And What Just Got Deprecated

Servers can ask the host for things too. The live mechanism is elicitation: Elicitation provides a structured way for servers to gather necessary information on demand. Its two modes differ by a security rule, not a convenience. Form mode collects structured data through the client. URL mode does not: The interaction happens out of band and its data never passes through the client, which makes this mode suitable for sensitive flows such as credential entry or third-party OAuth authorization. The specification gives the rule its own heading: Privacy considerations: Servers must not use form mode to request sensitive information such as passwords, API keys, access tokens, or payment credentials.

Two client features you will still read about everywhere are on their way out. Roots let a client name directories a server should focus on, and were never a security control: Roots serve as a coordination mechanism between clients and servers, not a security boundary. Sampling let a server borrow the host's model. Both are Deprecated as of this revision, and both have a stated replacement — for sampling, New implementations should integrate directly with LLM provider APIs.

Deprecated is a defined state, not a rumour. A Deprecated feature remains part of the specification but is scheduled for removal: new implementations SHOULD NOT adopt it, and existing implementations SHOULD migrate before the feature's earliest removal. Today, No features have been removed under this policy yet.

Two Transports, One Protocol

Stdio transport: Uses standard input/output streams for direct process communication between local processes on the same machine, providing optimal performance with no network overhead. The host starts it: In the stdio transport, the client launches the MCP server as a subprocess. The rule that breaks the most servers is this one — The server MUST NOT write anything to its stdout that is not a valid MCP message. A stray print statement is a protocol error. Logging belongs on the other stream: The server MAY write UTF-8 strings to stderr for any logging purposes including informational, debug, and error messages.

Streamable HTTP transport: Uses HTTP POST for client-to-server messages with optional Server-Sent Events for streaming capabilities. Exposing a server over HTTP brings obligations that stdio does not have. Servers MUST validate the Origin header on all incoming connections to prevent DNS rebinding attacks, and When running locally, servers SHOULD bind only to localhost (127.0.0.1) rather than all network interfaces (0.0.0.0). Skip those and a web page you visit can reach the server running on your laptop.

None of this changes the messages themselves. The transport layer abstracts communication details from the protocol layer, enabling the same JSON-RPC 2.0 message format across all transport mechanisms.

There Is No Handshake Any More

Unlearn the opening exchange. There is no negotiation handshake. Every request declares the protocol version it is using via the io.modelcontextprotocol/protocolVersion key in its \_meta field, and the server accepts or rejects each request independently. Reject looks like this: If the server does not support the requested version, it responds with an UnsupportedProtocolVersionError listing the versions it does support.

There is still a way to ask up front, and its direction is worth memorising. Servers MUST implement server/discover. But Calling server/discover is optional for clients — a client may invoke any RPC inline and handle UnsupportedProtocolVersionError if the server does not support the requested version.

Older implementations have not vanished. Legacy: protocol versions that establish a session with an initialize handshake (2025-11-25 and earlier). So initialize is not wrong everywhere; it is wrong for this revision.

Being stateless has a practical payoff. Because the protocol is stateless, any in-flight requests are simply lost and the client can retry them against the fresh process. A crashed stdio server is a restart, not a recovery procedure.

Two Kinds Of Failure, And Only One Is Worth Telling The Model

When a tool call fails, the protocol distinguishes what went wrong. Protocol Errors indicate issues with the request structure itself that models are less likely to be able to fix — an unknown tool, a malformed request. Tool Execution Errors contain actionable feedback that language models can use to self-correct and retry with adjusted parameters — a date in the wrong format, a value out of range.

The distinction decides what the model is shown. Clients SHOULD provide tool execution errors to language models to enable self-correction, while Clients MAY provide protocol errors to language models, though these are less likely to result in successful recovery.

What The Official Registry Promises

The official registry is a metadata repository, not a code host. The MCP Registry hosts metadata that points to those packages. The code itself stays on npm, PyPI or Docker Hub.

What it guarantees is provenance, not safety. The MCP Registry uses namespace authentication to ensure that servers come from their claimed sources, and then The MCP Registry delegates security scanning to: the package registries beneath it and the marketplaces above it. A listing tells you who published a server, not that it is safe.

Where to Go Next

MCP Integration in Claude Code is this protocol wired into one client — scopes, approval prompts and tool-surface cost, none of which the specification dictates. AI Agents Basics covers the loop that decides to call a tool, which MCP says nothing about. And Cursor Basics shows the same standard in a different host — the quickest way to see which parts of a setup are MCP and which are one vendor's.

Sample questions

Three questions from this topic, with the answer and the reasoning shown.

Q1EasyA client sends a server a list of roots. What has it actually done?
  • Limited the server to those directories, so a read outside them cannot succeed once the list is set.
  • Created a rule the protocol enforces, so a server reading elsewhere is breaking a stated requirement.
  • Configured the client's own file layer to intercept and reject any read the server attempts outside them.
  • Told the server which directories to focus on, without restricting what it is able to reach.Correct

Explanation

The principle — Telling somebody where to work is not the same as stopping them working elsewhere.

Why the key is correct — Roots define filesystem boundaries for server operations, allowing clients to specify which directories servers should focus on. And the limit of that is stated in the next breath: while roots communicate intended boundaries, they do not enforce security restrictions.

Why the others are wrong — There is no restriction to break, no protocol-level rejection, and no interception layer in the client.

Remember this — Roots point; they do not fence.

Sources — MCP first-party documentation.

Open this question on its own page

Q2EasyA colleague says a program can only be called an MCP server if it is running somewhere on the network. Is that right?
  • Yes — a server has to be reachable over the internet, which is what separates it from a plain library.
  • No — a server is a program that provides context, and it may execute locally or remotely.Correct
  • Yes — a server needs to be on separate hardware, so that the host and the server are not competing for resources.
  • Yes — a server is a hosted account you subscribe to, and the program is only the part that connects you to it.

Explanation

The principle — Definitions in this protocol are about role, not about deployment.

Why the key is correct — MCP Server: A program that provides context to MCP clients. Where it runs is a separate question, and the documentation answers it directly: MCP servers can execute locally or remotely.

Why the others are wrong — Network reachability, separate hardware and a subscription are all things some servers happen to have. None of them appears in the definition.

Remember this — What makes it a server is what it provides, not where it sits.

Sources — MCP first-party documentation.

Open this question on its own page

Q3EasyA feature is listed as Deprecated in the MCP specification. What does that tell you about its current status?
  • It is still part of the specification, but scheduled for removal and not for new implementations.Correct
  • It has already been taken out of the specification, and the entry is there to record that it once existed.
  • It carries on being specified but stops functioning in conforming implementations from the moment it is marked.
  • Someone has voiced a concern about it, without any defined process attached to what happens next.

Explanation

The principle — Deprecated is a defined state in a lifecycle, not a mood.

Why the key is correct — A Deprecated feature remains part of the specification but is scheduled for removal: new implementations SHOULD NOT adopt it, and existing implementations SHOULD migrate before the feature's earliest removal. Three facts in one sentence — still specified, going away, and different advice for new code than for old.

Why the others are wrong — It has not been removed, it does not stop working, and there is a policy behind it rather than an opinion.

Remember this — Still there, still working, on notice.

Sources — MCP first-party documentation.

Open this question on its own page

Practise all 50 questions

Every published question in MCP Fundamentals, with its answer and explanation.

Frequently asked

What people ask about mcp fundamentals.

Is MCP an Anthropic product?
MCP began at Anthropic and is now an open standard with its own specification, governance and registry, and the registry is backed by contributors including Anthropic, GitHub, PulseMCP and Microsoft. In practice the question that matters is not who started it but who implements it: the protocol is supported across a wide range of clients and servers, and a server you write against the specification works in any of them without changes. Nothing in the specification is Anthropic-specific.
What is the difference between an MCP host, a client and a server?
The host is the application you open. The client is a component inside it, and there is exactly one per connected server, each maintaining its own dedicated connection. The server is the program that provides context. The common mistake is treating "client" as a synonym for the app — connect three servers to one IDE and you have one host running three clients. The distinction matters the moment something breaks, because a failure is almost always in one client's connection rather than in the host.
Do MCP servers run on my machine or somewhere else?
Either, and the specification treats that as an implementation detail. A server using the stdio transport is launched by the host as a subprocess and runs locally; a server using Streamable HTTP is reached over the network and typically serves many clients at once. "Local server" and "remote server" are everyday shorthand for those two transports rather than two categories of software. The same server code can often be packaged either way.
I keep reading about the initialize handshake. Is it gone?
For protocol revision 2026-07-28, yes. There is no negotiation handshake: every request carries its own protocol version and capabilities, and the server accepts or rejects each request on its own. If the version is unsupported the server returns an error naming the versions it does support, and the client retries. Servers must implement server/discover so a client can ask up front, but calling it is optional. Implementations of earlier revisions still use initialize, and dual-era implementations support both — so the handshake is legacy, not extinct.
Are roots a way to stop a server reading files it should not?
No, and this is the most consequential misunderstanding in the protocol. Roots communicate intended boundaries; they do not enforce them. The specification says servers SHOULD respect root boundaries rather than MUST, because a server runs code the client cannot control. Actual security has to come from the operating system — file permissions and sandboxing. Roots prevent accidents by well-behaved servers, which is worth having, but they are also Deprecated as of this revision, with directories now passed through tool parameters, resource URIs or server configuration.
Does the official MCP Registry mean a server has been vetted?
It means the publisher has been verified, not the code. Server names use a reverse-DNS format tied to a verified GitHub account or domain, so you can trust that a server under a namespace really comes from the owner of that namespace. Security scanning is explicitly delegated — to the package registries that host the actual code, and to the downstream marketplaces that add curation and ratings. Treat a registry entry as an identity check and read the server before you connect it.

More MCP & AI Agents topics

All of MCP & AI Agents

Related guides

  • Troubleshooting · 9 min read

    Your MCP server connects and the tools still do not run

    The server is green, the tool count is right, and the model answers without touching any of it. That is a selection problem, not a connection problem: ten causes with distinct fingerprints, from a six-word description to the thirtieth tool that pushed the right one out of reach.

  • Troubleshooting · 9 min read

    Why your MCP server isn't showing up in Claude Code

    An MCP server that adds cleanly and then shows no tools has about ten possible causes, and each leaves a different fingerprint. A symptom-first triage guide: what the /mcp statuses actually mean, why scope cannot be changed in place, and the config error that makes Claude run your URL as a local process.