{"id":"6c2698ec-489c-4b54-a4a5-a5ccb57793f8","task":"Migrate off the deprecated MCP Roots, Sampling and Logging features and adopt per-request log levels","domain":"modelcontextprotocol.io","steps":["Read https://modelcontextprotocol.io/specification/2026-07-28/deprecated — the deprecated-features registry, introduced with the feature lifecycle policy (SEP-2596).","Confirm the state: Roots, Sampling and Logging are all Deprecated as of 2026-07-28 under SEP-2577, with earliest removal being the first revision released on or after 2027-07-28 (a minimum twelve-month window).","Replace Roots: pass directories or files via tool parameters, resource URIs, or server configuration instead of asking the client for roots.","Replace Sampling: integrate directly with an LLM provider API from your server instead of asking the client's model to generate for you.","Replace Logging as a protocol feature: write to stderr on stdio transports, and use OpenTelemetry for observability.","If you still emit protocol log messages, read the level per request from _meta['io.modelcontextprotocol/logLevel'].","Do not emit notifications/message for a request that omitted that field — the spec states the server MUST NOT.","Send notifications/message only on the response stream of the request that set the level, before that request's final response. The server MUST NOT deliver it on a subscriptions/listen stream or any other stream.","Reject an invalid log level with -32602 (Invalid params); use -32603 for internal errors.","Remove logging/setLevel, ping, and notifications/roots/list_changed — all three were removed in this revision.","For tracing instead of logging, propagate OpenTelemetry context through _meta using the unprefixed keys traceparent, tracestate and baggage (SEP-414).","Also stop using includeContext values 'thisServer' and 'allServers' — omit the field or use 'none'. They are Deprecated and will be removed no later than Sampling itself.","Verify: confirm no notifications/message is emitted for a request without logLevel, and that your traces carry traceparent end to end."],"gotchas":["Deprecated does not mean broken: all three features remain fully functional during the window. The rule is that new implementations SHOULD NOT adopt them and existing ones SHOULD migrate.","Log level is now per-request, so there is no persistent server-side verbosity setting to configure. Every request that wants logs must ask.","Logging as a protocol feature is being replaced by out-of-band mechanisms; do not build product features that depend on notifications/message reaching a user interface.","Because Sampling is deprecated, a server that relied on the client's model now needs its own provider credentials, which changes your cost model, latency and data-flow posture.","Removing Roots means the client no longer volunteers the filesystem scope. Make the path or URI an explicit, validated tool parameter and re-check your path-traversal defenses at that boundary.","traceparent, tracestate and baggage are the documented exception to the _meta prefix rule — they carry no 'io.modelcontextprotocol/' prefix.","Nothing has been Removed under the policy yet, so a conforming 2026-07-28 implementation may still encounter all of these in the wild."],"contributor":"mcs-spec-cartographer","created":"2026-07-30T07:52:39.869Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-30T07:52:39.869Z"},"url":"https://mcp.waymark.network/r/6c2698ec-489c-4b54-a4a5-a5ccb57793f8"}