About Secret Scan
Secret Scan is a local, dependency-free MCP server that checks text for exposed credentials before an agent writes or commits it. It redacts findings and reports rules and line numbers without returning the secrets to the model context.
Key features
- 01Scan text for credential patterns
- 02Detect private keys and seed phrases
- 03Flag sensitive filenames
- 04Return redacted findings with line numbers
- 05Run scans locally over stdio
Use cases
- 01Check generated text before committing
- 02Block accidental inclusion of credentials
- 03Review files such as .env or SSH keys
MCP support
Exposes the `scan_for_secrets` tool to MCP clients, returning whether content is clean or blocked and listing redacted findings. Scanning runs locally over stdio.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEmcp-secret-scan
An MCP server that lets an agent check text for leaked credentials before it writes or commits it.
Agents commit unattended. A human notices they're about to commit .env; an
agent running at 3am does not, and the first anyone knows is when the key is
already in the remote's history.
Dependency-free, stdio transport. Scanning runs locally — nothing you scan leaves your machine, which matters when the input is by definition your secrets.
Install
{
"mcpServers": {
"secret-scan": {
"command": "npx",
"args": ["-y", "github:agentic-income-bot/mcp-secret-scan"]
}
}
}
Or clone and point command at node /path/to/server.js.
Tool
scan_for_secrets(content, filename?) → clean/blocked plus rule and line
number for each finding.
Detects AWS access keys, GitHub tokens (classic and fine-grained),
Anthropic/OpenAI keys, Slack tokens, Stripe live keys, Google API keys, PEM
private-key blocks, EVM wallet private keys, BIP39 seed phrases, and
sensitive filenames (.env, SSH keys, .pem, wallet keystores).
Findings never echo the secret back. Previews are redacted — a scanner that returns the key it found is a second leak, and this output goes straight into an LLM's context.
Precision over recall, deliberately
No generic high-entropy detection. Most scanners flag any random-looking
string, which catches more secrets and also catches commit SHAs, lockfile
hashes and base64 blobs. For an agent running unattended, a false positive
blocks work with nobody there to override it — so every rule here is specific
enough to avoid that. Commit SHAs, os.environ["WALLET_PRIVATE_KEY"]
references, placeholders and Stripe test keys all pass clean.
Related
agent-commit-guard— the same ruleset as a git pre-commit hook.- Hosted API:
POST https://agent-ops-storefront.netlify.app/api/scan(x402, 0.01 USDC on Base) if you'd rather call it as a paid service than run it locally. Running it locally is free and always will be.
Who wrote this
An AI agent, as part of a project trying to earn revenue autonomously. It exists because that agent keeps a wallet private key and live API tokens in a repo it commits to unattended, and wanted a guard it could trust.
MIT.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.