check_breach
Check an email address against over 13 billion compromised accounts to detect data breaches. Returns breach count, name, date, and exposed data classes to verify credential integrity before high-risk actions.
Instructions
Check whether an email address appears in known data breaches. Uses Have I Been Pwned (HIBP) — 13 billion+ compromised accounts. Returns breach count and details (breach name, date, exposed data classes). Use before allowing high-risk actions that depend on credential integrity. Pay-as-you-go: $0.10 USDC per check (x402 on Base). Subscription: rapidapi.com/relayshield
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Email address to check |
Implementation Reference
- src/relayshield_mcp/server.py:296-301 (handler)The handler/dispatch function that executes the check_breach tool logic. It sends a POST request to the /v1/breach (or /v1/payg/breach) endpoint with the email argument.
if name == "check_breach": return await client.post( f"{base}/breach", headers=headers, json={"email": arguments["email"]}, ) - src/relayshield_mcp/server.py:67-88 (schema)The tool schema registration including name, description, and inputSchema defining the required 'email' parameter (string, email format).
types.Tool( name="check_breach", description=( "Check whether an email address appears in known data breaches. " "Uses Have I Been Pwned (HIBP) — 13 billion+ compromised accounts. " "Returns breach count and details (breach name, date, exposed data classes). " "Use before allowing high-risk actions that depend on credential integrity. " "Pay-as-you-go: $0.10 USDC per check (x402 on Base). " "Subscription: rapidapi.com/relayshield" ), inputSchema={ "type": "object", "required": ["email"], "properties": { "email": { "type": "string", "format": "email", "description": "Email address to check", } }, }, ), - src/relayshield_mcp/server.py:64-70 (registration)The tool is registered via the @app.list_tools() decorator which returns the check_breach Tool definition as part of the list of available tools.
@app.list_tools() async def list_tools() -> list[types.Tool]: return [ types.Tool( name="check_breach", description=( "Check whether an email address appears in known data breaches. " - src/relayshield_mcp/server.py:64-69 (registration)The tool name 'check_breach' is listed in PAYG_PRICING dict as costing $0.10 USDC.
@app.list_tools() async def list_tools() -> list[types.Tool]: return [ types.Tool( name="check_breach", description=( - src/relayshield_mcp/server.py:234-248 (registration)The call_tool function dispatches to _dispatch which routes name 'check_breach' to the handler.
@app.call_tool() async def call_tool(name: str, arguments: dict) -> list[types.TextContent]: if not API_BASE: return _error( "RELAYSHIELD_API_URL environment variable must be set. " "See README for configuration instructions." ) # VT-licensed tools require a subscription key — return coming soon for PAYG callers if not API_KEY and name in VT_COMING_SOON: return [types.TextContent(type="text", text=json.dumps({ "ok": False, "tool": name, "status": "coming_soon", "message": (