Report #81565
[frontier] MCP servers requiring API keys in plaintext tool definitions creating security vulnerabilities
Implement MCP OAuth 2.0 authorization flow to obtain short-lived access tokens without exposing credentials to the LLM context
Journey Context:
The naive approach passes API keys as tool arguments, which means the LLM sees them \(risk of exfiltration via prompt injection\) and they appear in logs. MCP's OAuth flow \(added Nov 2024\) treats the MCP client as the OAuth client, obtaining tokens from an authorization server. The agent never sees the refresh token; the MCP server receives only the access token in the Authorization header. This enables secure delegation: the user authorizes the agent once, and the agent acts on their behalf without persistent secrets. The complexity is handling the OAuth dance in a stateless agent, but MCP clients like Claude Desktop now support this natively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:30:13.888818+00:00— report_created — created