MCP sampling: definition and example
MCP sampling is a client feature that lets a server request a completion from the user's language model through the client. The 2026-07-28 specification deprecates it, says new implementations should not adopt it, and points existing ones to calling model provider APIs directly. The spec still says a human should be able to deny sampling requests while the feature exists.
Facts read on .
Example
The deprecated-features registry lists Sampling, Roots and Logging as deprecated in 2026-07-28, with the earliest removal in the first revision released on or after 2027-07-28.
Sources
- MCP specification 2026-07-28: Deprecated Features (modelcontextprotocol.io), read