Streamable HTTP MCP: headers and headersHelper not sent with requests
Resolved 💬 3 comments Opened Apr 15, 2026 by hweissta Closed Apr 22, 2026
Bug Description
When using a Streamable HTTP MCP server ("type": "http") with either headers or headersHelper in .mcp.json, Claude Code does not attach the configured headers to the HTTP requests it sends to the MCP endpoint.
Reproduction
.mcp.json config (tried both variants):
With headersHelper:
{
"mcpServers": {
"my-server": {
"type": "http",
"url": "https://example.com/api/v4.0/mcp",
"headersHelper": "./get-token.sh"
}
}
}
With static headers:
{
"mcpServers": {
"my-server": {
"type": "http",
"url": "https://example.com/api/v4.0/mcp",
"headers": {
"Authorization": "Bearer <valid-token>"
}
}
}
}
Steps to reproduce:
- Configure an HTTP MCP server that requires Bearer token auth (validated at the gateway before reaching the MCP handler)
- Run
/mcpto connect - Call any tool
Expected behavior:
The Authorization header from headers/headersHelper should be included in every HTTP POST to the MCP endpoint.
Actual behavior:
The request reaches the server without the Authorization header, resulting in a 403 from the auth gateway.
Verification:
- The same token works when calling the endpoint directly via
curlor Postman - The
headersHelperscript produces valid output:{"Authorization": "Bearer eyJ..."} - Server-side logs confirm the request never reaches the MCP handler (blocked at the auth gateway layer)
- Both
headersandheadersHelperconfigurations exhibit the same behavior
Environment
- macOS (Darwin 24.6.0)
- Claude Code CLI
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