2. Domain 2: Production Integration, Reliability, and Knowledge Grounding

2.3. 2.3 Production MCP and change management: remote servers, versioned tools, model migrations and rollback

CCDV-P · Domain 2 · Lesson 2.3 · 22 min read

Run an MCP server as an authorized remote service, change tools without breaking clients, migrate models before retirement, and roll out with rollback.

Two changes, one month, twelve agents

Corvane Logistics runs twelve internal agents: dispatch planning, customs paperwork, customer delivery estimates, exception handling and eight smaller ones. All of them read shipment data through one internal MCP server, about 180,000 tool calls a day, and track_shipment is 60% of those calls. Nine agents call Claude through the Claude API; three in the EU customs unit call it through Amazon Bedrock on a regional endpoint, for data residency.

December brings two changes at once. Customs needs delivery windows, so track_shipment must take a new required carrier_code input and return eta as an object instead of a string like "Thu 14:00". And every agent is pinned to Claude Opus 4.5 (claude-opus-4-5-20251101 on the Claude API), which Anthropic deprecated on November 23, 2026 and, as of this writing, will retire from the Claude API on January 22, 2027. After that date, requests to it fail.

Oskar, the engineer who owns both changes, knows how this goes wrong. A schema edited in place breaks agents whose prompts expect the old fields. A model swapped on a Friday changes behaviour in ways no unit test sees. If both land in one release and quality drops, nobody can say which one caused it, or roll back only that one.

What Oskar needs is change management for an LLM system: every component that shapes behaviour (the MCP server, the tool schemas, the model, the prompts) is a versioned artefact. Each one changes on its own, reaches traffic gradually, and can be undone in minutes.

Running the MCP server as a remote, authorized service

Today each agent container runs its own copy of the shipment server over stdio, the transport where the client launches the server as a subprocess. Twelve copies sit at four different versions, all holding one shared service key in an environment variable. A schema change would mean twelve coordinated deploys, and a leaked key opens every shipment record.

The fix is one remote MCP server that every agent reaches over the network through the Streamable HTTP transport. The server exposes a single endpoint, and every JSON-RPC message from a client is its own HTTP POST. The server answers with a JSON object, or with a stream of server-sent events that belongs to that one request. In the current protocol revision, 2026-07-28, there are no protocol-level sessions. Every request carries its protocol version, so Oskar can run several stateless replicas behind an ordinary load balancer.

That revision also mirrors body fields into headers: MCP-Protocol-Version, Mcp-Method and, on a tool call, Mcp-Name. Load balancers and gateways can route and count calls by tool without parsing the body. Clients on revision 2025-11-25 or earlier still open with an initialize handshake, and a server may serve both eras on one endpoint while they migrate.

Authorization in MCP is optional, but an HTTP server that does it should follow the spec's OAuth 2.1 profile. A stdio server takes credentials from its environment instead. In that profile the MCP server is a resource server: it accepts and checks access tokens but never issues them. Corvane's identity provider is the authorization server that issues them.

How an agent gets a token for the shipment server

CALLPOST to /mcp with no token
401WWW-Authenticate names the protected resource metadata
DISCOVERthe metadata names Corvane's authorization server
TOKENrequested with resource set to the server's canonical URI
CALL AGAINAuthorization: Bearer on every POST; audience and scope checked
The server never issues tokens; it points the client to the authorization server and accepts only tokens issued for its own URI.

Three rules carry most of the security. The server must publish Protected Resource Metadata so clients can find the authorization server. The client must send the resource parameter naming the server's canonical URI, and the server must accept only tokens whose audience is itself. And the server must not accept or pass on any other token: when it calls the carrier API behind it, it uses its own credential, never the agent's. Scopes split reading from writing, so an agent holding only shipments:read gets a 403 with error="insufficient_scope" on a write. The agents act on their own behalf, so they register as client-credentials clients.

Changing a tool without breaking its callers

