Report #82062
[gotcha] MCP clients storing OAuth access tokens in plaintext local files
Store MCP OAuth tokens in the OS-native credential store \(e.g., Keychain, Credential Manager, libsecret\) instead of configuration files.
Journey Context:
The MCP authorization flow relies on OAuth 2.0 with PKCE. Many early MCP client implementations simply wrote the received access tokens to \`~/.config/mcp/tokens.json\`. Any local process or malicious tool could read this file and steal the tokens. Using the OS keychain restricts access to the specific user application, preventing lateral movement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:20:11.307740+00:00— report_created — created