Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

ssl_create_ca

Create a Certificate Authority for SSL bumping to enable HTTPS traffic inspection in the Web Proxy MCP Server.

Instructions

Create a new Certificate Authority for SSL bumping

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caNameNoName for the new CA (default: 'default')default
descriptionNoDescription for the CA
overwriteNoOverwrite existing CA if it exists
subjectNoCertificate subject information

Implementation Reference

  • MCP tool handler that routes ssl_create_ca calls to the SSLManager.createCA method and formats the response.
    case 'ssl_create_ca':
      const caResult = await this.sslManager.createCA(
        args.caName,
        {
          description: args.description,
          overwrite: args.overwrite,
          subject: args.subject
        }
      );
      
      return {
        content: [{
          type: "text",
          text: `βœ… Certificate Authority created: ${caResult.caName}\n\nπŸ“ CA Directory: ${caResult.caDir}\nπŸ”‘ CA Certificate: ${caResult.caCertPath}\n\n${caResult.installationInstructions}`
        }]
      };
  • Input schema and tool definition for ssl_create_ca, used for validation and MCP registration.
    ssl_create_ca: {
      name: "ssl_create_ca",
      description: "Create a new Certificate Authority for SSL bumping",
      inputSchema: {
        type: "object",
        properties: {
          caName: {
            type: "string",
            description: "Name for the new CA (default: 'default')",
            default: "default"
          },
          description: {
            type: "string",
            description: "Description for the CA"
          },
          overwrite: {
            type: "boolean",
            description: "Overwrite existing CA if it exists",
            default: false
          },
          subject: {
            type: "object",
            description: "Certificate subject information",
            properties: {
              C: { type: "string", description: "Country", default: "US" },
              ST: { type: "string", description: "State", default: "CA" },
              L: { type: "string", description: "Locality", default: "San Francisco" },
              O: { type: "string", description: "Organization", default: "Web Proxy MCP Server" },
              OU: { type: "string", description: "Organizational Unit", default: "Development" },
              CN: { type: "string", description: "Common Name" }
            }
          }
        }
      }
    },
  • Core SSLManager.createCA method that implements CA creation using OpenSSL, generates keys, certificates, configs, and provides installation instructions.
    async createCA(caName = null, options = {}) {
      if (caName) {
        this.currentCA = caName;
        this.caDir = path.join(this.caBaseDir, this.currentCA);
      }
    
      await this._ensureDirectories();
    
      const caExists = await this._checkCAExists();
      if (caExists && !options.overwrite) {
        throw new Error(`CA '${this.currentCA}' already exists. Use overwrite option to recreate.`);
      }
    
      console.log(`πŸ”§ Creating new Certificate Authority: ${this.currentCA}`);
    
      // Generate CA configuration
      const caConfig = this._generateCAConfig(options);
      const caConfigPath = path.join(this.caDir, 'ca.conf');
      await fs.writeFile(caConfigPath, caConfig);
    
      // Generate CA private key
      const caKeyPath = path.join(this.caDir, 'ca.key');
      const keyGenCmd = `openssl genrsa -out "${caKeyPath}" 4096`;
      this._executeSSLCommand(keyGenCmd);
    
      // Generate CA certificate
      const caCertPath = path.join(this.caDir, 'ca.crt');
      const certGenCmd = `openssl req -new -x509 -key "${caKeyPath}" -out "${caCertPath}" -days 3650 -config "${caConfigPath}"`;
      this._executeSSLCommand(certGenCmd);
    
      // Create certificate database
      await this._initializeCertDB();
    
      // Save CA metadata
      await this._saveCAMetadata(options);
    
      console.log(`βœ… Certificate Authority '${this.currentCA}' created successfully`);
      console.log(`πŸ“ CA Directory: ${this.caDir}`);
      console.log(`πŸ”‘ CA Certificate: ${caCertPath}`);
      
      return {
        caName: this.currentCA,
        caDir: this.caDir,
        caCertPath,
        caKeyPath,
        installationInstructions: this._getInstallationInstructions(caCertPath)
      };
    }

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/mako10k/mcp-web-proxy'

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