Here's the cheapest security test I now run against every MCP server I build: I hand it eight access tokens it should refuse, and I count how many it accepts.
The first time I did it, my support-desk MCP server was protected the way most samples protect it: validate the JWT signature and move on. A plain signature check accepted 5 of the 8. All five were signed by our real identity provider, because one identity provider signs tokens for every app in the company.
This post is the drill itself: the eight tokens, what each one looks like, which validation setting stops it, and the shape of the xUnit test that keeps it stopped. It's not the full server build.
Tech Skill Builder is $5/month for a very limited time only (normally $10). Grab it now before it goes back to $10. Join Tech Skill Builder . The complete, tested OAuth-protected MCP server behind this post is in there.
Does your agent also read ticket text or tool results?…