SecurityIntermediate

Hardening MCP Servers: SDK Flaws, Gateways, Safe Setup

DeveloperHat Team
26 min read

TL;DR

Late-2026 MCP flaws hit the official SDKs, LiteLLM, and more. Upgrade the SDKs, turn on the opt-in protections, and put servers behind a gateway.

The Model Context Protocol went from a promising standard to production infrastructure in about a year — and in late 2026, the security bill came due. Around 30 CVE records matching the keyword MCP were published to NVD between November 1 and 10, 2026 alone, and the flaws were not confined to obscure third-party servers. They landed in the official TypeScript and Python SDKs, in LiteLLM's MCP support, and in a long tail of community projects that shared the same design mistakes. If your agents call tools through MCP today, some of these flaws are probably sitting in your dependency tree right now.

The good news is that the fixes exist, and most of them are small. The bad news is that upgrading alone is not enough for two of the worst ones: the official SDK patches ship new protections that stay off until you turn them on, and one LiteLLM fix is a flag that only works when it is set in the server's process environment. This article walks through what actually broke, why it broke, and the concrete hardening checklist that follows — upgrade the official SDKs, enable the new opt-in protections, put your MCP servers behind a gateway, and treat tool descriptions and server configurations as untrusted input.

Agent / Client untrusted input Gateway auth + 4 MiB cap MCP Server patched SDK 1.32+ Tools allowlisted only Blocked logged + denied Nothing reaches a server unfiltered The gateway enforces limits the SDKs forgot — before the server ever sees the request. Upgrade patches the SDK; the gateway protects the servers you have not patched yet.

What Broke in Late 2026

MCP's security problems are not one bug. They are a pattern, and the pattern is worth naming before the individual CVEs, because it explains why so many projects failed the same way at the same time. MCP servers accept rich, structured input from clients, they routinely execute tools with real side effects — running commands, reading files, calling APIs — and they were mostly written as if the client on the other end of the connection were trustworthy. In the protocol's early days that was a defensible assumption: the typical deployment was a local developer's assistant talking to a local server over stdio. By late 2026, the deployment shape had changed. Servers were exposed over Streamable HTTP, shared across tenants, fronted by proxies, and wired into agents that fetched tool descriptions from servers they had never seen before.

The November CVE cluster is the record of that assumption collapsing. The official TypeScript SDK shipped four advisories in one day, published October 20, 2026, with CVE records following on NVD on November 5. The official Python SDK shipped an unbounded request-body denial of service and an OAuth credential-redirection flaw. LiteLLM's MCP stdio support turned out to pass unvalidated configuration strings into system calls. And AWS published a bulletin on November 2, 2026 (2026-164-AWS) for a path traversal in its own Serverless MCP Server, CVE-2026-116635, CVSS 6.1, fixed in version 0.2.1. None of these is exotic. They are the ordinary consequences of treating protocol input as trusted — missing limits, missing validation, missing checks on identity and destination.

There is a second lesson in the timeline, and it matters for how you prioritize. Several of these flaws were disclosed responsibly and patched quickly, and the patched versions were available before most teams noticed. The risk window for most organizations was not the time between disclosure and patch — it was the time between patch and upgrade, extended by the fact that two of the most important fixes require configuration changes on top of the version bump. An unpatched server you know about is a ticket. A patched-but-misconfigured server looks safe in your dependency report and is not. That distinction drives the whole checklist in this article.

If you run MCP servers in production, the framing from our earlier production guide still applies — MCP servers in production covers the operational baseline this hardening sits on top of. The rest of this article assumes you have servers running and asks a narrower question: what do you change, in what order, to make them defensible?

The TypeScript SDK Flaws

The official TypeScript SDK advisories, published October 20, 2026, are the most consequential of the cluster because of how widely the SDK is used — it is the reference implementation most server authors start from, and its defaults become the ecosystem's defaults. Four CVEs, all fixed in the same release train, each a different class of mistake.

