mcpField
G
Ghosthunt

Ghosthunt

Local
github.com/78degreesDeveloper Tools0Updated 22w ago

About Ghosthunt

Ghosthunt is a local MCP server for finding exposed API keys, tokens, and credentials across development files and configuration. It reports locations, severity, and remediation guidance without sending data off the machine.

Key features

  1. 01Scans environment files and configs
  2. 02Checks shell history for secrets
  3. 03Detects 35+ secret patterns
  4. 04Reports severity and remediation steps
  5. 05Provides a scan health score

Use cases

  1. 01Audit a development machine for leaked credentials
  2. 02Review secret findings by severity
  3. 03Run a quick local security health check

MCP support

Ghosthunt exposes `scan_secrets` and `scan_summary` tools to MCP clients for detailed scans and quick health checks. Scanning runs locally and makes no network calls.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ghosthunt": {
"command": "npx",
"args": [
"-y",
"ghosthunt"
],
"env": {
"YOUR_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
Run commandnpx -y ghosthunt
Environment variables to set
YOUR_API_KEYSecretYour API key for the service

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmghosthunt1.0.0

Tools

4

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
include_low_severitybooleanNoInclude low-severity findings (test keys, etc). Default: true.

Details

From the project README

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 directory
  • AWS credentials — ~/.aws/credentials and session tokens
  • SSH keys — unprotected private keys in ~/.ssh/
  • Docker config — registry auth tokens in ~/.docker/config.json
  • npm/PyPI tokens — ~/.npmrc, ~/.pypirc auth tokens
  • GitHub CLI — OAuth tokens in ~/.config/gh/hosts.yml
  • Shell history — API keys pasted into bash, zsh, or fish commands
  • Kubernetes — ~/.kube/config credentials
  • Netrc — ~/.netrc passwords
  • 35+ secret patterns — AWS, Stripe, GitHub, OpenAI, Anthropic, Google, Slack, Twilio, SendGrid, database connection strings, private keys, and more

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 ghosthunt

Tools

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:

FindingPenalty
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

Comments

Markdown supported

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.