secretscan-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Find accidentally committed secrets (API keys, tokens, private keys, passwords in URLs, .env files) in a project directory and in its git history, and say what to do about them. Every result is redacted: you will never see a secret value, only its type, file, line, commit, a fingerprint id and 'first 4 chars + length'. Do not ask the user to paste the secret. Typical flow: scan_tree(path) -> scan_history(path) -> explain_finding(id) -> suggest_remediation(path). The ids are valid until the server restarts. Rotating the credential is the fix; history rewriting does not un-leak it.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| scan_treeA | Scan the files of a project directory for secrets. Read-only; values are redacted. Detects AWS, GitHub, GitLab, Slack, Stripe, Google, OpenAI, Anthropic, npm, PyPI and SendGrid keys, JWTs,
PEM private key blocks, passwords inside URLs, and generic high-entropy values assigned to names like
password/secret/token/api_key. In a git repository it scans exactly what Each finding shows: severity, id (f-), rule, file:line, and the value as 'first 4 chars + length' (short secrets show no characters). Findings listed in /.secretscan-ignore are suppressed. Args: path: project directory (absolute or relative to the server's working directory). max_findings: cap on findings listed, highest severity first. |
| scan_historyA | Scan git history for secrets, including ones already deleted from the current files. Streams Args: path: a directory inside a git repository. max_commits: how many commits to walk back from HEAD (newest first). The report says if older ones were not scanned. all_branches: also walk every branch, tag and stash ref (git log --all) instead of only HEAD. max_findings: cap on findings listed. |
| check_gitignoreA | Check whether secret-bearing files (.env, *.pem, *.key, id_rsa, credentials.json, *.tfvars, ...) are ignored and untracked in a git repository. Reports: secret-looking files that ARE tracked (an ignore rule no longer helps; includes the
Args: path: a directory inside a git repository. |
| explain_findingA | Explain a finding: what the credential is, how to rotate or revoke it at the provider (step by step), how to check whether it was abused, and why rewriting git history does not un-leak it. Args: id: a finding id such as f-0123456789abcdef from scan_tree/scan_history (valid until the server restarts), or a rule id such as aws-access-key-id or github-token to get the guidance without a finding. |
| suggest_remediationA | Scan a project (working tree and git history, if it is a repository) and return an ORDERED remediation checklist: rotate first, look for misuse, remove from the tree, optionally rewrite history, prevent recurrence. History rewriting is given as git filter-repo and BFG command text for you to run; this server never executes them and never prints the secret values they need (you fill in a replacements file yourself). Args: path: project directory. max_commits: history depth to scan if the directory is a git repository. |
| make_baselineA | Return the lines to put in /.secretscan-ignore so the CURRENT findings are accepted (a baseline) and only new ones are reported later. Only fingerprints are listed, never values. This server does not write the file: copy the text into it yourself, after checking each finding really is a false positive or already rotated. Accepting a live secret hides it; rotate real ones instead. Args: path: project directory. include_history: also include secrets found in git history. max_commits: history depth if include_history is true. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a distinct output shape: tree scan, history scan, filename-only gitignore audit, finding explanation, ordered remediation checklist, and baseline generation. The main overlap is that suggest_remediation internally re-scans working tree plus history, which could be confused with simply running scan_tree/scan_history, and explain_finding vs suggest_remediation both give rotation guidance. Descriptions largely resolve this, but the boundary is not razor-sharp.
All six tools follow a consistent verb_noun snake_case pattern: scan_tree, scan_history, check_gitignore, explain_finding, suggest_remediation, make_baseline. No mixed conventions or vague names.
Six tools is well-scoped for a secret-scanning server; each maps to a distinct stage of detect/audit/explain/remediate/baseline. Nothing feels padded or missing at the count level.
The lifecycle is well covered: detect (tree/history), prevent (gitignore audit), explain, remediate, and accept baseline. Minor gaps: no way to enumerate the rule catalog directly (you must guess rule ids for explain_finding), no single-file or stdin scan target, and no option to have the server write the ignore file, so agents must hand-copy output.