The worst by CVSS score is CVE-2026-111770, cross-client message delivery, CVSS 7.7. It affected @modelcontextprotocol/server versions 2.0.0 through 2.2.0. If an application shared one stateless HTTP transport or one McpServer instance across multiple clients — a natural thing to do when you want to save memory or simplify deployment — responses could be delivered to the wrong client. In a multi-tenant deployment, that means one client's tool results, potentially containing private data, landing in another client's session. The fix landed in version 2.3.0, and it requires an application code change: reused instances now fail rather than silently cross-delivering. That is the right fix, and it is also the one most likely to break a deployment that was quietly relying on the old behavior. After upgrading, audit every place your code shares a transport or a server instance across requests. If your server creates one McpServer at startup and hands it to every connection, you need to change that pattern, not just the version number. The advisory is documented at GHSA-jm63-cq47-j5jp.

The second flaw is the one most teams will misunderstand, so it gets its own emphasis here. CVE-2026-111768, memory exhaustion, CVSS 7.5, affected @modelcontextprotocol/sdk versions 1.3.0 through 1.31.0 and @modelcontextprotocol/server versions 2.0.0 through 2.2.0. Servers put no limit on the number of array elements or object keys validated in a single request, so one HTTP request — still within the 4 MiB default body limit — could exhaust the server's memory and crash it with a JavaScript heap out-of-memory error. The fix arrived in SDK 1.32.0 and server 2.3.0. But upgrading alone changes nothing. The patched versions add a new McpServer option, maxToolInputElements, and you must set it yourself — the guidance is a value such as 10,000 — and you must also lower maxRequestBodySize. Until you do both, the patched server has the same exposure as the unpatched one. This is the single most important sentence in this article for TypeScript shops: upgrade to 1.32.0 / 2.3.0, then set maxToolInputElements and lower maxRequestBodySize, and verify the settings took effect. A version bump in your lockfile is not a fix until the configuration lands with it. The code for this is in the checklist section below.

The remaining two TypeScript CVEs are smaller but still worth patching promptly. CVE-2026-111771, CVSS 6.8, is a missing token audience check: the SDK, versions 1.6.0 through 1.31.x, did not verify the audience of bearer tokens, fixed in 1.32.0. A token minted for one audience could be presented to a server that should have rejected it. CVE-2026-111769, CVSS 6.5, is a headers and tokens leak on redirect: SDK versions below 1.32.0 could forward authorization headers and tokens to a redirect target, fixed in 1.32.0. Neither is as dramatic as cross-client delivery, but both are the kind of flaw that turns a minor misconfiguration elsewhere into a real incident — a token that should have been useless becomes usable, or a credential that should have stayed on your host follows a redirect to somewhere it should not go.

Taken together, the TypeScript advisories are a case study in why "we upgraded" needs a definition. One fix demands a code change, one demands two configuration changes, and two are fixed by the version bump alone. If your upgrade process is "bump the version, run the tests, deploy," you will pass your tests and still be exposed to the memory-exhaustion flaw. Add a configuration verification step to that process — ideally an automated check that the new options are actually set in the running server, not just present in a config file.

The Python SDK: Unbounded Bodies and OAuth Credential Redirect

The official Python SDK had its own pair of late-2026 flaws, and they illustrate two different failure modes: a missing limit, and a missing binding between a credential and the server it belongs to.

CVE-2026-109527 is an unbounded request-body denial of service. Versions before 1.29.1, and 2.0 pre-releases through 2.0.1, buffered complete request bodies with no maximum on the Streamable HTTP session manager, the SSE endpoint, and the OAuth routes. An attacker could send oversized requests and exhaust server memory. The fix, in version 1.29.1 and later, is a default body-size cap — the same 4 MiB default that recurs across this whole class of flaw, as the next section explains. If you run the Python SDK, upgrade to 1.29.1 or later and confirm the cap is in place; unlike the TypeScript memory-exhaustion fix, this one is a default, so the version bump is the fix.

