skip to content

Why is MCP sampling deprecated in revision 2026-07-28, and what should servers do instead?

level: seniorimportance: must knowfreq 54%

answer

  1. still in the spec, but on notice
  2. twelve months is the floor
  3. a dated earliest-removal boundary
  4. bring your own provider integration
  5. the server now owns the credentials and the bill

basics

~20 s

Revision 2026-07-28 deprecates sampling and tells servers to integrate directly with an LLM provider API instead. Deprecated features stay in the spec at least twelve months, so the earliest removal is the first revision released on or after 2027-07-28.

solid answer

~50 s

Sampling is one of three capabilities deprecated together in revision 2026-07-28 — alongside roots and logging — and the stated migration is for a server that needs a model to call an LLM provider API directly rather than borrowing the client's. The deprecation policy is explicit: a deprecated feature remains in the specification for at least twelve months, new implementations should not adopt it, and the earliest possible removal is the first revision released on or after 2027-07-28. So sampling still works today and existing servers do not break, but nothing new should be built on it. The practical reasoning is that a server could never depend on it: sampling is an optional client capability, support across hosts was uneven, and the server controlled neither the model nor the cost nor whether the call happened at all. Related tidying in the same revision: the security principle "LLM Sampling Controls" was deleted, leaving three principles.

go deeper

for a junior

Be able to say that sampling is deprecated — not removed — in MCP revision 2026-07-28, and that the migration is for the server to call an LLM provider directly.

for a middle

Add the policy detail: deprecated features stay at least twelve months, new implementations should not adopt them, and the earliest removal here is the first revision on or after 2027-07-28. Mention that roots and logging were deprecated in the same revision.

for a senior

Explain why it is going: an optional capability with no guarantees about model, cost or whether the call happens is a poor base for required behaviour. Describe a migration concretely, including keeping the existing fallback path and folding tool loops inside your own provider connection.

for a principal

Own the consequences of the move — credential storage and rotation, a new cost centre, model choice becoming operator configuration, and the loss of the user-visible checkpoint their host used to provide — and decide deliberately how to replace that transparency in your own product.

## What the revision actually did MCP revision 2026-07-28 marks sampling as **Deprecated**, not removed. It sits in the deprecated-features register alongside roots and logging, all three carrying a named migration path. For sampling that path is: integrate directly with an LLM provider API. Deprecated is a defined status with teeth in both directions: - The feature stays in the specification for **at least twelve months**. - New implementations **SHOULD NOT** adopt it. - The earliest revision that may remove it is the first one released **on or after 2027-07-28**. That gives existing servers a real migration window and gives new servers a clear instruction. The correct interview phrasing is precise: not "MCP removed sampling", but "sampling was deprecated in 2026-07-28 and cannot be removed before a revision dated 2027-07-28 or later". ## Why it is going away The honest engineering reason is dependability. Sampling was always an optional client capability. A server could ask for a completion, but: - The client might not implement sampling at all, so the server needed a no-model fallback anyway. - The client chose the model; `modelPreferences` only hinted, so the server could not rely on a capability tier. - The client could decline, silently, by simply not continuing the exchange. - The client could lower `maxTokens`, adding truncation the server had to handle. A feature you must always have a fallback for, that gives you no guarantees when it does work, is a poor foundation for behaviour a server genuinely needs. Meanwhile the alternative got easy: provider APIs are ubiquitous and a server that owns one gets deterministic model choice, predictable cost, and a loop it controls end to end. There is a second, structural pressure. Revision 2026-07-28 removed server-initiated requests entirely, so sampling had to be re-plumbed through the multi-round-trip pattern — the server returns an `InputRequiredResult`, the client fulfils the completion, and the client re-issues the original call. That works, but it turns every completion into an extra round trip and an extra resumption of the server's handler. Deprecating the feature is consistent with a protocol that is deliberately shrinking toward stateless, client-initiated request/response. ## What migrating looks like For a server that used sampling: 1. **Add a provider integration.** The server now holds credentials, which is a real operational change: secret storage, rotation, and a cost centre where previously there was none. 2. **Make model choice explicit configuration.** What was a hint becomes a setting the operator owns, which is usually what the server wanted all along. 3. **Collapse the loop.** A tool loop that previously cost one MRTR round trip per iteration becomes internal API calls. 4. **Keep the fallback path.** The behaviour you had for "client does not support sampling" is the behaviour you now have for "provider is unavailable". The non-obvious cost is user-facing: the tokens now come out of the server operator's account rather than the user's, and the user loses the visibility they had when their own host was running every completion. If that visibility mattered to your product, replace it deliberately — with logging, with an explicit consent step in your own tool, or by making the model usage part of what the tool result reports. ## Related changes in the same revision The security section previously listed four key principles; "LLM Sampling Controls" was **deleted** in 2026-07-28, leaving User Consent and Control, Data Privacy, and Tool Safety. Within sampling itself, the `includeContext` values `"thisServer"` and `"allServers"` are deprecated in favour of omitting the field or sending `"none"`. The client capability keeps its `sampling.tools` and `sampling.context` sub-capabilities, all under the deprecated umbrella. ## What interviewers are checking This question separates candidates who learned MCP from 2025-era material from those tracking the current revision. Two failure modes to avoid: saying sampling was removed (it was deprecated), and pitching sampling as the recommended way for a server to get model access today. The strong answer names the status, the twelve-month floor, the 2027-07-28 earliest-removal date, the migration to direct provider integration, and the credential and cost consequences of that move.

  • Should a server written today still implement sampling for older clients?
    Generally no. The deprecation guidance is that new implementations should not adopt it, and any server relying on it needed a no-sampling fallback anyway because support was always optional. Implementing it adds a code path that is scheduled to disappear and that gives no guarantees when it works. Build the provider integration and keep one behaviour rather than two.
  • What else was deprecated in the same revision as sampling?
    Roots and logging were deprecated alongside it, each with its own migration: pass directories or files through tool parameters, resource URIs or server configuration instead of roots, and log to `stderr` on stdio or use OpenTelemetry for observability instead of the logging capability. Dynamic Client Registration is separately deprecated in favour of OAuth Client ID Metadata Documents.
  • What changed in the security principles when sampling was deprecated?
    The fourth key principle, "LLM Sampling Controls", was deleted in revision 2026-07-28, leaving three: User Consent and Control, Data Privacy, and Tool Safety. That is consistent — a principle devoted to controlling server-requested model use makes little sense once the feature it governs is on its way out of the specification.
  • What operational costs appear when you migrate off sampling?
    The server takes on credentials and billing it did not have: secret storage and rotation, a provider quota to monitor, and inference cost that now lands on the operator instead of the user. You also lose the user-visible checkpoint their host provided for every completion, so if that transparency mattered, rebuild it explicitly in your own tool's consent and reporting.

saying these in an interview costs you the question

  • Says sampling was removed in 2026-07-28 rather than deprecated
  • Cannot name a migration path off the feature
  • Recommends sampling as the current way for a server to reach a model
  • Assumes a deprecated feature can vanish in the very next revision
  • Ignores that migrating moves credentials and inference cost onto the server

context