MCP
Interactive Quiz - Only Have MCQs
Q1. (MCQ) MCP was developed to solve a specific pain point in agentic frameworks. What is the core problem MCP addresses?
A) LLMs cannot generate JSON-formatted tool calls without a standardized protocol B) Each tool must be manually tracked, described with its JSON schema, and updated whenever its API changes — a process that becomes unmanageable at scale C) LLMs lack the reasoning ability to select appropriate tools without a protocol layer D) AI applications cannot connect to the internet without a dedicated communication standard
Answer: B
- A) — Incorrect. LLMs can generate JSON tool calls through function calling without MCP. The problem isn't format — it's the operational burden of managing many tools across many APIs.
- B) — Correct. Without MCP, any tool needs to be manually tracked and fed to the LLM, manually described (including its expected JSON schema), and manually updated whenever its API changes. MCP standardizes this process so AI applications can connect to external systems through a uniform protocol, eliminating per-tool manual maintenance.
- C) — Incorrect. Tool selection reasoning is a model capability issue (handled by planning/reasoning components), not a protocol issue. MCP standardizes connectivity, not decision-making.
- D) — Incorrect. AI applications can make HTTP requests and access APIs without MCP. MCP provides standardization across diverse connections, not basic internet connectivity.
Q2. (MCQ) MCP is compared to a "USB-C port for AI applications." What specific aspect of USB-C does this analogy capture?
A) USB-C's ability to charge devices at high speed B) USB-C's role as a standardized interface connecting diverse devices through a single port type C) USB-C's backward compatibility with older USB formats D) USB-C's ability to transfer only one type of data at a time
Answer: B
- A) — Incorrect. Speed/charging is a USB-C feature, but the analogy is about standardization, not performance characteristics.
- B) — Correct. Just as USB-C provides a standardized way to connect diverse electronic devices (monitors, drives, phones) through one universal port, MCP provides a standardized way to connect AI applications to diverse external systems (data sources, tools, workflows) through one universal protocol. The analogy is about uniform connectivity replacing fragmented, device-specific connectors.
- C) — Incorrect. Backward compatibility isn't the point of the analogy. MCP doesn't claim to be backward-compatible with older tool-integration methods.
- D) — Incorrect. USB-C actually supports multiple data types simultaneously, and MCP similarly connects to diverse system types (data sources, tools, workflows) — the opposite of single-type limitation.
Q3. (MSQ — Select ALL that apply) What are the three key participants in MCP's client-server architecture?
A) MCP Host — an LLM application that manages connections B) MCP Client — maintains 1:1 connections with MCP servers C) MCP Server — provides context, tools, and capabilities to the LLMs D) MCP Broker — a middleware layer that routes messages between all clients and servers
Answer: A, B, C
- A) — Correct. The MCP Host is the AI application (like Claude Code, Cursor, Codex) that manages connections. It creates one MCP Client for each MCP Server it needs to connect to.
- B) — Correct. Each MCP Client maintains a dedicated 1:1 connection with its corresponding MCP Server.
- C) — Correct. MCP Servers provide context, tools, and capabilities to the LLMs through the standardized protocol.
- D) — Incorrect. There is no "Broker" component in MCP's architecture. The architecture is a direct client-server model — the Host creates Clients that connect directly to Servers, with no intermediary routing layer.
Q4. (MCQ) An MCP Host application needs to connect to 5 different MCP Servers (GitHub, Supabase, a local file system, a database, and a search engine). How many MCP Clients does the Host create?
A) 1 — a single client manages all server connections B) 5 — one dedicated client per server C) It depends on whether the servers are local or remote D) 2 — one for local servers (STDIO) and one for remote servers (HTTP)
Answer: B
- A) — Incorrect. A single client does not manage multiple server connections. The architecture explicitly states a 1:1 relationship between clients and servers.
- B) — Correct. The MCP Host accomplishes connections by creating one MCP Client for each MCP Server. With 5 servers, 5 clients are created, each maintaining a dedicated connection with its corresponding server.
- C) — Incorrect. The number of clients is determined by the number of servers, not by their transport type. Local or remote doesn't change the 1:1 client-server relationship.
- D) — Incorrect. Clients aren't grouped by transport mechanism. Each server gets its own dedicated client regardless of whether it uses STDIO or Streamable HTTP.
Q5. (MCQ) A developer is setting up an MCP server that runs on their local machine and communicates with a single MCP client through the process's standard input/output streams. Which transport mechanism is this?
A) Streamable HTTP transport B) STDIO transport C) WebSocket transport D) JSON-RPC transport
Answer: B
- A) — Incorrect. Streamable HTTP uses HTTP POST for client-to-server messages with optional Server-Sent Events. It's for remote server communication, not local process communication.
- B) — Correct. 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. Local MCP servers using STDIO typically serve a single MCP client.
- C) — Incorrect. WebSocket transport is not one of the two transport mechanisms defined in MCP. The two supported mechanisms are STDIO and Streamable HTTP.
- D) — Incorrect. JSON-RPC 2.0 is the data layer protocol (message format), not a transport mechanism. The transport layer (STDIO or Streamable HTTP) carries JSON-RPC messages.
Q6. (MCQ) MCP's transport layer supports two mechanisms: STDIO and Streamable HTTP. A key difference is that Streamable HTTP supports authentication methods. Which authentication approach does MCP specifically recommend for obtaining tokens?
A) Basic authentication with username and password B) OAuth for obtaining authentication tokens C) SSH key-based authentication D) mTLS (mutual TLS) certificate exchange
Answer: B
- A) — Incorrect. While HTTP supports basic auth, MCP doesn't specifically recommend it. Basic auth transmits credentials with each request and is considered less secure for modern protocols.
- B) — Correct. The Streamable HTTP transport supports standard HTTP authentication methods including bearer tokens, API keys, and custom headers. MCP specifically recommends using OAuth to obtain authentication tokens.
- C) — Incorrect. SSH keys are used for secure shell connections, not HTTP-based protocols. MCP's Streamable HTTP transport operates over standard HTTP, not SSH.
- D) — Incorrect. mTLS is not mentioned as a recommended authentication method. While it's a valid security mechanism, MCP specifically points to OAuth.
Q7. (MSQ — Select ALL that apply) MCP defines three core primitives that servers can expose. Which of the following are they?
A) Tools — executable functions for performing actions like file operations or API calls B) Resources — data sources providing contextual information like file contents or database records C) Prompts — reusable templates that structure interactions with language models D) Sampling — allows servers to request language model completions from the client
Answer: A, B, C
- A) — Correct. Tools are executable functions that AI applications can invoke to perform actions (e.g., file operations, API calls, database queries).
- B) — Correct. Resources are data sources that provide contextual information to AI applications (e.g., file contents, database records, API responses).
- C) — Correct. Prompts are reusable templates that help structure interactions with language models (e.g., system prompts, few-shot examples).
- D) — Incorrect. Sampling is a client primitive, not a server primitive. It allows servers to request language model completions from the client's AI application. The three server primitives are specifically Tools, Resources, and Prompts.
Q8. (MCQ) An MCP server developer wants their server to request an LLM completion from the host application without including any LLM SDK in the server code. Which MCP client primitive enables this?
A) Elicitation B) Logging C) Sampling D) Resources
Answer: C
- A) — Incorrect. Elicitation allows servers to request additional information from users (human input), not from the language model. It's for user confirmation or data collection, not LLM completions.
- B) — Incorrect. Logging enables servers to send log messages to clients for debugging and monitoring. It has nothing to do with obtaining LLM completions.
- C) — Correct. Sampling allows servers to request language model completions from the client's AI application. This is specifically useful when server authors want access to a language model but want to stay model-independent and not include a language model SDK in their MCP server. They use
sampling/createMessageto request completions from the client's AI application. - D) — Incorrect. Resources are a server primitive for exposing data sources. They provide contextual information to the client, not LLM completions to the server.
Q9. (MCQ) MCP is described as a stateful protocol requiring lifecycle management. What is the purpose of the Initialization phase?
A) To establish the transport layer encryption keys B) To negotiate capabilities and agree on the protocol version between client and server C) To authenticate the user's identity with the MCP server D) To preload all available tools into the LLM's context window
Answer: B
- A) — Incorrect. Transport layer encryption is handled by standard mechanisms (HTTPS/TLS), not by MCP's initialization phase. The initialization phase operates at the protocol level, not the transport security level.
- B) — Correct. The purpose of lifecycle management is to negotiate the capabilities (features and operations that a client or server supports, such as tools, resources, or prompts) that both client and server support. The initialization phase handles capability negotiation and protocol version agreement.
- C) — Incorrect. Authentication is handled at the transport layer (via OAuth tokens, API keys, etc.), not during the initialization lifecycle phase. Initialization is about capability negotiation, not identity verification.
- D) — Incorrect. Tools are discovered dynamically during the Operation phase via
tools/list, not preloaded during initialization. The initialization phase establishes what types of primitives are supported, not their specific contents.
Q10. (MCQ) In the commit-summarization example, the MCP Host first calls the MCP Server to discover which tools are available. The server responds with a list. The LLM then decides to use a tool and sends a request through the Host. What method does the client use to discover available tools?
A) tools/call B) tools/get C) tools/list D) sampling/createMessage
Answer: C
- A) — Incorrect.
tools/callis used to execute a tool, not to discover which tools are available. Discovery must happen before execution. - B) — Incorrect.
*/getis used for retrieval of a specific primitive's details, not for listing all available primitives. You need to know what exists before you can get its details. - C) — Correct. Each primitive type has associated methods for discovery (
*/list), retrieval (*/get), and execution (tools/call). MCP clients usetools/listto discover available tools. The client first lists all available tools, and then the LLM can choose to execute them. This design allows listings to be dynamic. - D) — Incorrect.
sampling/createMessageis a client primitive that allows servers to request LLM completions. It has nothing to do with tool discovery.
Q11. (MCQ) A remote MCP server adds a new tool to its capabilities while several clients are connected. How are the connected clients informed about this change?
A) Clients must manually poll tools/list at regular intervals to detect changes B) The server sends a tool update notification as a JSON-RPC 2.0 notification message to connected clients C) The clients are disconnected and must reinitialize to discover new tools D) The new tool is only visible to clients that connect after the update
Answer: B
- A) — Incorrect. While clients can call
tools/list, relying on periodic polling is unnecessary because MCP supports real-time notifications. Polling is inefficient and introduces latency in detecting changes. - B) — Correct. The protocol supports real-time notifications to enable dynamic updates. When a server's available tools change (new functionality or modifications), the server sends tool update notifications to inform connected clients. These are sent as JSON-RPC 2.0 notification messages (without expecting a response).
- C) — Incorrect. Disconnection and reinitialization would be disruptive and wasteful. The notification system exists precisely to avoid this — clients can learn about changes without restarting connections.
- D) — Incorrect. Existing connected clients receive notifications about tool changes in real-time. They don't need to reconnect to see new tools.
Q12. (MCQ) An MCP server provides context about a database. It exposes a function to run SQL queries, a data source containing the database schema, and a template with few-shot examples for writing queries. In MCP primitive terms, these correspond to:
A) Three Tools with different configurations B) A Tool (SQL query function), a Resource (database schema), and a Prompt (few-shot query examples) C) Three Resources with different access levels D) A Resource (SQL query function), a Tool (database schema), and a Prompt (few-shot query examples)
Answer: B
- A) — Incorrect. Not everything is a Tool. The database schema is passive contextual data (a Resource), and the few-shot template structures LLM interaction (a Prompt). Only the executable query function is a Tool.
- B) — Correct. This maps precisely to the three server primitives: the SQL query function is a Tool (an executable function the AI can invoke), the database schema is a Resource (a data source providing contextual information), and the few-shot examples are a Prompt (a reusable template structuring language model interactions). This is the exact example given in the material.
- C) — Incorrect. The SQL query function performs actions — it's executable, not just data. Resources are passive data sources, not action-performing functions.
- D) — Incorrect. The classification is reversed for Tool and Resource. The executable function is the Tool; the schema is the Resource. A Resource provides data, a Tool performs actions.
Q13. (MCQ) In the Google Chat MCP server specification, the server uses httpx.AsyncClient for API calls and wraps each function with the @mcp.tool decorator. When an HTTP error occurs (e.g., 403 Forbidden), what is the required error handling behavior?
A) The server should crash and restart automatically B) The server should silently retry the request up to 3 times before failing C) The error should be caught and returned as a clean, human-readable string so the host LLM understands the failure point D) The error should be logged to the console and hidden from the LLM
Answer: C
- A) — Incorrect. Crashing the server on HTTP errors would be catastrophic — it would disconnect all clients and disrupt all ongoing operations. MCP servers should be resilient to individual request failures.
- B) — Incorrect. Automatic retries are not specified. Some errors (like 403 Forbidden) are authorization issues that won't resolve with retries. The requirement is about communicating the error clearly.
- C) — Correct. The specification requires robust try/except blocks handling HTTP status errors natively (
httpx.HTTPStatusError). These should be caught and returned as clean, human-readable strings so the host LLM understands the exact point of failure (e.g., "403 Forbidden", "404 Not Found") instead of crashing the server. - D) — Incorrect. Hiding errors from the LLM would prevent it from understanding what went wrong and adapting its behavior. The LLM needs to see the error to decide on an appropriate next action (e.g., trying a different approach, informing the user).
Q14. (MSQ — Select ALL that apply) The Streamable HTTP transport and STDIO transport differ in their typical usage patterns. Which of the following are correct?
A) STDIO is used for local MCP servers and typically serves a single client B) Streamable HTTP is used for connecting to remote servers on the internet C) STDIO supports OAuth authentication for secure connections D) Streamable HTTP can serve many MCP clients simultaneously
Answer: A, B, D
- A) — Correct. STDIO transport uses standard input/output streams for local process communication on the same machine. Local MCP servers using STDIO typically serve a single MCP client.
- B) — Correct. Streamable HTTP is generally used when connecting with servers on the Internet by different providers (like GitHub, Supabase) or with your own remote MCP server.
- C) — Incorrect. STDIO uses direct process communication with no network overhead — there's no HTTP layer to support OAuth. Authentication mechanisms like OAuth, bearer tokens, and API keys are features of the Streamable HTTP transport.
- D) — Correct. Remote MCP servers that use Streamable HTTP transport will typically serve many MCP clients, unlike STDIO's single-client pattern.
Q15. (MCQ) MCP's data layer is built on a specific message exchange protocol. Which protocol does it implement?
A) GraphQL B) gRPC with Protocol Buffers C) JSON-RPC 2.0 D) REST with OpenAPI specification
Answer: C
- A) — Incorrect. GraphQL is a query language for APIs with a type system. MCP doesn't use GraphQL — its message format is based on JSON-RPC 2.0.
- B) — Incorrect. gRPC uses Protocol Buffers for serialization and HTTP/2 for transport. MCP uses JSON-RPC 2.0 messages, not binary Protocol Buffers.
- C) — Correct. The data layer implements a JSON-RPC 2.0 based exchange protocol that defines the message structure and semantics. The transport layer abstracts communication details, enabling the same JSON-RPC 2.0 message format across all transport mechanisms (both STDIO and Streamable HTTP).
- D) — Incorrect. REST/OpenAPI is the traditional API design approach that MCP is designed to replace as a standardized interface. MCP uses JSON-RPC 2.0, which supports bidirectional communication and notifications — capabilities REST doesn't natively provide.
Q16. (MCQ) An MCP server needs to ask the user for confirmation before executing a destructive action (like deleting a database table). Which client primitive should the server use?
A) Sampling B) Elicitation C) Logging D) Tools
Answer: B
- A) — Incorrect. Sampling requests language model completions from the client's AI application. It asks the LLM to generate text, not the user to confirm an action.
- B) — Correct. Elicitation allows servers to request additional information from users. This is specifically useful when server authors want to get more information from the user or ask for confirmation of an action. The
elicitation/createmethod requests this additional input from the user. - C) — Incorrect. Logging sends debugging and monitoring messages to clients. It communicates to the client for observability purposes, not to the user for interactive confirmation.
- D) — Incorrect. Tools are server primitives that the client/LLM invokes. They represent executable functions, not mechanisms for servers to request user input.
Q17. (MCQ) In the commit-summarization example, the complete flow is: (1) Host/Client asks the Server which tools are available, (2) LLM chooses to use a tool and sends a request via the Host, (3) LLM receives results and generates an answer. At which step does the LLM's autonomous decision-making occur?
A) Step 1 — the LLM decides which servers to connect to B) Step 2 — the LLM receives tool information and chooses to use a specific tool C) Step 3 — the LLM decides whether to show the results to the user D) Before Step 1 — the LLM designs the MCP server's tool specifications
Answer: B
- A) — Incorrect. Server connections are established by the Host application's configuration, not by the LLM's real-time decision-making. The LLM doesn't choose which servers to connect to — the Host manages those connections.
- B) — Correct. After the Host/Client discovers available tools (Step 1), the LLM receives this information and may choose to use a tool. The word "may" is key — the LLM autonomously decides whether a tool is needed and which one to invoke. This is the planning/reasoning component of the agent making a tool-selection decision.
- C) — Incorrect. Presenting results to the user is the natural final step. The LLM's role is to parse the tool results and generate a coherent answer — this is response generation, not autonomous tool selection.
- D) — Incorrect. Tool specifications are designed by developers when building the MCP server. The LLM consumes tool descriptions at runtime; it doesn't design them.
Q18. (MCQ) MCP's lifecycle has three phases: Initialization, Operation, and Shutdown. During the Initialization phase, the client sends an initialize request, the server responds with an initialize response, and then the client sends an initialized notification. Why does the client send this final notification?
A) To authenticate the client's identity with the server B) To signal that the client has processed the server's capabilities and is ready for normal protocol operations C) To request the server to begin loading its tools into memory D) To start the shutdown timer for the connection
Answer: B
- A) — Incorrect. Authentication is handled at the transport layer (OAuth, bearer tokens), not through the initialization notification. The
initializednotification is about protocol readiness, not identity verification. - B) — Correct. The three-step handshake (request → response → notification) follows a standard pattern: the client requests initialization, the server responds with its capabilities and protocol version, and the client sends the
initializednotification to confirm it has processed everything and is ready to transition to the Operation phase. This ensures both sides are synchronized before normal communication begins. - C) — Incorrect. Tool loading is the server's internal concern. The
initializednotification signals protocol readiness, not a directive for the server to perform internal operations. - D) — Incorrect. The
initializednotification transitions to the Operation phase, not the Shutdown phase. Shutdown is a separate, later phase triggered by explicit disconnection.