Here is the question that trips people up: the server is now one service, so why not edit track_shipment in place and deploy once? Because callers depend on the schema in places your deploy does not touch. An agent's code may parse eta as a string; its prompt may say "quote the ETA as given". And a client may hold a cached tool list, since tools/list responses can carry a cache lifetime and change notifications reach only clients listening for them.

MCP has no version field on a tool. The tool's name and schemas are the contract, and the spec allows digits, dots, underscores and hyphens in names, so a version suffix is the usual way to ship a breaking change. The test is simple: can every existing caller keep working without changing anything?

Change Safe for existing callers? How to ship it
Add an optional input, such as include_events Yes In place
Add an output field, such as eta_window beside eta Yes, for clients that ignore unknown fields In place, documented in outputSchema
Add a required input, such as carrier_code No: old calls fail validation New tool, track_shipment_v2
Change a field's type or meaning, such as eta from string to object No: parsers and prompts break silently New tool, or a new field name
Rename or remove a tool or field No Deprecate, then remove once calls reach zero
Reword a description so the model picks the tool differently Unclear: a behaviour change Treat as breaking: evaluate and canary it

Memorise the rule: adding is safe; requiring, retyping or removing is not. The last row is the one teams forget, because a description is part of the prompt.

Oskar ships the change in three phases, a pattern often called expand, migrate, contract. The server keeps track_shipment as it is and adds track_shipment_v2, whose outputSchema describes the new eta object and whose results carry matching structuredContent. Agents move to v2 one at a time, each in its own release. The load balancer in front of the server counts calls per tool from the Mcp-Name header, so "zero calls to v1 for fourteen days" is a measurement, not a guess.

Expand, migrate, contract for track_shipment

Expand

Server serves v1 unchanged
Adds track_shipment_v2 with outputSchema
No agent changes yet

Migrate

One agent per release moves to v2
Its prompt and parser change with it
Calls counted per tool name

Contract

v1 at zero calls for 14 days
v1 removed, deprecation noted

rollback stays possible until this column

The old tool keeps working until telemetry proves no agent still calls it, so any single agent can roll back without breaking.

Keep two kinds of versioning apart. The MCP protocol revision is negotiated on every request: a server that does not support the requested revision returns an error listing the ones it does. Your tool contract is yours to version. A new protocol revision says nothing about whether eta is still a string.

Migrating the model before the retirement date

The second change has a deadline. Anthropic describes models as active, legacy, deprecated or retired. A deprecated model still works but has a recommended replacement and a retirement date. For publicly released models, Anthropic gives at least 60 days' notice, and once a model is retired, the Claude API returns a 404 not_found_error. The deprecations page lists each deprecated model's replacement; for Corvane's model, as of November 2026, it is claude-opus-5-5.

Two details shape the plan. First, those dates apply to Anthropic-operated platforms; Amazon Bedrock and Google-managed Google Cloud set their own schedules, so Oskar checks the Bedrock dates separately. The Console's usage export, by API key and model, finds any caller still on the old model. Second, every Claude model id is a pinned snapshot: the weights behind it never change, including dateless ids such as claude-opus-5-5. A model that behaves differently arrives under a new id, so a migration is always a deliberate change in your configuration, with a per-platform id (anthropic.claude-opus-5-5 on Bedrock).

The migration guide splits the work into two kinds of change. Breaking API changes fail loudly with a 400 error the first time a request uses them. Behaviour changes return success and shift what the agent does.

What changes from Opus 4.5 to Opus 5.5 How it shows up What catches it
Forced tool_choice (any or tool) is rejected 400 on every request that forces a tool Contract test of each request shape
Assistant prefill and temperature, top_p, top_k are rejected 400 Contract test
Manual budget_tokens thinking is rejected; adaptive thinking is always on 400 for budgets; otherwise more output tokens, since max_tokens covers thinking plus text Replay comparing tokens and max_tokens stops
A newer tokenizer Up to about 35% more tokens for the same text Token counting and a cost re-baseline
Effort defaults to medium Thinking depth differs from what prompts were tuned on An effort sweep on your evals
Safeguard refusals return stop_reason: "refusal" with a stop_details category New refusal stops Stop-reason distribution in replay

