Skip to content

MCP: configurable HTTPS enforcement for seed-based tools #554

@jasminecheong

Description

@jasminecheong

Context

The CAD (design/docs/cad/041_mcp/index.md) correctly warns that seed-based tools (transact, signAndSubmit, transfer) transmit the Ed25519 seed over the network and therefore require HTTPS. But nothing in the server enforces this — a misconfigured peer running plain HTTP would happily accept and forward seeds in cleartext.

Enhancement

Enforce HTTPS for seed-bearing MCP tool calls, configurable via peer config.

Suggested shape:

  • mcp.requireHttps.seedTools = true (default) | false
  • When true: if a request for transact, signAndSubmit, transfer, or signingImportKey arrives over plain HTTP (no TLS termination marker), respond with a JSON-RPC error (e.g. -32600 with a clear message) rather than processing the seed.
  • Detect TLS via the usual signals: request.isSecure(), X-Forwarded-Proto: https from a trusted reverse proxy, or an explicit peer-config flag stating "I am behind a TLS-terminating proxy".

Considerations

  • Default must be true — the silent-cleartext-seed failure mode is exactly the kind of thing users expect the platform to prevent.
  • Local development is the main reason to allow HTTP. Provide a clear override (e.g. mcp.requireHttps.seedTools: false) with a startup log warning when it is disabled.
  • Reverse-proxy deployments need a way to declare that upstream HTTP is acceptable because TLS is terminated externally. X-Forwarded-Proto trust must itself be configurable to avoid header spoofing.
  • This extends naturally to signingImportKey and signingExportKey, which carry key material even though they are not "seed-based" in the narrow sense.
  • Document the recommended production config in the CAD security section.

Related

  • CAD: design/docs/cad/041_mcp/index.md § Security Considerations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions