Skip to main content
Glama
Cyreslab-AI

Have I Been Pwned MCP Server

get_breach_details

Retrieve detailed information about a specific data breach by providing the breach name, helping users assess potential risks and exposure.

Instructions

Get details about a specific data breach

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
breach_nameYesName of the breach to get details for

Implementation Reference

  • The main execution logic for the get_breach_details tool. Validates input, fetches breach details from the Have I Been Pwned API, formats the response as markdown, and includes recommendations.
    private async handleGetBreachDetails(args: any) { if (!args.breach_name || typeof args.breach_name !== "string") { throw new McpError( ErrorCode.InvalidParams, "Breach name is required" ); } const response = await this.axiosInstance.get(`/breach/${encodeURIComponent(args.breach_name)}`); if (!response.data) { return { content: [ { type: "text", text: `No information found for breach: ${args.breach_name}`, }, ], }; } const breach = response.data; // Format the breach data for better readability let details = `# ${breach.Name} Data Breach\n\n`; details += `**Date:** ${breach.BreachDate}\n`; details += `**Domain:** ${breach.Domain}\n`; details += `**Accounts affected:** ${breach.PwnCount.toLocaleString()}\n`; details += `**Verified:** ${breach.IsVerified ? "Yes" : "No"}\n`; details += `**Data leaked:** ${breach.DataClasses.join(", ")}\n\n`; details += `**Description:**\n${breach.Description}\n\n`; if (breach.IsFabricated) { details += "⚠️ Note: This breach has been flagged as potentially fabricated.\n\n"; } if (breach.IsSensitive) { details += "⚠️ Note: This breach contains sensitive information.\n\n"; } if (breach.IsRetired) { details += "ℹ️ Note: This breach has been retired from active display.\n\n"; } if (breach.IsSpamList) { details += "ℹ️ Note: This breach is from a spam list.\n\n"; } details += "**Recommendations:**\n"; details += "- If you had an account on this service, change your password\n"; details += "- If you used the same password elsewhere, change those too\n"; details += "- Monitor your accounts for suspicious activity\n"; details += "- Be cautious of phishing attempts that may use this leaked information"; return { content: [ { type: "text", text: details, }, ], }; }
  • Input schema defining the required 'breach_name' parameter for the tool.
    inputSchema: { type: "object", properties: { breach_name: { type: "string", description: "Name of the breach to get details for", }, }, required: ["breach_name"], },
  • src/index.ts:118-131 (registration)
    Registration of the get_breach_details tool in the ListTools response, including name, description, and input schema.
    { name: "get_breach_details", description: "Get details about a specific data breach", inputSchema: { type: "object", properties: { breach_name: { type: "string", description: "Name of the breach to get details for", }, }, required: ["breach_name"], }, },
  • src/index.ts:169-170 (registration)
    Dispatch case in the CallToolRequest handler that routes calls to the specific handler function.
    case "get_breach_details": return await this.handleGetBreachDetails(request.params.arguments);

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cyreslab-AI/hibp-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server