Is my MCP server accepting tokens meant for another service?
Your Model Context Protocol (MCP) server accepts tokens meant for another service if it checks a token’s signature and expiry but never its audience, the aud claim naming who the token was issued for. The MCP specification requires that check; on October 5, 2026, advisories disclosed that the official Python and TypeScript SDKs’ server auth couldn’t do it.
It bites when one authorization server issues tokens for several services: a token for another API carries the same issuer and a valid signature, so a server that skips the audience check lets it through. The MCP specification’s 2026-07-28 revision says a server MUST only accept tokens valid for its own resources and MUST NOT accept or pass on any other token.
Affected versions include mcp 1.10.0 through 1.29.1 and 2.0.0 through 2.1.1 (GHSA-w4fh-qvv9-3v23), and @modelcontextprotocol/sdk 1.6.0 through 1.31.0 and @modelcontextprotocol/server 2.0.0 through 2.2.0 (GHSA-rvq5-wwqv-78pq). Both advisories say upgrading changes nothing alone, because the check ships switched off: in Python set validate_token_resource=True with resource_server_url as your server’s audience, in TypeScript pass that audience as expectedResource, and return the token’s audience from your verifier. On any version, rejecting a token whose aud doesn’t include your server inside your verifier closes the gap.
To find out, send your server a valid token issued for a sibling service. Anything but a 401 means it got past the audience check, and when the call succeeds, nothing in your logs marks it, the same reason monitoring misses a silent failure.
published