Corvane's dispatch agent forces track_shipment with tool_choice, so it fails on the first request. That is the cheap kind of failure. The expensive kind is the dispatch agent that still answers, with 40% more output tokens and a different habit of asking before acting.

So migration testing has two layers. A contract test sends every request shape each agent uses to the new model and fails on any 4xx. A replay then runs a week of recorded production requests through old and new configurations side by side. It compares stop reasons, which tools were chosen with which arguments, tokens, latency and quality scores. How those scores gate a release is evaluation design, covered later in this domain.

Prompts, configuration and one gateway

The model will not move alone: the dispatch prompt needs rewording for a model that thinks on every request. So the unit of change is a release: model id per platform, prompt version, tool schema versions and request parameters, tested together and deployed together.

That only works if prompts are versioned artefacts like code: files in version control with ids such as dispatch-system@v8, reviewed and released, never edited live in a console. Every model-call trace records the prompt version, so a quality drop can be tied to the release that caused it.

The second problem is configuration parity. Corvane's Bedrock agents were configured by hand, so their prompts lag a version behind and their effort setting is missing. The same agent behaves differently on the two platforms, and nobody chose that. Oskar puts an LLM gateway between the agents and the providers. A gateway is an internal service that holds provider credentials, attributes usage, enforces budgets and logs every request. Agents name a route such as dispatch; the gateway resolves it to a release and renders it for each platform. In the file below, look at the platforms block, the only place the two platforms may differ, and the rollout line.

# releases/dispatch.yaml: one source of truth, rendered per platform by the gateway
route: dispatch
release: R8
prompt: dispatch-system@v8            # versioned file, never edited in place
tools: [track_shipment_v2]            # the schemas this prompt was tested with
params:
  max_tokens: 16000                   # covers thinking plus text on Opus 5.5
  effort: medium                      # set explicitly, not left to the default
platforms:                            # the ONLY block allowed to differ
  claude_api: {model: claude-opus-5-5}
  bedrock_eu: {model: anthropic.claude-opus-5-5, region: eu-west-1}
fallback:
  claude_api: server-side             # the API's fallbacks parameter
  bedrock_eu: client-side             # not supported on Bedrock: done in the gateway
rollout: {control: R7, canary_weight: 5, sticky: conversation}

Parity does not mean identical bytes. Model id formats, authentication and regions legitimately differ, and some features differ too. On Bedrock, server-side fallback, Message Batches and the MCP connector are not supported, so the file records the substitute instead of pretending. A CI check renders both platforms and fails if anything outside platforms and fallback differs.

The gateway also has a duty of its own. Anthropic's compatibility guide for gateways in front of Claude Code tells them to forward anthropic-version, anthropic-beta and the request body unchanged, treating them as open lists. That guide is written for Claude Code, but its reasoning carries over to any client of an Anthropic-format upstream. A gateway that allowlists the headers it sees today strips the next capability. One that drops a beta header while passing its paired body field produces 400 errors.

Progressive rollout with automatic rollback

Why not switch the dispatch route to R8 once the replay looks good? Because replay uses last week's questions, and production sends this week's. A progressive rollout gives a change real traffic in growing steps: a canary share first, a small slice watched against the rest, which serves as the control.

Corvane's rollout path for release R8

SHADOWreplay recorded traffic, no users affected
CANARY 5%new conversations, sticky
25%one business day at least
100%R7 stays callable until retirement
CANARY 5% → SHADOW · trigger fires: weight to 0, fix, replay again
Each stage compares canary with control in the same time window, and any trigger sends the weight back to zero without a deploy.

