This release includes 1 security fix for security teams reviewing exposed deployments.
Topics
+13 more
Affected surfaces
Summary
AI summaryFixed latent crash in loki mcp --transport http and added explicit loopback bind with optional bearer auth hardening.
Full changelog
Hardening + latent crash fix: loki mcp --transport http (loopback bind + optional bearer auth)
The HTTP transport path for loki mcp --transport http was fixed and hardened.
- FIX (latent crash): the previous
mcp.run(transport='http', port=...)call could never
work: FastMCP's run() has no 'http' transport literal (only stdio/sse/streamable-http) and
takes no port keyword, so the http branch raised TypeError/ValueError. The command now runs
via a supported path (streamable_http_app served by uvicorn), soloki mcp --transport http
actually starts. - HARDENING (explicit loopback bind): the server binds 127.0.0.1 explicitly (never an implicit
default, never 0.0.0.0), so a future SDK default change cannot silently widen the bind. - HARDENING (optional bearer auth): when LOKI_MCP_AUTH_TOKEN is set, every HTTP request must
carry a matchingAuthorization: Bearer <token>or it is rejected 401 (constant-time compare
via hmac.compare_digest, with WWW-Authenticate: Bearer). When the env var is unset or empty,
NO auth middleware is installed, so the request path is the plain unauthenticated behavior. - The default stdio transport path is untouched.
- Coverage: tests/mcp/test_http_auth.py (6 tests) + tests/test-mcp-http-auth.sh (boots a real
server, verifies the 127.0.0.1 bind via lsof and the full no-bearer/wrong-bearer/correct-bearer/
token-unset 401/200 matrix, including a real MCP initialize handshake that proves the middleware
does not break the Streamable-HTTP lifespan/session manager).
Security Fixes
- Added constant‑time bearer token verification and explicit loopback bind hardening for `loki mcp --transport http`
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About Loki Mode
Multi-agent autonomous SDLC framework. Spec to deployed app. PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief. 5 AI providers, 11 quality gates.
Related context
Related tools
Beta — feedback welcome: [email protected]