Back to the notes

The OAuth redirect problem that breaks AI agent trust

Model Context Protocol clients need OAuth. But localhost redirects open a phishing door you cannot close.

01equipment.jpg
Alice Wondrak-Biel / Wikimedia Commons. Resized and converted to WebP. Public domain

The Model Context Protocol is Anthropic’s new spec for letting AI agents talk to external tools. OAuth login is the obvious answer for auth. Except OAuth has a localhost problem that makes MCP clients a phishing vector. The standard OAuth flow redirects users back to a local server after login. Desktop apps bind to http://localhost:3000 or similar. The problem: any malicious site can redirect you to that same localhost URL with a fake auth code. Your legitimate MCP client accepts it, sends it to the provider, and boom. The attacker has your credentials. This is not theoretical. It is how desktop OAuth apps get phished today. The fix for normal desktop apps is to pre-register redirect URIs with the provider. But MCP clients are generic. They need to work with any OAuth provider without per-provider registration. You cannot whitelist every possible service in advance. StreamVessel’s solution is a public redirect broker. All MCP clients redirect through https://redirect.streamvessel.com. The broker validates the state parameter, checks it matches the client’s session, then forwards to localhost. Phishing sites cannot forge the broker’s HTTPS response. Localhost is safe again. The interesting bit is that this needs to be a public service, not per-client infrastructure. If every MCP client ran its own redirect broker, you would still have the pre-registration problem. One shared broker means OAuth providers can whitelist a single HTTPS endpoint and every compliant MCP client works. This is a second-order security problem. MCP is so new that most implementations probably skip OAuth entirely and use API keys. But if agents are going to act on your behalf across dozens of services, the auth model needs solving now. Not after the first phishing campaign.


Source: Letting users trust their own MCP clients, without opening a phishing hole

Back to all notes

Behind the notes

Vikrant
Sharma.

Artificial Intelligence Engineer intern at Voxon Photonics in Adelaide. Studying a Master of Information and Communications Technology at UniSC, with a focus on data, machine learning and security.

Meet the person behind the work