Running MCP in production means treating each server like any other internet-facing API: check that every OAuth token was issued for your server, keep SDKs patched, cap request sizes, trace every tool call, and treat tool output as untrusted input. The 2026-07-28 spec made remote MCP servers stateless HTTP services, which makes them easier to scale and changes where you keep state.
The stakes went up in November 2026. On November 25 Google announced eight Workspace MCP servers as generally available and said AI agents must use them, or the Workspace CLI, “rather than existing REST APIs,” with technical enforcement from February 1, 2027 and billing from April 1, 2027. In the same weeks, the protocol’s own repos published more security advisories than in any earlier month of 2026. This is what I’d check before putting an MCP server in front of real users or data.
What changed in the MCP spec that matters for production?
The 2026-07-28 revision removed protocol-level sessions. If you built a server on the 2025 spec, your state handling and transport code need a look.
The changes that affect operations:
- Sessions and the handshake are gone: no
Mcp-Session-Idheader, noinitializeexchange. Each request carries its protocol version and client capabilities in_meta, so any instance can answer any request behind a plain load balancer. - State is explicit. A server that needs cross-call state mints a handle (a cart ID, a workflow ID) and gets it back as a normal tool argument. The security best practices say servers “MUST NOT treat possession of a state handle as authentication” and should key state by the verified user, as in
<user_id>:<handle>. - Servers must implement
server/discoverto advertise versions and capabilities. - Streams can’t be resumed.
Last-Event-IDredelivery was removed, so a broken response stream loses the in-flight request and the client re-issues it. Make tools that change data idempotent, or at least safe to retry. - Instead of calling back for elicitation or sampling, the server returns
resultType: "input_required"and the client retries with the answers. - List results and resource reads carry
ttlMsandcacheScope, andtools/listshould come back in a deterministic order so prompt caches can reuse it. - Roots, Sampling and Logging are deprecated, and so is Dynamic Client Registration in favour of Client ID Metadata Documents. The new lifecycle policy guarantees at least a twelve-month deprecation window.
How often does the MCP spec change now?
Every six months. The release cycle puts releases on the last Tuesday of March and September. The roadmap, last updated November 16, 2026, targets March 30, 2027 for the next release, replacing the earlier December 2026 target.
| Milestone | Before release | What it means for you |
|---|---|---|
| Soft freeze | 2.5 months | Scope is fixed. Read the release page to see what’s coming |
| SDK beta | 1.5 months | Tier 1 SDKs publish betas. Test your server against them |
| Hard freeze | 1 month | Only critical fixes |
| Release | 0 | Spec, migration guidance and SDK readiness summary published |
For March 30, 2027, that puts the soft freeze in mid-January and SDK betas in mid-February. Pin the protocol version you support, book SDK upgrades around those dates, and keep experimental features out of servers you can’t redeploy quickly. Next on the roadmap: HTTP over stdio, agent identity and delegation, a redesigned tools/call result and progressive discovery for large tool catalogs.
How should an MCP server handle auth?
An MCP server is an OAuth resource server. The authorization spec says servers “MUST validate that access tokens were issued specifically for them as the intended audience,” must answer invalid or expired tokens with HTTP 401, and “MUST NOT accept or transit any other tokens.” Forwarding the client’s token to a downstream API (token passthrough) is forbidden.
The official TypeScript and Python SDKs both shipped this bug. On October 5, 2026 the TypeScript SDK disclosed that its server bearer auth accepted tokens issued for another service (CVE-2026-111771, fixed in @modelcontextprotocol/sdk 1.32.0 and @modelcontextprotocol/server 2.3.0). The Python SDK disclosed the same class of bug the same day (GHSA-w4fh-qvv9-3v23, fixed in mcp 1.30.0 and 2.2.0).
If your authorization server issues JWT access tokens and you validate them yourself, jose does it in a few lines of Node:
import { createRemoteJWKSet, jwtVerify } from "jose";
// Copy these from your authorization server's metadata (issuer, jwks_uri).
// The issuer must match the token's iss claim exactly, trailing slash included.
const ISSUER = "https://auth.example.com";
const JWKS = createRemoteJWKSet(new URL("https://auth.example.com/.well-known/jwks.json"));
// This server's canonical URI: the same value clients send as the OAuth `resource` parameter.
const AUDIENCE = "https://mcp.example.com/mcp";
export async function verifyAccessToken(authorization: string | undefined) {
const [scheme, token] = (authorization ?? "").split(" ");
if (scheme?.toLowerCase() !== "bearer" || !token) {
throw new Error("missing bearer token");
}
// Throws on a bad signature, wrong iss, wrong aud or an expired token.
const { payload } = await jwtVerify(token, JWKS, {
issuer: ISSUER,
audience: AUDIENCE,
requiredClaims: ["sub", "exp"],
});
return payload; // key any server-side state by payload.sub
}
When it throws, return 401 with a WWW-Authenticate: Bearer resource_metadata="..." header pointing at your Protected Resource Metadata, as in the spec’s examples. For opaque tokens, call your authorization server’s introspection endpoint and apply the same audience check.
The rest of the auth checklist, from the spec and its security guidance:
- Start with a minimal scope and step up with a
WWW-Authenticatechallenge (HTTP 403,error="insufficient_scope") when a privileged tool is first called. The spec lists “publishing all possible scopes inscopes_supported” and wildcard scopes as common mistakes. - If you also build a client, it must check the
issparameter in authorization responses (RFC 9207) to stop mix-up attacks, and key stored credentials by issuer. - If you run clients on servers, watch for SSRF: a malicious MCP server can point OAuth discovery URLs at
169.254.169.254or your internal network. Block private ranges and route discovery through an egress proxy. - If customers want their identity provider to decide who reaches which server, the Enterprise-Managed Authorization extension uses an ID-JAG token exchange. Its support table lists Okta, Ping Identity and Descope as able to both issue and accept ID-JAGs, and Auth0, WorkOS and Scalekit as early access for accepting them.
Do I need an MCP gateway?
Only once you have more servers and consumers than you can review by hand. A gateway sits between agents and servers and gives you one place to enforce an allowlist, terminate auth, rate-limit and log every tool call.
The big platforms shipped theirs in November 2026. Google Cloud’s Agent Gateway went GA with the Workspace servers. Google calls it “a protocol-native gateway for LLM, MCP, and Agent2Agent (A2A) traffic” that checks agent identities against its Agent Registry and enforces IAM policies and default-deny outbound rules. Microsoft announced MCP Firewall at Ignite as a preview that, per the Book of News, “will control access to MCP servers, tools, resources, prompts, protocols and transports.” On the open-source side, agentgateway has about 6,500 GitHub stars.
For a small team I’d skip the gateway and do three things instead:
- Allowlist servers in the client. Claude Code supports
allowedMcpServersanddeniedMcpServersin managed settings, matched by URL or by exact command. Avoid name-only entries, because users pick server names themselves. - Run remote servers behind your existing API edge with normal rate limits and body-size caps.
- Send traces to the observability stack you already have.
Add a gateway when a second team starts shipping servers or when an auditor asks for one log of every agent action.
What security advisories should I patch?
At minimum, the SDKs and the MCP Inspector. I counted the published repository security advisories across all 49 public repos in the modelcontextprotocol GitHub organization on November 29, 2026. 115 were published in 2026, spread over 13 repositories. 46 were rated high (44) or critical (2), 45 medium and 24 low. 74 of the 115 came in October (31) and November (43). The reference servers repo had the most (32), followed by the Inspector (18) and the registry (14).
You can re-run the count, or watch for new ones, with the GitHub CLI:
gh api --paginate "orgs/modelcontextprotocol/repos?per_page=100" --jq '.[].name' |
while read -r repo; do
gh api --paginate "repos/modelcontextprotocol/$repo/security-advisories?state=published&per_page=100" \
--jq ".[] | select(.published_at >= \"2026-01-01\") | [\"$repo\", .severity, .ghsa_id, .summary] | @tsv"
done
The bugs cluster into a few classes. If you wrote your own server or client, check for these too:
| Class | Example advisories | Fixed in |
|---|---|---|
| One client’s data delivered to another when transport or server instances are shared | CVE-2026-25536 (February), CVE-2026-111770 (October) | TS SDK 1.26.0; @modelcontextprotocol/server 2.3.0 |
| OAuth client sends credentials to an authorization server the MCP server picked | CVE-2026-104850 (TS), CVE-2026-115563 (Python) | TS SDK 1.31.0 / client 2.2.0; Python mcp 1.30.0 / 2.2.0 |
| Tokens for another audience accepted | CVE-2026-111771 (TS), CVE-2026-116684 (Python) | TS SDK 1.32.0 / server 2.3.0; Python mcp 1.30.0 / 2.2.0 |
| No limit on request body size or batch length | GHSA-f897-62hf-6gxq (TS), CVE-2026-109527 (Python) | TS SDK 1.30.1 / server 2.1.0; Python mcp 1.29.1 / 2.1.0 |
| Local dev tool turned into remote code execution | GHSA-4fc4-wcmh-4g86, GHSA-6x67-4w4w-9f3w (both critical, CVSS 9.6) | Inspector 1.0.3 |
The Inspector runs on developer laptops, and people point it at servers they’re still evaluating. The two critical advisories from October 21 let a malicious server or MCP App run local commands through it, and fixes kept coming through November 27. Upgrade to 2.17.0 or 1.0.7 and don’t connect it to servers you don’t trust.
Cross-client data leaks from shared instances hit the TypeScript SDK twice this year, so create a server and transport per request, or per connection, unless the SDK docs say sharing is safe.
What breaks in production that isn’t a security bug?
Startup time, timeouts, oversized results and servers that don’t answer. A census of 1,000 remote endpoints from the official registry on November 5, 2026 found 55% completed an unauthenticated handshake and 33.8% asked for credentials. Median initialize latency was 263.5 ms, with a 90th percentile of 922 ms. Of 112 failures in the first round, 42 were protocol errors, 22 of them a plain HTTP 404.
Clients have limits you need to design for. Claude Code’s MCP docs set a default maximum of 25,000 tokens per tool result (MAX_MCP_OUTPUT_TOKENS), stop reading any single HTTP response over 16 MiB, and let you raise the startup timeout with MCP_TIMEOUT. Paginate large results and return summaries with IDs the agent can follow up on.
Local stdio servers fail in their own ways, and I hit one on my own machine. Claude Code ran natively on Windows and launched its MCP servers inside WSL through wsl.exe. A cleanup timer in WSL killed any MCP process without a live claude ancestor, and inside WSL those servers’ parent chain never includes claude, so every Windows session lost its servers about two minutes in. The fix was to treat a process whose parent is its own WSL relay as live, while real orphans still get reaped. Separately, one server took 9 to 26 seconds to start against a 30-second connect timeout, which left no margin under memory pressure. If your server does work at startup, time it on a loaded machine.
Can I trust what an MCP tool returns?
No. Tool output goes straight into the model’s context, so treat it like input from a stranger. In late November 2026 a Hacker News thread discussed a report that Notion’s official MCP server injects hidden upsell instructions into agent context, including tracking links and directions on how the agent should present them. If the report is accurate, a vendor’s server was steering the agent.
What to do about it:
- Keep write-capable and read-only servers separate, and require human confirmation for destructive tools. Google’s Workspace servers “enforce explicit user confirmation before agents send email, change Drive sharing permissions, or make bulk edits.” Build the same gate into your own servers.
- Don’t give one agent both untrusted input (web pages, inbound email) and powerful tools in the same context.
- Verify outcomes in the system of record, not in the agent’s summary of what it did.
For keeping credentials out of the agent’s reach in the first place, see coding agents without your keys.
How do you observe MCP in production?
Trace every call with OpenTelemetry and log to your normal pipeline. The OpenTelemetry MCP semantic conventions are in Development status but already usable:
- Span name
{mcp.method.name} {target}, for exampletools/call create_invoice. - Attributes:
mcp.method.name(required),gen_ai.tool.namefor tool calls,mcp.protocol.version. - Metrics:
mcp.server.operation.durationandmcp.client.operation.duration. gen_ai.tool.call.argumentsandgen_ai.tool.call.resultare opt-in. Leave them off by default, because arguments often contain personal data.
The 2026-07-28 spec documents carrying traceparent and tracestate in _meta, so one trace can follow a request from the agent host through your server into your database. With Logging deprecated, stdio servers should log to stderr and HTTP servers to your normal logger.
Checklist: what I’d do this week
- Inventory every MCP server your team runs or connects to, with its SDK and version. Upgrade to at least TS SDK 1.32.0 (or server 2.3.0) and Python
mcp1.30.0 (or 2.2.0). - Upgrade or remove the MCP Inspector on every laptop.
- Confirm each server validates token issuer and audience. Grep your code for any place a client token is forwarded downstream.
- Cap request body size and result size, and paginate large tool results.
- Move any session-based state to explicit handles bound to the verified user.
- Add OpenTelemetry spans for
tools/callwithgen_ai.tool.name, and alert on error rate and p95 duration. - Put March 30, 2027 on the calendar and test against the SDK betas in February.
- Write down which tools can change data and require confirmation for those.
Not every agent integration needs a server at all. If yours only carries instructions, read skills vs MCP vs plugins first, and use before you install an AI skill to vet third-party servers.
If you’re putting MCP servers in front of customers and want a second pair of eyes on the auth and architecture, that’s the kind of review I do as a fractional CTO.