Add HTTPS support to the streamable HTTP MCP transport
Summary
Currently, the MCP server supports two transport modes: stdio and streamable HTTP (https://modelcontextprotocol.io/specification/2025-03-26/basic/transports). The former only support HTTP with no encryption and should be added in case the MCP server lives on a separate host. Streamable HTTP can run over HTTPS, so TLS can encrypt communication between the LLM application’s MCP client and Metasploit.
TLS should be directly added to Puma, which already supports it through ssl_bind. The listener configuration would use something like:
config.ssl_bind bind_host, port,
key: '/path/to/server.key',
cert: '/path/to/server.crt' A complete implementation would expose these paths through the MCP configuration and pass them through start to start_http. The StreamableHTTPTransport itself needs no changes. The client would connect using HTTPS and must trust the server certificate.
Source: rapid7/metasploit-framework