SECURITY Signal 519 2 feeds carried it
Claude Code Stores OAuth Tokens in Plaintext
Claude Code stores MCP OAuth access tokens in a plaintext JSON file on Linux, contradicting its documentation's claim that credentials are "stored securely."
On macOS, Claude Code uses the encrypted Keychain, but Linux users get only mode 0600 file permissions protecting bearer tokens that can be replayed if stolen. Any process running as the same user, or any privilege escalation, can read OAuth credentials for every connected MCP server, making the "stored securely" claim misleading for Linux deployments.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
Claude Code 2.1.257 stores MCP OAuth access tokens in plaintext at ~/.claude/.credentials.json on Linux, protected only by mode 0600 file permissions.
macOS uses the encrypted Keychain for the same tokens, falling back to plaintext only when Keychain is unavailable, creating a platform-specific security gap.
The article proposes integrating SecretSpec's provider-independent credential-store interface, which supports 33 backends including system keyrings and cloud secret managers.
THE CLUSTER
↗