Skip to main content
Glama
firesh

SSL Monitor MCP Server

by firesh

get_domain_info

Retrieve domain registration, expiration, and registrant details via WHOIS lookup to monitor domain status and ensure website security.

Instructions

Get domain registration and expiration information using WHOIS lookup. Returns registrant information when available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesThe top-level domain to check (e.g., sslmon.dev)

Implementation Reference

  • Core handler function that implements the tool logic: queries RDAP for domain info, falls back to WHOIS if RDAP fails, and returns formatted JSON response.
    private async getDomainInfo(domain: string): Promise<any> { try { // First try RDAP protocol const rdapInfo = await this.queryRDAP(domain); if (rdapInfo) { return { content: [ { type: "text", text: JSON.stringify(rdapInfo, null, 2), }, ], }; } } catch (rdapError) { console.error(`RDAP query failed for ${domain}:`, rdapError); } try { // Fallback to whois protocol const whoisInfo = await this.queryWhois(domain); return { content: [ { type: "text", text: JSON.stringify(whoisInfo, null, 2), }, ], }; } catch (whoisError) { return { content: [ { type: "text", text: `Domain info lookup failed for ${domain}: ${whoisError instanceof Error ? whoisError.message : String(whoisError)}`, }, ], }; } }
  • src/index.ts:57-75 (registration)
    Registers the get_domain_info tool with the MCP server, providing title, description, input schema (domain: string), and a thin async handler that calls getDomainInfo with error handling.
    "get_domain_info", { title: "Get domain info", description: "Get domain registration, expiration, and daysUntilExpiry using WHOIS/RDAP.", inputSchema: { domain: z.string().describe("The top-level domain to check (e.g., sslmon.dev)"), }, }, async ({ domain }) => { try { return await this.getDomainInfo(domain); } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true, }; } } );
  • TypeScript interface defining the structure of the DomainInfo object returned by the tool.
    interface DomainInfo { domain: string; registrationDate?: string; expirationDate?: string; registrar?: string; registrant?: string; status?: string; daysUntilExpiry?: number; }

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/firesh/sslmon-mcp'

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