Three details make it safe. First, assignment is sticky per conversation: thinking blocks are tied to the model that produced them, and some model switches silently drop them. Second, canary and control are compared over the same window, so a Monday spike in customs questions hits both. Third, rollback is a configuration flip in the gateway, not a redeploy, triggered by code:

rule: dispatch-R8-auto-rollback
compare: canary R8 vs control R7, same 30-minute window, at least 400 conversations each
trigger if any: 4xx rate above control by 0.5 points; max_tokens or refusal stops above 2x control; tool results with isError above 1.5x control; cost per completed task above 1.3x the agreed new baseline
action: send new conversations to R7 (canary weight 0), page the dispatch route owner, attach the 20 worst traces

Rollback needs somewhere to go back to. R7 runs on the retiring model, so it is a valid target only until January 22; Oskar starts the first canary on December 1, leaving seven weeks for fixes. Because track_shipment v1 still runs, rolling one agent back cannot break its tools either.

The sequence is the last control. Tool v2 goes out first as an additive change, under R7. Each agent's move to the new model is its own release, behind its own canary. When a trigger fires, exactly one thing changed.

The exam traps

Every trap here either changes too much at once or removes the way back.

  • ✗ Editing a tool's schema in place and sending a list-changed notification. ✓ Ship a breaking change as a new tool beside the old one and remove the old one when calls reach zero. Callers' parsers, prompts and cached tool lists do not update with your deploy.
  • ✗ Forwarding the agent's bearer token from the MCP server to the systems behind it. ✓ Accept only tokens issued for the server's own URI and call downstream with the server's own credential. Token passthrough breaks audience binding and turns one leaked token into access everywhere.
  • ✗ Treating a migration as done when the new model returns no errors. ✓ Contract-test for 400s, then replay recorded traffic to compare stop reasons, tool choices, tokens and quality. Behaviour changes return success.
  • ✗ Staying on the old model to avoid migration risk. ✓ Start testing as soon as deprecation is announced and plan around the retirement date. After it, requests fail and the rollback target disappears.
  • ✗ Configuring each cloud platform by hand. ✓ Render one versioned release for every platform through a gateway, allowing only the differences a platform requires. Hand-kept copies drift until the same agent behaves differently by platform.
  • ✗ Shipping the new model, prompt and tool schema in one release, all traffic at once. ✓ One behaviour change per release, behind a sticky canary with automatic rollback. When quality drops, you know which change to undo.

Put it together: ship the migration as a canary you can undo

You now have every piece, from the authorized remote server to the rollout that undoes itself. The fastest way to feel how they fit is a small migration harness that you break twice.

Retry and fallback design (2.1) decides what happens to the requests a canary fails. Evaluation engineering (5.1) turns the replay's quality comparison into a release gate. Incident response (4.2) picks up when an automatic rollback pages someone at three in the morning.

Key takeaways

  • ✓ Treat the MCP server, each tool schema, the model id and each prompt as separately versioned artefacts, and change one at a time.
  • ✓ Run a production MCP server remotely over Streamable HTTP as an OAuth 2.1 resource server that accepts only tokens issued for its own URI and never passes a client's token downstream.
  • ✓ Ship additive tool changes in place, and ship a new required input, a changed type or a removal as a new tool beside the old one until telemetry shows no callers.
  • ✓ Model ids are pinned snapshots and deprecated models retire on a published date, so test early with a contract test for 400s and a replay for behaviour changes that still succeed.
  • ✓ Version a release as model id per platform, prompt version, tool versions and parameters, and render it for every platform from one source through a gateway that forwards Anthropic headers unchanged.
  • ✓ Roll out each release to a sticky canary compared with a control, with code-evaluated triggers that set the weight back to zero while the previous version stays callable.

Practise this

Practice questions for CCDV-P are being written and are not in this course yet. Read this lesson on the web to answer its check questions, with every option explained: https://claude.termidy.com/learn/ccdv-p/production-integration-reliability/production-mcp-change-management/.

Sources