MCP guide · 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
| Feature | Description |
|---|---|
| Checksum-validated PII | TC Kimlik, Luhn cards, IBAN mod-97 |
| Chat-body aware | messages[].content + system fields |
| Proxy: monitor/redact/block | Point baseURL at the proxy |
| Masked findings | Never logs the real value (sk-…wx) |
| SARIF 2.1.0 | CI gates |
MCP tools
| Tool | Description |
|---|---|
scan_text | Scan raw text |
scan_messages | Scan an OpenAI/Anthropic chat request body |
scan_file / scan_directory | Scan prompt logs/fixtures |
list_patterns | List supported patterns |
Install with npm
Global install (handy for Claude Desktop / Cursor):
npm install -g @guardbee/mcp-prompt-leak-scanneror via npx (recommended with -y in config):
npx -y @guardbee/mcp-prompt-leak-scannerProxy: 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:
{
"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
- “Does this chat request body contain PII or an API key?”
- “Scan the prompt-fixtures folder”
- “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.
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.