Guardbee.ai
@guardbee/mcp-prompt-leak-scanner

Prompt Leak Scanner

PII and secret leak scanner for LLM prompts: catches API keys, TC Kimlik No, cards and IBANs in outbound prompts before they leave your app; MCP server and reverse proxy

v1.1.1MIT · Open sourceNode.js · stdio
Install
$ npx -y @guardbee/mcp-prompt-leak-scanner
Claude Desktop / Cursor config
{
  "mcpServers": {
    "prompt-leak-scanner": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-prompt-leak-scanner"
      ]
    }
  }
}
@guardbee/mcp-prompt-leak-scanner

@guardbee/mcp-prompt-leak-scanner protects the runtime prompt leaving your app, not secrets sitting in the repo. Support tickets, debug chats, or raw user input pasted into an LLM can leak API keys, national IDs, cards, or IBANs.

What does it do?

13 patterns across 4 categories: credentials, financial-pii (Luhn/IBAN checksums), national-id (TC Kimlik checksum), contact-pii. Chat-body aware for OpenAI/Anthropic messages. A live reverse proxy in monitor/redact/block modes inspects only the outbound request; SSE responses pass through untouched.

Who is it for?

  • Product teams that forward user content into LLMs
  • Organizations needing KVKK/GDPR-minded prompt DLP
  • DevSecOps scanning prompt fixtures in CI

What it is not

  • Source-code secret scanning (use Secret Scanner)
  • General-purpose NER for free-text names/addresses
  • Parsing streaming response bodies

Features

FeatureDescription
Checksum-validated PIITC Kimlik, Luhn cards, IBAN mod-97
Chat-body awaremessages[].content + system fields
Proxy: monitor/redact/blockPoint baseURL at the proxy
Masked findingsNever logs the real value (sk-…wx)
SARIF 2.1.0CI gates

MCP tools

ToolDescription
scan_textScan raw text
scan_messagesScan an OpenAI/Anthropic chat request body
scan_file / scan_directoryScan prompt logs/fixtures
list_patternsList supported patterns

Install with npm

Global install (handy for Claude Desktop / Cursor):

bash
<code class="language-bash">npm install -g @guardbee/mcp-prompt-leak-scanner</code>

or via npx (recommended with -y in config):

bash
<code class="language-bash">npx -y @guardbee/mcp-prompt-leak-scanner</code>

npm: @guardbee/mcp-prompt-leak-scanner

Proxy
<code class="language-bash">npx @guardbee/mcp-prompt-leak-scanner proxy --upstream=https://api.openai.com --port=8788 --mode=redact</code>

— set your app baseURL to http://localhost:8788

CI
<code class="language-bash">scan ./prompt-fixtures --fail-on=high --format=sarif</code>

Claude Desktop configuration

Config file paths:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Merge this block, then restart Claude Desktop:

claude_desktop_config.json
<code class="language-json">{
  "mcpServers": {
    "guardbee-prompt-leak-scanner": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-prompt-leak-scanner"
      ]
    }
  }
}</code>

Cursor and other MCP clients

In Cursor, add the same command / args / env under Settings → MCP. stdio MCP servers use the same contract as Claude Desktop.

Example prompts in Claude

  1. “Does this chat request body contain PII or an API key?”
  2. “Scan the prompt-fixtures folder”
  3. “Which credential patterns do you support?”

Frequently asked questions

Vs Secret Scanner?+

Secret Scanner scans code/repos; Prompt Leak Scanner scans or proxies runtime outbound prompts.

Does it show the real value?+

No — maskedMatch shows only first/last characters.

Does streaming break?+

No — only the request body is inspected; SSE responses pass through.

More in this category

See your security posture in minutes

Add your domain, run a read-only scan and get a prioritised list of fixes. No installation required.

Prompt Leak Scanner MCP server (@guardbee/mcp-prompt-leak-scanner) · GuardBee