Study FAQ
How should an MCP host and server expose tools, resources, and prompts?
Also asked as 2
- What is the difference between an MCP tool, resource, and prompt?
- Who controls tool, resource, or prompt selection across an MCP host, client, and server?
Answer
The MCP host owns the user experience, consent, and context assembly. Its client manages the protocol relationship to one server. That server exposes focused capabilities and sees only the data required for its operation. Under MCP 2026-07-28, use tools for model-selectable operations, resources for application-selected context, and prompts for user-selected templates. Hosts decide the exact interface.
An inventory integration could expose a resource URI for an authorized stock record, a prompt template for reviewing shelf availability, and a tool for submitting a proposed adjustment. The host can surface only the useful primitives, ask for confirmation before a consequential tool call, and keep unrelated conversation state out of server requests.
Enforce authorization when listing and accessing resources. Validate URIs and paths. An MCP file:// URI has filesystem-like semantics even when backed by virtual data. Encode binary content as a base64 blob. For a missing resource, MCP 2026-07-28 uses JSON-RPC -32602. Clients supporting older servers should also recognize the earlier -32002 error. Validate template arguments, label externally supplied text, and keep secrets out of prompt content. A tool exposes an explicit input schema and optional output schema, with server-side input validation and action authorization. The same user and business object may be involved in all three, but each request still has its own authority and purpose.
Full explanation
MCP Server Development and Choosing Between Tools, Skills, and MCP
Study guide · CCDV-F
Read the full explanation