Skip to content

v0.2.0 — security: authenticate HTTP transport callers

Choose a tag to compare

@malin-globalinfratech malin-globalinfratech released this 24 Sep 10:00
· 4 commits to master since this release
v0.2.0
206063f

Security fix: the HTTP transport now authenticates callers.

Before this release, --transport http --api-key <key> listened on 0.0.0.0 and never authenticated the caller, so anyone who could reach the port could call every tool on the operator's API key: spend their credits, and in some packages create, deactivate or delete blockchain-event webhooks and HD-wallet syncs. Stdio mode (the default) is not affected. Please upgrade if you run HTTP mode.

Changes

  • HTTP mode listens on 127.0.0.1 by default, with DNS rebinding protection (Host header check).
  • Listening on a non-loopback address (--host 0.0.0.0) with a startup API key requires an auth token (MCP_AUTH_TOKEN or --auth-token); callers send Authorization: Bearer <token>. Without one the server refuses to start.
  • New --allowed-hosts restricts the Host header on non-loopback binds.
  • Per-request key mode (no startup key) rejects requests without x-api-key (401).
  • Stateful HTTP mode keeps one session per client; previously only the first client could connect.

Upgrading: if clients reach the server from another machine or a container, start it with --host 0.0.0.0 and MCP_AUTH_TOKEN=<secret> and configure clients to send the bearer token. See the README section "Exposing the server beyond localhost".

Reported by Syed Anas Mohiuddin.