← Blog’a dön

← Back to blog

MCP Prompt Leak Scanner: stop PII/credentials in outbound prompts

,

MCP guide · Prompt Leak Scanner

MCP Prompt Leak Scanner: stop PII/credentials in outbound prompts
@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
npm install -g @guardbee/mcp-prompt-leak-scanner

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

bash
npx -y @guardbee/mcp-prompt-leak-scanner

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

Proxy: npx @guardbee/mcp-prompt-leak-scanner proxy --upstream=https://api.openai.com --port=8788 --mode=redact — set your app baseURL to http://localhost:8788. CI: scan ./prompt-fixtures --fail-on=high --format=sarif.

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
{
  "mcpServers": {
    "guardbee-prompt-leak-scanner": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-prompt-leak-scanner"
      ]
    }
  }
}

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?”

Related links

See surface risk with Guardbee

MCP servers speed up security work in chat. Start a 14-day free trial for brand scans and BeeAI.

Start free MCP servers

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.

Paylaş

Share

Sitenizin risk skorunu görün — 14 gün ücretsiz deneme.

See your site’s risk score — 14-day free trial.