Open
Description
Description
I'm trying to connect to Home Assistant MCP server, which uses "Authorization: Bearer xxxx" header for connection.
To Reproduce
Steps to reproduce the behavior:
Try to connect to HA MCP server using such transport:
val haTransport = http.mcpSseTransport( "http://homeassistant.local:8123/mcp_server") {
headers {
append("Authorization", "Bearer some_token_here")
}
}
Gives: Error connecting to server: Expected status code 200 but was 401
Calling it via CURL works without a problem:
curl -H "Authorization: Bearer some_token_here" http://homeassistant.local:8123/mcp_server/sse
event: endpoint
data: /mcp_server/messages/01JQEXWJPKWPZPTFVEQRKS76BZ
Expected behavior
The header is passed and the server returns 200