Stop Claude Code leaking your API keys
Muzzle checks each command, file write, web request and MCP call before it runs. A key going to its own service passes. The same key going anywhere else is blocked, and the agent is told why.
What it looks for
The email, phone number and name you enter at setup, and these keys and tokens, including base64 and URL-encoded copies:
- Stripe
- AWS
- GitHub
- Slack
- Anthropic
- OpenAI
- OpenRouter
- Doppler
- Supabase
- private keys
- JWTs
- passwords in URLs
Keys reach their own service
A Stripe key may go to Stripe and a GitHub token to GitHub. Your own platforms, such as GitHub, Vercel and npm, are trusted, so pushes and deploys keep working.
sk_live_… → api.stripe.comsk_live_… → webhook.siteghp_… → api.github.comghp_… → pastebin.comWhere it checks
You decide how strict
Emails, phone numbers and keys block; a full name only warns. You can change each of them in Settings. For the first week Muzzle only watches, then shows you what it would have blocked so you can turn blocking on.
Questions
What does the agent see when Muzzle blocks?
The reason: what was found, where it was going and how to fix it, as in the examples above. You see the same entry in Muzzle's Activity.
Where do the checks run?
On your Mac. The values you protect and the keys Muzzle finds stay there.
Which agents does it work with?
Claude Code on Free. Codex and the scripts your agents run need Pro.
Related
Put Muzzle between your agents and the internet
Free · Apple Silicon · macOS 12 or later