proxy_get_ca_cert
Retrieve the CA certificate and fingerprint for installing on target devices to enable HTTPS traffic interception through the proxy server.
Instructions
Get the CA certificate PEM and SPKI fingerprint for installing on the target device.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | What to return: 'pem', 'fingerprint', or 'both' | both |
Implementation Reference
- src/tools/lifecycle.ts:97-121 (handler)Implementation of the proxy_get_ca_cert tool handler, which fetches the certificate from proxyManager and returns the PEM and/or fingerprint.
server.tool( "proxy_get_ca_cert", "Get the CA certificate PEM and SPKI fingerprint for installing on the target device.", { format: z.enum(["pem", "fingerprint", "both"]).optional().default("both") .describe("What to return: 'pem', 'fingerprint', or 'both'"), }, async ({ format }) => { const cert = proxyManager.getCert(); if (!cert) { return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: "No certificate. Start the proxy first." }) }] }; } const result: Record<string, unknown> = { status: "success" }; if (format === "pem" || format === "both") { result.certPem = cert.cert; } if (format === "fingerprint" || format === "both") { result.fingerprint = cert.fingerprint; } result.instructions = "Save the PEM to a .crt file, transfer to device, and install as trusted CA."; return { content: [{ type: "text", text: JSON.stringify(result) }] }; }, );