The second Python flaw is subtler and more dangerous in practice. GHSA-qx49-fqc8-xw99, published November 19, 2026, CVSS 7.5, affects the Python SDK OAuth client in mcp.client.auth. The authorization-server metadata issuer was not validated on every discovery path, and stored credentials were not bound to their authorization server. The consequence: a malicious or compromised MCP server could redirect a client's OAuth credentials to a token endpoint of its choosing. Your agent connects to a server you trust, the server's metadata points the OAuth flow somewhere else, and the credentials your client stored for the legitimate server get sent to the attacker's endpoint. Affected versions are mcp 1.9.1 through 1.29.1 and 2.0.0 through 2.1.1; the fix is in mcp 2.2.0 and 1.30.0.

And again, the version bump alone is not the whole fix. Upgrading changes nothing for ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider until you also pass issuer= explicitly — the parameter becomes required in version 3.0, but until then it is opt-in, and the old behavior persists silently. After upgrading, you should also clear stored OAuth client information once, so credentials recorded under the old unbound regime do not carry over. This is the Python equivalent of the TypeScript maxToolInputElements trap: the patch ships the mechanism, and you supply the configuration that activates it. Both SDKs made the same design choice in the same month — ship the fix as opt-in to avoid breaking existing deployments — and both times the opt-in is the part teams forget.

The broader point for Python shops is about the OAuth client specifically. MCP's OAuth support is where the protocol meets the open internet: your client discovers an authorization server from metadata supplied by the server it is talking to. Any time a security decision depends on data supplied by the party you are deciding whether to trust, you need a check that does not come from that party. Validating the issuer is that check. If your MCP client code constructs an OAuth provider anywhere, grep for it this week and confirm the issuer is pinned.

LiteLLM and the stdio Command Injection

The most argued-over flaw in the cluster is CVE-2026-136535, a command injection in LiteLLM's MCP stdio support, CVSS 7.2 (with a high privileges-required rating, CWE-78 OS command injection). The facts are not in dispute; the interpretation is. MCP stdio configurations were not validated before the supplied string was used in a system call, so an authenticated proxy admin could run code as the LiteLLM service account. The Zero Day Initiative advisory ZDI-26-1031 was published November 18, 2026, and the CVE record was published November 24, 2026. The CVE record names LiteLLM 1.88.0. You can read the ZDI advisory at ZDI-26-1031 and the Tenable record at CVE-2026-136535.

The vendor disputes that this is a vulnerability at all: stdio servers run admin-chosen commands by design, so an admin who can configure an MCP stdio server can already run commands — the flaw, in the vendor's view, is a feature being used as intended. That argument has real force in a narrow sense: if your LiteLLM proxy admin is fully trusted and the admin interface is properly gated, the practical exposure is limited. But the dispute itself is instructive, because it shows how a design assumption becomes a vulnerability when the deployment changes. When MCP stdio config was a local developer's config file, "admin-chosen commands" was a reasonable description. When the same configuration surface is exposed through a proxy admin API, reachable by anyone with proxy admin credentials — which in many deployments is a broader group than the people who can SSH into the server — the assumption no longer holds. The CVE record exists because the security boundary moved and the code did not move with it.

The disclosure timeline tells the same story in miniature. The issue was reported to the vendor on June 17, 2026. The vendor closed it as a false positive on September 15. ZDI disputed that on October 26, the vendor reopened it on October 29, and the advisory and CVE followed in November. Five months from report to CVE, with a false-positive closure in the middle. That is not a criticism of any party — good-faith disagreement about whether something is a vulnerability is normal — but it is a warning about relying on vendor triage as your only signal. If you run LiteLLM, you should not have waited for the CVE to harden this surface; the configuration was executing unvalidated strings in system calls either way.

