You are building an MCP server for a retailer's merchandising team. (1) summarize_reviews needs an LLM to condense 500 reviews, but the server must not hold an LLM API key and the user should be able to approve the request; (2) create_promo must ask the user mid-call which of two discount types to apply; (3) scan_assets may only work inside the image folders the user opened in the host. Which MCP client features fit, and why?
Show the answer and explanation
Correct answer: D, (1) sampling, because the host runs the completion and makes the final model choice; (2) elicitation, as the server asks the user for input; (3) roots, as the client shares the folders.
Explanation MCP
Tools, resources and prompts are server features; the three client features below let a server ask something of the host side. A server may use them only if the client declared the matching capability during initialisation.
| Feature | Server asks for | Who stays in control | Need here |
|---|---|---|---|
| Sampling | an LLM completion from the host's model (sampling/createMessage) | the host picks the actual model (the server can only state preferences), and the user can review or deny the request | summarising reviews without an API key on the server |
| Elicitation | structured input from the user mid-call (elicitation/create with a small JSON schema) | the user can accept, decline or cancel | choosing the discount type |
| Roots | the filesystem boundaries (root URIs) it should work within (roots/list) | the client decides which roots to expose | limiting the scan to the opened folders |
Why the alternatives fail:
- Swapping sampling and elicitation confuses asking the model with asking the user.
- Resources are a server feature: data the server offers to the client. They cannot tell the server where it may work; roots come from the client.
- Sampling is designed so that the host keeps model choice and human oversight: the server may send only preferences and model-name hints, and the client makes the final selection, so a server can never bind the host to an exact model.
Two cautions: roots are coordination, not a sandbox, so also enforce file access with OS permissions; and the spec forbids using elicitation forms to collect sensitive information such as passwords.
Interview tip: describe sampling as "the server borrows the host's LLM", which keeps provider keys, cost and model policy in one place.