Making MCP Upgrades Pass a Compatibility Gate
Make MCP upgrades safer with tested protocol profiles, scoped capability evidence, explicit fallback policy, and a complete release-test matrix.
On this page
A dependency upgrade should have an answer to a practical question: which existing workflows will still complete correctly against the servers actually deployed?
For an MCP host, a successful connection answers only part of that question. The host, SDK, gateway, server, protocol revision, and optional extensions can change independently. Compatibility belongs to their tested combination.
I would make that combination an admission condition for tool dispatch and a release condition for deployment. The application should know which behavior it requires before a protocol adapter attempts to provide it.
This article uses a hypothetical workspace-provisioning assistant. It reads an organization's configuration, asks an operator for a missing project identifier, and creates a provisioning request after authorization. The examples are original application-policy sketches; they do not implement an MCP SDK or demonstrate interoperability with a live server.
Define the workflow contract before the connection policy
Start with observable application behavior:
| Workflow step | Required behavior | Acceptable fallback |
|---|---|---|
| Read configuration | Return a validated, authorized configuration snapshot | Refuse to plan if the snapshot is unavailable |
| Obtain missing input | Pause and resume with the operator's response | Use an explicitly supported application form |
| Create provisioning request | Validate authorization and create one logical request | Defer creation with a clear status |
| Follow changes | Deliver updates under the selected adapter contract | Poll only if that fallback meets the freshness objective |
These requirements do not imply that every protocol feature is mandatory. A simpler supported path can be adequate. The fallback still needs its own behavior, authorization, and latency contract.
A workflow that requires operator input must not quietly skip that step when an adapter lacks the necessary interaction support. Likewise, losing change notifications should trigger a supported observation path or an explicit degraded state.
The MCP replica-invariance article addresses where continuity lives. This article addresses whether a particular host/server combination can express and preserve that continuity.
Separate library versions from protocol profiles
Record the SDK package version and negotiated protocol revision independently. One library release can implement multiple revisions, and its default need not select its newest supported behavior.
The current TypeScript SDK protocol-version guide, for example, documents a legacy default, an automatic probing mode, and a modern pin that refuses fallback. That is documentation for a particular SDK generation, not a rule to assume for every language or future package release.
A profile should name the lifecycle as well as the revision. The 2025-11-25 lifecycle establishes version and capabilities through initialization. The 2026-07-28 versioning contract declares the revision on each request and allows discovery before other calls.
Moving between those profiles requires the corresponding adapter behavior. Changing a version string on an existing message is insufficient.
Keep an explicit allowlist of implemented, tested profiles with an application-defined preference order. Do not interpret an unfamiliar identifier as compatible because it sorts after a known date. A newly encountered revision needs an implementation and evidence before admission.
Bind compatibility evidence to its context
Discovery is useful evidence about an endpoint. It is not a permanent certification of every route behind that endpoint.
I would cache a compatibility record using an approved endpoint identity, authorization-context identity, transport, and deployment or configuration generation. Add the client and gateway builds that produced the result, the selected protocol profile, relevant server capabilities, completed contract checks, and an expiry policy.
The authorization key should be an opaque reference to the tenant, role, granted scope, and policy generation used for discovery. Do not use an access token as a cache key or metric label. Invalidate evidence when those permissions change.
For infrastructure under our control, bind the record to trusted deployment artifacts. For a vendor endpoint whose running build cannot be independently identified, record that uncertainty and use bounded freshness plus appropriate probes. A self-reported implementation version cannot establish artifact provenance.
During a rolling deployment, one successful discovery response cannot prove every backend behaves identically. Admit only a pool whose compatibility contract is enforced across its members, or use explicit versioned routes with known membership. Test through the real gateway path too.
Admit tool dispatch from a tested profile
The host can enforce a small application-level gate before invoking the SDK. The following example checks evidence identity, freshness, lifecycle consistency, baseline tool support, and required test evidence.
passedChecks comes from the host's trusted release-verification records. It is not a field accepted from a server's discovery response.
type Lifecycle = "initialize" | "per-request";type CompatibilityEvidence = { endpointKey: string; authContextKey: string; releaseKey: string; revision: string; lifecycle: Lifecycle; validUntilMs: number; serverCapabilities: Record<string, unknown>; passedChecks: readonly string[];};type DispatchPolicy = { endpointKey: string; authContextKey: string; releaseKey: string; allowedRevisions: readonly string[]; requiredChecks: readonly string[];};const LIFECYCLES = new Map<string, Lifecycle>([ ["2025-11-25", "initialize"], ["2026-07-28", "per-request"],]);function admitToolDispatch( evidence: CompatibilityEvidence, policy: DispatchPolicy, nowMs: number,): { revision: string; lifecycle: Lifecycle } { if (!Number.isFinite(nowMs) || nowMs < 0) { throw new Error("invalid-clock"); } if (!policy.endpointKey || !policy.authContextKey || !policy.releaseKey || policy.requiredChecks.length === 0) { throw new Error("incomplete-dispatch-policy"); } if (evidence.endpointKey !== policy.endpointKey || evidence.authContextKey !== policy.authContextKey || evidence.releaseKey !== policy.releaseKey) { throw new Error("evidence-context-mismatch"); } if (!Number.isFinite(evidence.validUntilMs) || evidence.validUntilMs <= nowMs) { throw new Error("evidence-expired"); } const lifecycle = LIFECYCLES.get(evidence.revision); if (!lifecycle || !policy.allowedRevisions.includes(evidence.revision) || evidence.lifecycle !== lifecycle) { throw new Error("unapproved-protocol-profile"); } const caps = evidence.serverCapabilities; if (caps === null || typeof caps !== "object" || Array.isArray(caps)) { throw new Error("invalid-capability-evidence"); } const tools = Object.hasOwn(caps, "tools") ? caps.tools : undefined; if (tools === null || typeof tools !== "object" || Array.isArray(tools)) { throw new Error("tools-capability-missing"); } const passed = new Set(evidence.passedChecks); if (policy.requiredChecks.some(check => !passed.has(check))) { throw new Error("contract-check-missing"); } return { revision: evidence.revision, lifecycle };}The releaseKey should identify the relevant tested combination, including SDK, gateway configuration, and server artifact where known. The surrounding service must validate record schemas and provenance before calling this function. These TypeScript types are not runtime validation for network JSON.
An empty tools object is a valid baseline capability declaration; it should not be confused with an absent capability. Subfeatures need their own schema-aware checks. Resource subscription support, for example, cannot be inferred merely from the presence of a resource capability object.
The returned plan is an instruction to a revision-specific adapter. It neither sends a request nor grants authorization. Tool-level access, argument validation, and tool-definition drift checks still happen at their own boundaries.
Required checks should describe the workflow contract for this route. A route with an approved application-form fallback can have a different tested contract from one requiring protocol-level input continuation. A single global “MCP works” flag loses that distinction.
Classify connection recovery before considering operation recovery
Use the SDK's transport-aware negotiation machinery, then apply host policy to its outcome. A generic exception handler that tries older revisions can turn an authentication problem or outage into a misleading compatibility verdict.
The HTTP transport specification gives recognized modern errors special treatment when inspecting a failed modern attempt. The TypeScript SDK troubleshooting guide separately documents authorization failures. Those distinctions should survive the adapter boundary:
| Observation | Interpretation | Host response |
|---|---|---|
| HTTP 401 or access-denied 403 | Authentication, scope, or access-policy problem | Resolve access through the supported flow; preserve the error |
| Recognized unsupported-version response | Protocol disagreement with version evidence | Re-negotiate only within approved implemented profiles |
| Header mismatch | Invalid mirrored request metadata | Fix request construction or gateway behavior |
| Missing client capability | Required host behavior was not declared | Check implementation and policy before advertising anything |
| HTTP timeout or server failure | Availability or indeterminate transport outcome | Apply bounded availability handling |
| Confirmed legacy detection under supported negotiation rules | A different lifecycle is required | Use the tested legacy adapter if policy permits it |
An HTTP 400 alone is not enough to choose a lifecycle. Conversely, a strict modern pin may intentionally reject a legacy endpoint rather than falling back.
The modern versioning specification defines -32022 for unsupported versions and returns supported revisions. Intersect that evidence with implemented, approved profiles. Do not invent support for a revision just because the peer advertises it.
Set separate limits for connection probing, corrective negotiation, and business-operation attempts. A bounded connection correction should not silently consume an unlimited retry budget for a write.
For mutation calls, distinguish a protocol rejection from a timeout after dispatch. The latter may leave the outcome unknown. Reconcile the provisioning request using its durable operation identity before issuing another mutation. Idempotency and side-effect safety continue to apply across protocol adapters.
Keep request and result semantics inside the adapter
The 2026-07-28 base protocol requires per-request protocol-version and client-capability metadata. Client identity is recommended rather than mandatory. Build this envelope from the host's configured implementation and handlers, outside model-authored tool arguments.
Client and server capabilities have different directions. A server advertising tools says it exposes tools. A client advertising an input-handling capability says it can handle that interaction. The architecture specification describes this per-request capability model. Do not copy one side's capability map into the other's declaration.
For HTTP, derive mirrored headers and the JSON-RPC body from one canonical request representation. The transport specification requires header/body consistency and defines -32020 for server-side header-validation errors. A gateway making decisions from headers must have confidence that the backend validates the corresponding body.
Result interpretation belongs at the same boundary. The base protocol defines complete and input_required, permits negotiated extension result types, rejects unrecognized result types, and specifies a backward-compatibility default of complete when the discriminator is absent.
Preserve that wire compatibility while validating the application outcome separately. A completed read can still lack the required configuration version. A provisioning response can still lack a durable request ID. Missing application evidence is a contract failure even if protocol decoding succeeded. Outcome checks are useful here.
Extensions also require their own settings and fallback rules. Core revision compatibility does not prove support for an asynchronous task result or a UI payload. Keep those contracts explicit; the durable MCP Tasks design covers one such extension.
Make missing matrix cells block the release
Integration tests should enumerate the combinations the product promises to support. Build the required matrix from deployment policy before running tests, so test discovery cannot silently shrink the promise.
For this assistant, I would include cases such as:
| Case | Expected observation |
|---|---|
| Legacy host and legacy server | Initialization and authorized reads follow the retained contract |
| Modern host and modern server | Per-request metadata and result handling work |
| Upgraded host and retained legacy server | Approved fallback works, or a configured pin refuses explicitly |
| Retained host and dual-era server | Existing workflows remain functional |
| Operator input required | The assistant pauses and resumes without skipping input |
| Authorization revoked | Dispatch is denied and no provisioning record is created |
| Gateway changes mirrored metadata | Rejection occurs before business execution |
| Mixed backend rollout | Every admitted backend satisfies the route's promised contract |
Pin the actual client/server builds, transport, gateway configuration, and authorization fixture. Exercise both ordinary reads and controlled mutations in an isolated environment. For a negative case, inspect an authoritative effect ledger or target fixture state to establish that no mutation occurred.
The Python sketch below validates already-collected matrix reports. It blocks missing cases, duplicate reports, wrong builds, incorrect outcomes, unexpected protocol selections, and incorrect mutation counts.
from dataclasses import dataclass@dataclass(frozen=True)class ContractCase: key: str client_build: str server_build: str transport: str outcome: str revision: str | None mutations: int@dataclass(frozen=True)class Observation: key: str release: str client_build: str server_build: str transport: str outcome: str revision: str | None mutations: intdef release_blockers( release: str, required: list[ContractCase], observed: list[Observation],) -> list[str]: keys = {case.key for case in required} if not release or not required or len(keys) != len(required): raise ValueError("a release needs unique, required contract cases") blockers = [] if any(row.key not in keys for row in observed): blockers.append("unexpected-case") for case in required: rows = [row for row in observed if row.key == case.key] if len(rows) != 1: blockers.append(f"{case.key}:missing-or-duplicate") continue row = rows[0] expected_identity = ( release, case.client_build, case.server_build, case.transport, ) actual_identity = ( row.release, row.client_build, row.server_build, row.transport, ) if actual_identity != expected_identity: blockers.append(f"{case.key}:artifact-mismatch") if row.outcome != case.outcome or row.revision != case.revision: blockers.append(f"{case.key}:behavior-mismatch") if type(row.mutations) is not int or row.mutations != case.mutations: blockers.append(f"{case.key}:effect-mismatch") return blockersEach case key should identify a versioned scenario manifest that also pins gateway and authorization fixtures. Validate those manifest identities when ingesting reports; the short example carries only selected fields.
A report is evidence only if its producing test job and artifacts are trusted. This function cannot prove that a reported mutation count was observed correctly. Keep the fixture snapshot, execution trace, and case manifest available for inspection.
Treat intentional reruns as separate matrix runs. Do not combine a failed attempt and a later passing attempt and select whichever makes the release look green. Publish one unambiguous result per required case for the candidate run.
The gate itself is not an interoperability suite. It prevents missing or mismatched evidence from being counted as successful compatibility testing.