The mitigation is specific and easy to get wrong, so read it carefully. There is no separate patch for this CVE. The fix is to upgrade to LiteLLM 1.104.0 or later, where stdio MCP servers are disabled unless LITELLM_ENABLE_MCP_STDIO=true is set in the server's process environment. Three details matter. First, the flag is read only from the process environment — not from an API call, not from a config file, not from the database. Setting it in your LiteLLM config YAML does nothing. Second, the default is now disabled, which is the correct default; enable stdio only if you actually use stdio MCP servers, and only on servers where the proxy admin surface is tightly controlled. Third, if you do enable it, treat the stdio configuration as untrusted input anyway — validate the command strings, restrict which binaries can be invoked, and run the LiteLLM service account with the least privilege you can manage, because the flag is a gate, not a sandbox. A service account that can run arbitrary commands as itself is still a service account that can run arbitrary commands as itself.

For teams that do not need stdio MCP servers at all — and that is most teams running LiteLLM as a proxy, where HTTP-based MCP servers are the norm — the right move is the simplest one: upgrade to 1.104.0 or later and leave the flag unset. Disabled by default is the whole fix.

The Unbounded-Body DoS Class

Step back from the individual CVEs and the pattern becomes the story. The unbounded request-body denial of service is not one bug in one SDK; it is a class of flaw that was found and patched in at least nine MCP projects through 2026, including the official Python, Java, Go, Ruby, PHP, and TypeScript SDKs. The first instance was CVE-2026-39313 in mcp-framework, published April 16, 2026 and fixed in version 0.2.22. Then the same flaw kept appearing, project after project, for the rest of the year. A detailed write-up of how one unbounded body became a denial-of-service class across the ecosystem is at this Dev.to article.

Why did the same mistake recur so many times? Because the vulnerable pattern is the default way to write an HTTP handler in most frameworks: read the body, parse it, act on it. Nothing in that sequence complains when the body is 400 MB instead of 4 KB, until the server runs out of memory. The fix every time is a default body-size cap, almost always 4 MiB. It is a one-line change in most implementations, and it is the kind of change that is easy to forget when you are building a protocol implementation and thinking about message formats rather than resource exhaustion. The lesson is not that MCP developers are careless — it is that resource limits are a class of requirement that needs to be in the protocol's conformance thinking from the start, not discovered per implementation.

For your own servers, the practical takeaway is twofold. First, check every HTTP endpoint your MCP servers expose — not just the main Streamable HTTP endpoint, but the SSE endpoint and the OAuth routes, which is exactly where the Python SDK flaw lived. A cap on the main endpoint and no cap on the OAuth routes is not a fix. Second, do not assume your framework's default is safe. If you are running an MCP server built on a community SDK or a framework that has not published a fix, add the cap yourself at the reverse proxy or gateway layer: a 4 MiB limit on request bodies, enforced before the request reaches the application, closes the class regardless of what the application does. This is one of the strongest arguments for the gateway pattern in the next section — a single enforcement point beats nine per-project patches.

Your Options: Upgrade, Configure, or Gateway

You have three kinds of defense available, and they are not alternatives — they are layers, and the right question is how much of each you need. The honest answer depends on your deployment shape, so this section compares them head to head before the checklist tells you what to do.

Upgrade-only is the cheapest option and the weakest. It fixes the flaws that are fixed by a version bump — the TypeScript token audience check, the redirect header leak, the Python default body cap — and it does nothing for the two flaws that need configuration. It is appropriate as a first step and as a floor: nobody should be running SDK 1.31.x after 1.32.0 exists. But if your process ends at the version bump, you are exposed to the two highest-profile flaws in the cluster. Treat upgrade-only as the beginning of the checklist, never the end of it.

