ssl_certs
Retrieve SSL certificate information for any domain from crt.sh to analyze security configurations and identify associated subdomains.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to lookup SSL certificates on crt.sh |
Implementation Reference
- src/index.ts:206-214 (handler)Tool registration and handler for the 'ssl_certs' tool.
server.tool( "ssl_certs", { domain: z.string().describe("Domain name to lookup SSL certificates on crt.sh") }, async ({ domain }) => { const result = await sslClient.getCertificates(domain); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } - src/tools/ssl.ts:27-46 (handler)Actual implementation of the SSL certificate lookup logic using crt.sh API.
async getCertificates(query: string): Promise<SslCertificate[]> { try { const data = await this.fetch<any[]>("", { method: "GET", }, { q: query, output: "json", }); if (!Array.isArray(data)) return []; return z.array(SslCertificateSchema).parse(data); } catch (error) { if (error instanceof McpError) throw error; throw new McpError( ErrorCode.InternalError, `crt.sh SSL lookup error: ${(error as Error).message}` ); } } - src/tools/ssl.ts:5-15 (schema)Zod schema definition for SSL certificate data.
export const SslCertificateSchema = z.object({ issuer_ca_id: z.number(), issuer_name: z.string(), common_name: z.string(), name_value: z.string(), id: z.number(), entry_timestamp: z.string().optional(), not_before: z.string().optional(), not_after: z.string().optional(), serial_number: z.string().optional(), });