ghosthunt
Scans Docker configuration files for registry authentication tokens and other secrets.
Detects leaked GitHub OAuth tokens from CLI configuration and other locations.
Detects leaked Google API keys and credentials in scanned files.
Scans Kubernetes configuration files for cluster credentials and tokens.
Detects leaked npm authentication tokens from .npmrc files.
Detects leaked OpenAI API keys in environment files and shell history.
Detects leaked PyPI authentication tokens from .pypirc files.
Detects leaked SendGrid API keys and credentials in scanned files.
Detects leaked Slack tokens and credentials in files and shell history.
Detects leaked Stripe secret keys (live and test) in environment files and configuration.
Detects leaked Twilio API keys and credentials in scanned files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ghosthunt Scan my machine for leaked secrets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GhostHunt
Find every leaked secret on your machine.
GhostHunt is an MCP server that scans your development machine for API keys, tokens, and credentials hiding in places you forgot to check: .env files scattered across projects, shell history, AWS/SSH/Docker configs, and more.
Everything runs locally. No data leaves your machine.
What It Scans
Environment files — recursively finds every
.env,.env.local,.env.production, etc. under your home directoryAWS credentials —
~/.aws/credentialsand session tokensSSH keys — unprotected private keys in
~/.ssh/Docker config — registry auth tokens in
~/.docker/config.jsonnpm/PyPI tokens —
~/.npmrc,~/.pypircauth tokensGitHub CLI — OAuth tokens in
~/.config/gh/hosts.ymlShell history — API keys pasted into
bash,zsh, orfishcommandsKubernetes —
~/.kube/configcredentialsNetrc —
~/.netrcpasswords35+ secret patterns — AWS, Stripe, GitHub, OpenAI, Anthropic, Google, Slack, Twilio, SendGrid, database connection strings, private keys, and more
Related MCP server: Ghost Security MCP Server
Install
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"ghosthunt": {
"command": "npx",
"args": ["-y", "ghosthunt"]
}
}
}Restart Claude Desktop. Then ask Claude: "Scan my machine for leaked secrets"
Direct Usage
npx ghosthuntTools
scan_secrets
Full detailed scan. Returns every finding with file paths, line numbers, severity ratings, and remediation steps.
Example prompt: "Run a full GhostHunt scan and show me everything"
scan_summary
Quick health check. Returns your health score (0-100) and a count by severity. Run this first to see if you have a problem.
Example prompt: "Give me a quick GhostHunt health check"
Example Output
# GhostHunt Scan Report
**Health Score: 37/100** (Critical)
- Secrets found: **12**
- Critical: 3 | High: 5 | Medium: 2 | Low: 2
- Locations scanned: 47
- Scan time: 142ms
## Environment Files (.env)
- **[CRITICAL]** Stripe Live Secret Key
- File: `/Users/you/project-a/.env:4`
- Context: `STRIPE_SECRET_KEY`
- Value: `sk_l****_8xQ`
- **[CRITICAL]** OpenAI API Key
- File: `/Users/you/side-project/.env.local:12`
- Context: `OPENAI_API_KEY`
- Value: `sk-p****kFJ9`
## Shell History
- **[HIGH]** Bearer Token in Header
- File: `/Users/you/.zsh_history:8847`
- Context: `curl -H "Authorization: Bearer sk_live_...`
- Value: `sk_l****_m3K`
## Recommendations
1. **Rotate critical secrets immediately.** Any API key marked CRITICAL
should be revoked and regenerated from the provider's dashboard.
2. **Clear your shell history** of sensitive commands.
3. **Audit your .env files.** Ensure they are in .gitignore.Health Score
Your score starts at 100 and drops based on what GhostHunt finds:
Finding | Penalty |
Critical secret | -15 |
High severity | -8 |
Medium severity | -3 |
Low severity | -1 |
A score below 50 means you have secrets that need immediate attention.
Privacy
GhostHunt runs entirely on your local machine. It does not:
Send any data to any server
Phone home or track usage
Store scan results anywhere
Access the internet
Your secrets stay on your machine. The scan results stay in your Claude conversation.
License
MIT
Available Tools
4 toolsfix_secretsA
Fix leaked secrets found on your machine. Auto-cleans shell history (backs up first), adds .env to .gitignore where missing, and provides step-by-step rotation instructions with direct links for secrets that need manual rotation. Returns structured JSON (in a second content block) with before/after health scores for visual rendering. If you have visualization capabilities, render the JSON as a fix report dashboard with before/after health score comparison and auto-fixed item list. Run scan_secrets first to see what will be fixed.
Inputs: auto_fix, include_low_severity.
ghosthunt_statusA
Show GhostHunt version and license status. Displays whether you're on the Free or Pro tier and what Pro includes.
Inputs: no named parameters.
scan_secretsA
Scan your entire machine for leaked API keys, tokens, and credentials. Checks .env files, AWS/SSH/Docker/npm configs, shell history, and more. Returns a detailed report with risk explanations, rotation URLs, and fix guidance. Also returns structured JSON data (in a second content block) for visual rendering. If you have visualization capabilities, render the JSON as a visual dashboard with a health score gauge, color-coded finding cards, and auto-fix indicators. Everything runs locally -- no data leaves your machine.
Inputs: include_low_severity.
scan_summaryA
Quick health check -- counts how many secrets are on your machine and gives you a health score (0-100). Faster than a full scan. Run scan_secrets for details, or fix_secrets to clean up.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct purpose: scanning for secrets, fixing them, quick summary, and status. No overlap or ambiguity.
Most tools use a consistent verb_noun pattern (scan_secrets, fix_secrets, scan_summary), but ghosthunt_status deviates slightly from the 'scan' prefix, though it is still descriptive.
Four tools is well-scoped for a focused security scanning server, covering essential workflows without bloat.
Core scan, fix, and health check are covered. Missing perhaps an exclusion or configuration tool, but the essential lifecycle is present.
Maintenance
Related MCP Connectors
Audit your MCP servers for poisoned tools and leaked secrets, and check AI-generated code for flaws.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
GitHub Secret Scanner - Find Leaked API Keys | Gitleaks
MCP server: static security scanner for MCP servers, agent skills & plugins. 17 attack patterns.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnterprise-grade MCP (Model Context Protocol) server for detecting secrets and sensitive information in GitHub repositories. Scans for 35+ types of secrets including API keys, passwords, tokens, and credentials with production-ready reliability features.50-
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server for the Ghost Security API, providing secure access to security findings and repository data through standardized tools.73MIT
- AlicenseAqualityBmaintenanceAn MCP server for autonomous AI agents to scan and detect hardcoded secrets, API keys, and passwords in source code files.1MIT
- AlicenseAqualityBmaintenanceAn MCP server that scans code for exposed secrets (API keys, tokens, private keys, high-entropy strings) with placeholder-aware allowlisting and fully redacted reports, enabling agents to detect leaks before committing.93MIT