create_ssl
Generate SSL certificates for secure communication by providing certificate, private key, and optional parameters like SNI or client configurations.
Instructions
Create an SSL certificate
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | SSL certificate ID | |
| ssl | Yes | SSL certificate configuration object |
Implementation Reference
- src/tools/ssl.ts:6-13 (handler)The handler function registered for the "create_ssl" tool. It extracts the id from args and either POSTs the ssl config to /ssls (create) or PUTs to /ssls/{id} (update) using makeAdminAPIRequest.server.tool("create_ssl", "Create an SSL certificate", CreateSSLSchema.shape, async (args) => { const sslId = args.id; if (!sslId) { return await makeAdminAPIRequest(`/ssls`, "POST", args.ssl); } else { return await makeAdminAPIRequest(`/ssls/${sslId}`, "PUT", args.ssl); } });
- src/schemas/ssl.ts:34-37 (schema)Zod input schema for the create_ssl tool, with optional id and required ssl object based on SSLSchema.export const CreateSSLSchema = z.object({ id: z.string().optional().describe("SSL certificate ID"), ssl: SSLSchema, });
- src/schemas/ssl.ts:4-27 (schema)Detailed Zod schema for SSL configuration object used within CreateSSLSchema for the create_ssl tool.export const SSLSchema = z .object({ label: z.string().optional().describe("SSL label"), cert: z.string().describe("SSL certificate in PEM format"), certs: z.array(z.string()).optional().describe("SSL certificates in PEM format"), key: z.string().describe("SSL private key in PEM format"), keys: z.array(z.string()).optional().describe("SSL private keys in PEM format"), sni: z.string().optional().describe("Server Name Indication"), snis: z.array(z.string()).optional().describe("Server Name Indications"), client: z .object({ ca: z.string().describe("SSL client CA certificate in PEM format"), depth: z.number().optional().default(1).describe("SSL client verification depth"), skip_mtls_uri_regex: z.array(z.string()).optional().describe("URIs to skip mTLS verification"), }) .optional() .describe("SSL client configuration"), type: z.enum(["server", "client"]).optional().default("server").describe("SSL type"), status: StatusSchema.optional().describe("SSL certificate status"), validity_start: z.number().optional().describe("SSL certificate validity start timestamp"), validity_end: z.number().optional().describe("SSL certificate validity end timestamp"), }) .passthrough() .describe("SSL certificate configuration object");
- src/index.ts:27-27 (registration)High-level registration call that invokes setupSSLTools to add the create_ssl tool (and others) to the MCP server.setupSSLTools(server);