TL;DR: MCP security depends on OAuth 2.1, PKCE, metadata discovery, dynamic registration, and strict JWT validation so AI clients can be identified, scoped, and revoked before they trigger real-world actions, according to WorkOS. The key shift is that authentication and authorization become runtime control points, not setup tasks.
NHIMG editorial — based on content published by WorkOS: The developer’s guide to MCP auth
Questions worth separating out
Q: How should security teams authenticate MCP clients in production?
A: Use OAuth 2.1 for production MCP access, with short-lived scoped tokens and server-side revocation.
Q: Why do static API keys create so much risk in MCP environments?
A: Static API keys create risk because they behave like permanent bearer credentials.
Q: What breaks when JWT validation is too loose on an MCP server?
A: Loose JWT validation lets the server accept tokens it should reject, which can turn a limited client into an over-privileged one.
Practitioner guidance
- Replace static keys with scoped OAuth flows Use OAuth 2.1 for production MCP access and reserve API keys for temporary local setups only.
- Enforce PKCE for every public client Reject any MCP client registration or token exchange that does not use PKCE when the client cannot protect a secret.
- Validate JWT claims before tool execution Check signature, issuer, audience, expiry, and scope on the server side before any request reaches a tool or downstream API.
What's in the full article
WorkOS's full article covers the operational detail this post intentionally leaves for the source:
- Step-by-step OAuth 2.1 and PKCE flow diagrams for MCP clients and servers
- Concrete examples of protected resource metadata and authorization server metadata payloads
- Dynamic client registration request and response patterns for MCP ecosystems
- WorkOS RBAC mapping examples that translate OAuth scopes into internal permissions
👉 Read WorkOS's guide to securing MCP authentication with OAuth 2.1 →
MCP auth and PKCE: what IAM teams need to validate?
Explore further