*Flow: required tests produce trusted compatibility evidence. A failed or expired profile blocks dispatch; a current approved profile proceeds through its version-specific adapter and outcome check.*
Release evidence establishes the supported combination. Dispatch checks whether that evidence is still applicable to the current request.
Observe lost behavior as well as rejected requests
A server can return useful tool results while an auxiliary behavior stops working. Connection success and JSON-RPC success therefore need application-level companions.
I would record connection outcomes by reason, selected profile, permitted fallback usage, capability-gate refusals, expired-evidence refusals, and header-validation failures. For each workflow class, also record required-input completion, update-delivery freshness, durable artifact presence, and attempted versus confirmed mutations.
Separate observed values from unavailable telemetry. A missing notification counter does not prove zero notifications were expected or delivered. Where updates are required, use a controlled end-to-end freshness check rather than assuming that a declared capability establishes delivery.
Keep stable dimensions such as protocol profile, transport, adapter build, and workflow class in metrics. Put endpoint aliases, authorization-context references, and case identities in access-controlled traces or audit records. Avoid credentials, raw prompts, and unrestricted tool arguments.
Alert on behavior that matters to the workflow: input steps bypassed, provisioning results lacking an operation ID, or observation freshness outside the promised bound. Track protocol failures too, but avoid treating every incompatibility as a generic server outage.
Preserve a rollback path for each promised profile
A compatibility rollout should have an explicit old/new support window. Test retained clients before replacing servers, and test retained servers before replacing hosts. Pin gateway rules with the release rather than assuming infrastructure is transparent.
Keep records of which lifecycle and extension contracts each route supports. Maintain application-state formats that the rollback path can read, or place a deliberate migration boundary before state becomes incompatible. Durable operation IDs should continue to identify the same business work after an adapter rollback.
Deprecation also needs precise handling. The 2026-07-28 changelog marks Roots, Sampling, and Logging as deprecated while retaining functionality during the deprecation window. Deprecation is migration work to track; it does not establish that a feature disappeared immediately or that a particular vendor will remove it on an invented date.
Use a canary cohort with known workflow requirements. Roll back or disable the affected route when application contract failures increase, rather than waiting for all tool calls to fail. Prefer a clear unavailable feature to a workflow that appears complete after skipping a required step.
What the examples establish
The TypeScript gate passed local checks for authorization-context binding, release binding, expiry, capability-object handling, lifecycle consistency, unknown revisions, and missing required checks. The Python matrix validator passed six unit tests covering complete evidence, missing and duplicate cells, artifact mismatches, behavior mismatches, and effect mismatches.
These tests exercise custom policy logic. No SDK package was integrated, no external MCP server was used as a test target, and no end-to-end interoperability result is claimed.
In a production rollout, the next evidence comes from the pinned matrix running through actual SDKs and gateways. Compatibility is then a specific, inspectable claim about supported workflows and deployed artifacts.
Primary references
- MCP 2025-11-25: Lifecycle.
- MCP 2026-07-28: Versioning and Compatibility.
- MCP 2026-07-28: Base protocol.
- MCP 2026-07-28: Streamable HTTP.
- MCP 2026-07-28: Architecture.
- MCP 2026-07-28: Changelog.
- TypeScript SDK: Protocol versions.
- TypeScript SDK: Troubleshooting.
Technical references checked on October 22, 2026. Pin SDK packages and validate behavior against the protocol and extension releases used by the deployment.
KEEP READING
Related engineering notes
A Failover Route Is Not a Recovery Path: Proving Independence in AI Infrastructure
Two LLM providers can share the same failure domain. Build an evidence-backed recovery graph that checks cloud, networking, identity, control-plane and capacity dependencies before admitting fallback routes, then test correlated outages without weakening safety.
Read articleAn Eval Platform Sunset Can Erase Your Release Evidence: Build an Evidence-Escrow Migration Gate
When a hosted LLM evaluation platform retires, switching runners is not enough. Preserve the historical evidence, reconstruct grader semantics, validate scoring parity, and enforce a fail-closed release gate that survives the service shutdown.
Read articleWhen the Package Runs Before Your App: Quarantining AI Framework Releases
The 2026 agent-framework PyPI compromise exposed a blind spot in AI build pipelines: Python startup hooks execute before application imports. Design an artifact-quarantine gate, inspect wheels without installing them, separate credentials, and recover from suspected exposure.
Read article