Upgrade plus configuration is the minimum defensible posture for a server you operate yourself. It adds the opt-in protections: maxToolInputElements and a lowered maxRequestBodySize on the TypeScript side, issuer= pinning plus a one-time credential clear on the Python OAuth client side, and the LITELLM_ENABLE_MCP_STDIO decision on the LiteLLM side. It costs an afternoon of configuration work and a round of testing, and it closes the specific CVEs. Its limit is that it depends on every server, in every language, in every team's deployment, getting the configuration right — and the November cluster is evidence that configuration-dependent security fails unevenly across an organization.

Gateway-fronted servers are the structural fix. Put every MCP server behind a gateway — a reverse proxy with authentication, request-size limits, an allowlist of tools, and logging — and clients never talk to a server directly. The gateway enforces the body cap even if a server's SDK has no cap. It terminates authentication and checks token audiences in one place. It can strip or validate tool descriptions before they reach an agent. It gives you one audit log for every tool call, and one place to revoke access. The cost is real: another component to run, latency on every call, and a new failure mode if the gateway goes down. But for any deployment with more than a handful of servers, or any server exposed beyond a single developer's laptop, the gateway is where the November lessons converge. The unbounded-body class is closed at the gateway regardless of SDK. The OAuth redirect is checked at the gateway regardless of client library. The stdio injection is moot at the gateway because stdio servers never face the network.

The transport choice sits underneath all of this and deserves an explicit comparison, because it determines how much the gateway can help you. Stdio servers are local processes: fast, simple, and the right choice for a developer's own machine, where the "admin" is the developer and the command being run is theirs. They are the wrong choice for anything networked, because their security model assumes the configurer is fully trusted — which is exactly the assumption CVE-2026-136535 broke. Streamable HTTP servers are networked by design: they support authentication, they work across machines, and they are the transport the gateway pattern is built for. But they are also the transport where the November flaws lived — cross-client delivery, unbounded bodies, token leaks — because they are the transport where untrusted input actually arrives. The recommendation is not to avoid Streamable HTTP; it is to never expose it raw. A Streamable HTTP server behind an authenticated gateway with a body cap is the production default. A stdio server on a shared host, configured through an API, is the configuration to retire.

Defense in layers, not in one fix Each slab is a control; remove one and the stack still stands — thinner. GATEWAY — auth, body cap, allowlist PATCHED SDK — 1.32.0 / 2.3.0 / 1.30.0 OPT-IN CONFIG — limits + issuer pinning LEAST PRIVILEGE — stdio off by default Top slab fails open; the stack below it must still hold.

The Hardening Checklist

This is the concrete sequence. Work it top to bottom; each step is small, and the whole list is an afternoon for a single server and a sprint for a fleet. Verify each step as you go — the theme of this cluster is that a fix you believe is in place and a fix that is actually in place are two different things.

1. Inventory and upgrade the SDKs. Find every MCP server you run, in every language, and record the SDK version. Upgrade the TypeScript SDK to 1.32.0 or later and @modelcontextprotocol/server to 2.3.0 or later; upgrade the Python SDK to 1.30.0 or later (or 2.2.0 or later on the 2.x line); upgrade LiteLLM to 1.104.0 or later. Check your versions first — a lockfile check takes seconds and tells you whether you even have the problem:

# Check what you actually have installed before you change anything
npm ls @modelcontextprotocol/sdk @modelcontextprotocol/server
pip show mcp | grep -i version
pip show litellm | grep -i version

If a server is built on a community SDK with no published fix for the unbounded-body class, note it for step 5 — the gateway cap covers it — and file an issue upstream.

2. Turn on the opt-in protections. On the TypeScript side, set maxToolInputElements and lower maxRequestBodySize when you construct your server. The values below are starting points, not gospel — tune maxToolInputElements to the largest legitimate tool input your tools accept, and set the body size to the smallest value your largest legitimate request needs:

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";

