{
  "markdown": "# secrets-audit-mcp\n\n[![smithery badge](https://smithery.ai/badge/eltociear/secrets-audit-mcp)](https://smithery.ai/server/eltociear/secrets-audit-mcp) [![MCP Registry](https://img.shields.io/badge/MCP_Registry-active-2da44e)](https://registry.modelcontextprotocol.io)\n\n> MCP server that detects leaked credentials in source code. Zero dependencies. Single file.\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n[![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue)](https://www.python.org/)\n[![MCP](https://img.shields.io/badge/MCP-2024--11--05-orange)](https://modelcontextprotocol.io/)\n[![Sister: skill-audit-mcp](https://img.shields.io/badge/sister-skill--audit--mcp-purple)](https://github.com/eltociear/skill-audit-mcp)\n\nDetects API keys, OAuth tokens, private keys, webhooks, and crypto wallet\nsecrets across 30+ providers (AWS, GCP, GitHub, Stripe, OpenAI, Anthropic,\nSlack, Discord, Telegram, Twilio, SendGrid, Heroku, DigitalOcean, npm,\nHuggingFace, Replicate, Cloudflare, and more).\n\nCompanion to [skill-audit-mcp](https://github.com/eltociear/skill-audit-mcp)\n(behavioral patterns) — together they cover secrets + behaviors in one\nMCP toolchain.\n\n---\n\n## Why\n\nMost secret scanners are giant Go binaries (trufflehog, gitleaks). This is\na 500-line Python file that runs as an MCP stdio server, so any LLM agent\n(Claude Desktop, Cursor, Windsurf, Cline) can ask it `scan_directory` and\nget a structured report in their tool-call response.\n\nUse cases:\n- Pre-commit hook in CI\n- Agent-driven code review (\"did this PR leak credentials?\")\n- Audit a freshly-cloned repo before opening it in your shell\n- Inline scan during agent file edits\n\n---\n\n## Install\n\n```bash\n# Python (recommended)\ngit clone https://github.com/eltociear/secrets-audit-mcp.git\npython3 secrets-audit-mcp/server.py  # stdio MCP server\n\n# Or via npm wrapper (TBD)\nnpm install -g @eltociear/secrets-audit-mcp\n```\n\n### MCP client config\n\n```json\n{\n  \"mcpServers\": {\n    \"secrets-audit\": {\n      \"type\": \"stdio\",\n      \"command\": \"python3\",\n      \"args\": [\"/path/to/secrets-audit-mcp/server.py\"]\n    }\n  }\n}\n```\n\n---\n\n## Tools\n\n| Tool | Use case |\n|---|---|\n| `scan` | Scan inline text/content |\n| `scan_file` | Scan a single file |\n| `scan_directory` | Scan a directory recursively (skips `.git`, `node_modules`, `__pycache__`, etc.) |\n\nAll return a risk score (0-100), severity bucket (`CRITICAL`/`HIGH`/`MEDIUM`/`LOW`/`SAFE`),\nand per-finding details with line numbers and redacted matches.\n\n---\n\n## Coverage\n\n**Providers** (32 rules total):\n\n- **Cloud**: AWS access/secret, GCP API key + service-account JSON, Heroku, DigitalOcean, Cloudflare\n- **Source/CI**: GitHub PAT/OAuth/App/Refresh/Fine-grained, npm tokens, Docker Hub PAT\n- **Payments**: Stripe secret + restricted\n- **Comms**: Slack bot/user/webhook, Discord bot/webhook, Telegram bot, Twilio, SendGrid, Mailgun\n- **AI/ML**: OpenAI, Anthropic, HuggingFace, Replicate\n- **Web3**: Ethereum private key (context-aware), Alchemy, Infura\n- **Keys**: RSA / EC / OpenSSH / PGP / generic PEM private keys\n- **Generic**: JWT, `apikey=\"...\"` heuristic, generic secret assignments\n\nEach match is redacted (`AKIA***MPLE`) before being returned, so the report\nitself doesn't leak the secret to the next LLM hop.\n\n---\n\n## CI usage\n\n```yaml\n- name: Secrets audit\n  run: |\n    python3 server.py <<EOF | jq -r '.result.content[0].text'\n    {\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\n     \"params\":{\"name\":\"scan_directory\",\"arguments\":{\"path\":\".\"}}}\n    EOF\n```\n\nA first-class GitHub Action will ship as `eltociear/secrets-audit-action@v1`.\n\n---\n\n## Sister project — skill-audit-mcp\n\n[skill-audit-mcp](https://github.com/eltociear/skill-audit-mcp) covers\n**behavioral malware patterns** (download-and-execute, prompt injection,\ncredential exfiltration). Run both for full coverage:\n\n| Layer | Tool | Detects |\n|---|---|---|\n| Static behaviors | skill-audit-mcp | curl-pipe-sh, exfiltration, prompt injection (68 patterns) |\n| Static secrets | secrets-audit-mcp | leaked keys/tokens/PEMs (32 rules) |\n\n---\n\n## Subscribe — security pulse\n\n[**Polar.sh — Security Pulse Monthly**](https://polar.sh/eltociear/products/security-pulse-monthly)\nships a monthly briefing on new MCP server vulnerabilities, secrets-audit-mcp\nrule updates, and mitigation playbooks. $5/mo.\n\n[**Polar.sh — Pro Audit Stack**](https://polar.sh/eltociear/products/pro-audit-stack)\nadds 50 paid scan credits + Discord + custom rule submission. $20/mo.\n\n---\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\n## Free MCP vs paid x402\n\nThis MCP server is **free**. For server-side / batch / no-install use, the same scanner is a pay-per-call **x402** HTTP API: `POST https://eltociear-secrets-audit.hf.space/audit` ($0.01 USDC on Base) and `/audit/url` ($0.03). In the official MCP Registry as `io.github.eltociear/secrets-audit-mcp`.\n\n## Professional audit services\n\nMaintained by the same author — paid services on Polar (Stripe checkout):\n\n- **[MCP Security Audit Report — $5](https://buy.polar.sh/polar_cl_sut9rtngBRutEhBAGk1FmwRYSLrAebowkPw8g2C5Op7)** — one-off audit of your MCP server: 68 attack patterns, severity-rated PDF report with concrete fixes.\n- **[Security Pulse — $5/mo](https://buy.polar.sh/polar_cl_jKHyL3Ge9u5YGAsjgixp16UYrhU0WGldxvRmN03expZ)** ([annual $50](https://buy.polar.sh/polar_cl_rEcqwjLJ83vlfa3C8vhAtDLOa6fPVxWeHZyd31BdIPT)) — monthly briefing on newly disclosed MCP server vulnerabilities, scan stats across 100+ tracked repos, mitigation playbooks.\n- **[Pro Audit Stack — $20/mo](https://buy.polar.sh/polar_cl_C37THjfoFMdOnu6xc1TnMIezYNuBbbivXbvFb3DCpZa)** — for teams running MCP servers in CI/CD: 50 hosted scans/month, Discord access, 24h SLA on vulnerability questions.\n\nFull catalog: [polar.sh/eltociear](https://polar.sh/eltociear)\n\n### Also live: clean-read ($0.005 / call)\n\nSame operator, same x402 rails: **[clean-read](https://eltociear-skill-audit.hf.space/read)** turns any URL into clean Markdown for AI agents — fetches the page, strips nav/ads/boilerplate (trafilatura), returns the main content with title and word count. `POST https://eltociear-skill-audit.hf.space/read` — $0.005 USDC on Base, no signup.\n",
  "bytes": 6169,
  "sha": "044c6c025cadfdce6a0c7c3a8107b74d5e872dfa6f17f5e0c7417cbc29845044",
  "repo_slug": "eltociear/secrets-audit-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_eltociear_secrets_audit_mcp_a62e0f27/readme"
}