Hanson says connected agents are more useful, but broad access creates security risks while limiting access can reduce business value. MCP setups often rely on long-lived, broadly scoped API keys stored in configuration files or environment variables. OAuth can replace those static secrets with dynamic access, using an authorization server to mediate consent and issue tokens.
How to Secure Agents using OAuth
Speaker
Jared Hanson, Keycard co-founder and creator of Passport.js, explains how OAuth can secure AI agents at the AI Engineer conference.
Hanson maps the OAuth client role to an agent or chatbot and the resource server role to an MCP server. He criticizes an early MCP authorization draft for combining the resource server and authorization server in the MCP server. Later revisions separate those roles, so MCP servers mainly need to verify incoming tokens.
Hanson says agent security will also require agent-to-agent authorization and ways to identify clients without manual registration. He views dynamic client registration as a poor fit because requests are uncredentialed and can leave agents anonymous. For public clients, he points to Client ID Metadata Documents; for verifiable clients, he proposes URL-based identities backed by public keys and signed assertions.
Hanson argues that scopes can be too coarse and long-lived for agent actions such as financial transactions. He points to Rich Authorization Requests as a way to express more specific permissions. For calls that continue from an MCP server to other APIs, he recommends examining OAuth Token Exchange and the Identity Assertion Grant to carry authorization across systems.
Hanson says browser-based OAuth flows assume a user is present, while agents may keep working after the user leaves. He suggests considering real-time ways to request additional access, such as SMS or push notifications. He also points to SIP, XMPP, and WebRTC as prior work relevant to voice, video, and background interactions.
Takeaways
- Replace long-lived MCP API keys with OAuth tokens that can be issued and rotated.
- Keep authorization servers separate from MCP resource servers so each has a clear responsibility.
- Choose an agent identity approach that fits the trust required; runtime registration can leave clients anonymous.
- Use more specific authorization for sensitive transactions instead of relying only on broad scopes.
- Plan how permissions and identity will carry through backend API calls and agent workflows.
Mentioned in this talk
Search inside this talk
What was claimed 9
- builtJared Hanson built
Passport.js“I'm also the creator of Passport.js.”
YouTube Verified2 sources· Talk, Web· archived
- foundedJared Hanson founded
Keycard
Co-founder, Technology (creator of Passport.js)“I'm the co-founder of a new company called Keycard”
YouTube Verified4 sources· Talk, Web· archived
- previously atJared Hanson previously at
Okta
“and then at Okta”
YouTube Verified2 sources· Talk, Web· archived
- previously atJared Hanson previously at
Auth0
“Previously, I was at Auth0”
YouTube Verified2 sources· Talk, Web· archived
- feature
Keycard: Identity and access management platform for AI and agents
“we're building an identity and access management platform for AI and agents”
YouTube Unverified1 source· Talk
- feature
Passport.js: OAuth framework for Node.js“it's a very popular OAuth framework”
YouTube Unverified1 source· Talk
- featureMCP: The first version had no authorization
“The first version ... didn’t have any authorization at all”
YouTube Unverified1 source· Talk
- uses
“all using standards-compliant protocols: IDA, MCP, and OAuth”
YouTube Unverified1 source· Talk










