Repository navigation
v0.2.0 — security: authenticate HTTP transport callers
·
4 commits
to master
since this release
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.1by 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_TOKENor--auth-token); callers sendAuthorization: Bearer <token>. Without one the server refuses to start. - New
--allowed-hostsrestricts 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.