Scans projects for secret exposure: leaked API keys, unprotected .env files, and secrets in logs.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Your AI agent is one debug session away from leaking your secrets.
MCP server that scans your project for secret exposure risks β hardcoded API keys, unprotected .env files, and console.log calls that print credentials at runtime. Before your agent accidentally reads them out loud.
You ask your AI agent to debug a config issue. It reads src/config.ts. Inside:
The agent now has your database password in its context. It might log it, include it in a summary, or pass it to another tool. And your .env isn't in .gitignore, so the next git push will do the rest.
None of this requires the agent to be malicious. It just needs to be helpful.
env-secret-exposure-analyzer-mcp catches this before it happens. π
scan_for_secretsScans source files, config files, and .env files for 20+ secret patterns. Returns file path, line number, severity, and a masked preview β never the full value.
Detects:
ghp_, gho_, ghs_)whsec_)SG.xxx), Twilio auth token + account SIDGOCSPX-)xox*)-----BEGIN ... PRIVATE KEY-----)postgres://user:pass@host)check_gitignore_coverageChecks whether sensitive files (.env, .env.local, secrets.json, private keys, certificates) are covered by .gitignore. Flags files that could be accidentally committed.
scan_for_log_leaksScans source files for console.log / logger calls that print process.env variables or objects with secret-sounding names at runtime. Catches the most common "it's just a debug line" mistakes.
A realistic .env with 20 secrets β database URLs, AWS, Stripe, Twilio, SendGrid, Google OAuth, Sentry, JWT secrets, encryption keys. Before this MCP: an AI agent reads the file, has no idea what's sensitive, and proceeds to use those values in generated code or responses.
After one scan_for_secrets call: 16 findings, all categorized by severity, all previews masked. The agent knows exactly what's dangerous before it touches anything.
"Scan this project for any secrets or API keys that might be exposed. Check if .env files are in .gitignore, and look for any console.log calls that might be leaking credentials."
The agent runs all three tools in sequence and reports a full picture: what's hardcoded, what's not protected, what's being logged.
Works great alongside:
MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/env-secret-exposure-analyzer-mcp)<a href="https://allmcps.com/mcp/env-secret-exposure-analyzer-mcp"><img src="https://allmcps.com/api/badge/env-secret-exposure-analyzer-mcp?style=directory" alt="Env Secret Exposure Analyzer MCP on AllMCPs" /></a>