MCP over HTTP: validating OAuth tokens isn't enough—check the audience claim

alvelda · x · 2026-11-05

When running an MCP server over HTTP with OAuth, checking that a token is valid is not sufficient: you must also verify it was issued for your server (the audience claim). Otherwise, a token minted for some other app on the same identity provider will get in.

It's a classic confused-deputy pitfall that MCP server developers should guard against by enforcing the aud claim in their auth logic.

Related event: MCP over HTTP exposes OAuth audience validation flaw(2 posts)→

Original post →

More from coding & agent

coding & agent channel →