const server = new McpServer(
  { name: "hardened-tools", version: "1.0.0" },
  {
    // New in SDK 1.32.0 / server 2.3.0 — upgrading alone does NOT set this.
    maxToolInputElements: 10_000,
    // Lower the default 4 MiB cap if your tools accept small inputs.
    maxRequestBodySize: 1_048_576, // 1 MiB
  },
);

On the Python side, pass issuer= explicitly to every OAuth provider, and clear stored OAuth client information once after upgrading. On the LiteLLM side, leave LITELLM_ENABLE_MCP_STDIO unset unless you have a specific stdio server you need — and if you do set it, set it in the process environment only, never in config or via the API.

3. Fix the shared-instance pattern. If your TypeScript server shares one McpServer instance or one stateless HTTP transport across clients, stop. Create a fresh instance per client session. The 2.3.0 fix makes reused instances fail, so this is not optional — but do not wait for the failure in production to find the places you share instances. Search your codebase for the pattern now.

4. Decide on stdio. Audit every stdio MCP server configuration in your estate. If a stdio server is configured through an API or a shared admin surface, treat the command string as untrusted input: validate it, restrict the binaries it can invoke, and run the service account with least privilege. If you do not need stdio, disable it — on LiteLLM 1.104.0 or later it is disabled by default, and you should keep it that way.

5. Put a gateway in front of every networked server. This is the step that makes the others durable. The gateway terminates TLS, authenticates every client, enforces a 4 MiB request-body cap, allowlists the tools each client may call, and logs every invocation. A minimal allowlist configuration looks like this:

# Gateway policy: one entry per MCP server, tools allowlisted per client role.
# Anything not listed here is denied — the default is closed, not open.
servers:
  - name: docs-search
    upstream: http://localhost:3101/mcp
    max_request_body_bytes: 4194304  # 4 MiB — closes the unbounded-body class
    allowed_tools:
      agent-role: [search_docs, get_page]
      admin-role: [search_docs, get_page, reindex_docs]
  - name: repo-tools
    upstream: http://localhost:3102/mcp
    max_request_body_bytes: 4194304
    allowed_tools:
      agent-role: [list_issues, get_issue]
      admin-role: [list_issues, get_issue, create_issue]

The allowlist is doing double duty here: it limits blast radius when a server is compromised, and it limits what a prompt-injected agent can do through a server it has access to. A tool that is not on the list cannot be called, no matter what the agent is told.

6. Treat tool descriptions and server configs as untrusted input. This is the cultural change, and it is the one that prevents the next cluster rather than this one. MCP tool descriptions are text supplied by the server, and agents act on them. A compromised or malicious server can put instructions in a tool description — prompt injection through the tool catalog. Do not let agents execute instructions found in tool descriptions; descriptions should be treated as data about a tool, never as commands to the agent. Similarly, server configurations — especially stdio command strings and OAuth metadata — should be validated before use, and the validation should not trust the server to describe itself honestly. If your agent framework has a setting that separates tool metadata from instruction content, turn it on; if it does not, add a review step for any server you add to the catalog. The supply-chain discipline in our SBOM and signing guide applies here too: know what you are running, verify it, and record it.

7. Log, monitor, and rehearse. Log every tool invocation at the gateway with the client identity, the tool name, and the outcome. Alert on body-size rejections, authentication failures, and tool calls outside the allowlist — those are the signals that someone is probing the exact flaws in this article. And rehearse the response: if a server you depend on publishes a CVE tomorrow, how fast can you upgrade, reconfigure, and redeploy? The November cluster rewarded teams that could move in hours and punished teams that needed a week.

Networked server? exposed beyond localhost Yes → Gateway auth + 4 MiB cap No → Local stdio trusted configurer only SDK patched? TS 1.32+ / Py 1.30+ Opt-ins set? limits + issuer= Allowlist + logs deny by default Upgrade alone is a node, not the destination — the decision ends at allowlist + logs.

Architecture Decision

