ssl_list_cas
Retrieve a list of all available Certificate Authorities for HTTPS traffic management in the Web Proxy MCP Server.
Instructions
List all available Certificate Authorities
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/tool-handlers.js:94-105 (handler)MCP tool handler for 'ssl_list_cas' that calls sslManager.listCAs() and formats the results into a formatted text response listing available Certificate Authorities.case 'ssl_list_cas': const cas = await this.sslManager.listCAs(); const caList = cas.map(ca => `• ${ca.name} ${ca.current ? '(current)' : ''} - ${ca.exists ? '✅ Available' : '❌ Missing'}\n Created: ${ca.created || 'Unknown'}\n Description: ${ca.description || 'No description'}` ).join('\n\n'); return { content: [{ type: "text", text: `🔒 Available Certificate Authorities\n\n${caList || 'No CAs found'}` }] };
- Tool definition including name, description, and input schema (empty object, no parameters required).ssl_list_cas: { name: "ssl_list_cas", description: "List all available Certificate Authorities", inputSchema: { type: "object", properties: {} } },
- src/ssl/ssl-manager.js:159-194 (helper)Implementation of the listCAs() method in SSLManager class, which lists all CA directories, loads metadata, checks existence of ca.crt, and determines if current.async listCAs() { try { await fs.access(this.caBaseDir); const entries = await fs.readdir(this.caBaseDir, { withFileTypes: true }); const cas = []; for (const entry of entries) { if (entry.isDirectory()) { const caDir = path.join(this.caBaseDir, entry.name); const metadataPath = path.join(caDir, 'metadata.json'); let metadata = { name: entry.name, created: null, description: null }; try { const metadataContent = await fs.readFile(metadataPath, 'utf-8'); metadata = { ...metadata, ...JSON.parse(metadataContent) }; } catch (error) { // Metadata file doesn't exist or is corrupted } const caExists = await fs.access(path.join(caDir, 'ca.crt')).then(() => true).catch(() => false); cas.push({ name: entry.name, path: caDir, exists: caExists, current: entry.name === this.currentCA, ...metadata }); } } return cas; } catch (error) { return []; } }