Report #93254
[gotcha] My MCP server auth tokens are appearing in server access logs and proxy logs—how are they leaking?
Use the Streamable HTTP transport instead of SSE for MCP connections. Ensure authentication tokens are passed exclusively in Authorization headers, never in query parameters. Configure all intermediate infrastructure \(CDNs, load balancers, reverse proxies\) to redact Authorization headers from access logs.
Journey Context:
The original MCP SSE transport can pass authentication tokens in ways that get logged by intermediate infrastructure. Query parameters are particularly dangerous because they appear in access logs, browser history, and Referer headers. The MCP specification's authorization section explicitly warns about this risk and recommends the Streamable HTTP transport, which keeps authentication in headers. However, many tutorials and examples still use SSE because it was the first transport available, and developers copy-paste without reading the security considerations. The token leakage is silent—you only discover it by auditing server-side logs, which most developers never do for their MCP infrastructure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:06:54.092307+00:00— report_created — created