By Vero SecurityBuilt and funded by Vero Security, the AI Security Engineering platform.Read the charter

The agent's own credentials

Agents also store tokens for their model provider and for every MCP server they connect to. Claude Code uses the macOS Keychain or a permission restricted file, Codex uses auth.json or the OS credential store, and many MCP servers still write tokens to plaintext config. Treat all of these as sensitive and include them in rotation plans.

Read in this order

  1. ArticleInsecure credential storage plagues MCP (Trail of Bits)Start here: concrete examples of MCP servers leaving tokens in plaintext config files.
  2. OfficialClaude Code: AuthenticationWhere Claude Code stores its login and how its credentials are managed.
  3. OfficialCodex: AuthenticationWhere Codex keeps auth.json or uses the OS store, and what that means for you.

Save your progress

We email you a sign-in link. No password.

By signing in you agree to the terms. The privacy policy explains how we use your details.

Join the AI security engineering community

Free. Roadmap updates, chapters near you, and first word when credentials open.

We’ll email you community updates. Unsubscribe anytime. By sending this you agree to the terms. The privacy policy explains how we use your details.