Decision: All networked MCP servers run behind an authenticated gateway with a 4 MiB request-body cap, per-client tool allowlists, and centralized logging; SDKs are pinned to patched versions and the opt-in protections are set explicitly in code; stdio servers are disabled unless a specific server needs them, and stdio configuration is treated as untrusted input.

Context: The November 2026 CVE cluster showed that the official MCP SDKs shipped missing limits, missing audience checks, and cross-client delivery flaws; LiteLLM's stdio support executed unvalidated configuration strings; and the same unbounded-body flaw recurred in at least nine projects. Two of the most important fixes are opt-in, so a version bump alone leaves servers exposed. Our servers are networked, multi-tenant, and called by agents that fetch tool descriptions from servers we do not control.

Options considered: Upgrade-only, with no configuration changes; upgrade plus explicit opt-in configuration on each server; gateway-fronted servers with upgrade plus configuration behind them; and retiring MCP in favor of hand-written API integrations for each tool. The last option was rejected as disproportionate: it trades a fixable protocol risk for a large engineering cost and loses the ecosystem's tool catalog.

Why this one: The gateway closes the unbounded-body class and centralizes authentication regardless of which SDK a server uses, which matters because the next flaw will be in a project we have not audited. Upgrade plus configuration closes the specific CVEs. Together they mean a single server's misconfiguration cannot become an incident on its own. The allowlist adds a second line of defense against prompt injection through tool descriptions.

What it costs you: A gateway component to run and keep available; latency on every tool call; the operational work of maintaining allowlists as tools are added; and an afternoon per server for the upgrade and configuration pass, plus a sprint for a fleet. The shared-instance fix on the TypeScript side may require refactoring server code that reused instances across clients.

When to reverse it: If you drop to a single local server on a single developer's machine with no network exposure, the gateway is overkill — stdio with a trusted configurer is the right shape there, and the checklist shrinks to upgrading and validating config. Revisit the decision if MCP ships a conformance requirement for body caps and audience checks, which would let the gateway's enforcement move back into the SDKs, or if the gateway itself becomes a larger operational burden than the servers it protects.

When This Setup Is the Wrong Call

Not every MCP deployment needs this full stack, and saying so is part of the honest advice. If your MCP usage is a single developer's assistant talking to local servers over stdio on their own laptop, the gateway, the allowlists, and the centralized logging are pure overhead. Upgrade the SDKs, validate your stdio configs, and stop there. The threat model that justifies the gateway — untrusted clients, untrusted servers, multi-tenancy, network exposure — simply does not exist on a laptop, and adding infrastructure to a threat model that does not need it is how security programs lose credibility with the engineers they are supposed to protect.

Similarly, if your agents only ever call servers you wrote, hosted on infrastructure you control, with tool descriptions you authored, the "untrusted input" posture can be lighter — though the SDK flaws in this article hit exactly that deployment, so the upgrade and configuration steps still apply. The gateway is still worth it at modest scale, but the allowlist can be permissive while you are small, and you can tighten it as the catalog grows.

The configuration that is never the right call is the one this cluster exposed most clearly: a networked MCP server, running an unpatched SDK, with no body cap, no audience check, and no gateway, fronted by a proxy whose admin surface can configure stdio commands. That is not a minimal setup; it is an unhardened one, and November 2026 is the month the difference became a CVE record. The checklist above is the distance between the two.

The work is not glamorous — version bumps, two configuration options, a gateway, an allowlist — but it is the work the month demanded. MCP is still the right protocol for agent tooling; it just grew up in November, and the teams that grow with it are the ones that treat every new protection as a configuration to verify, not a version to bump. If you are building agents that call tools through MCP, the patterns in our guide to MCP tasks, elicitation, and skills in production are the natural next read — the hardening in this article is the foundation those patterns stand on.

Why This Matters

Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

Trade-offs to Consider

Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

When NOT to Use This

Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

Decision Framework

Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

Share this articleShare on XShare on LinkedIn

Keep the decision frameworks coming

One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.