Skip to content

[Bug]: MCP streamable_http not including Authorization header in request #471

@zimmra

Description

@zimmra

Platform

Linux

AionUi Version

1.7.2

Bug Description

When configuring an MCP server with streamable_http type for GitHub, an error occurs stating that the required Authorization header is missing, even though the configuration explicitly includes the Authorization header in the headers block.

Error message:

github: Streamable HTTP error: Error POSTing to endpoint: bad request: missing required Authorization header

Configuration:

{
  "mcpServers": {
    "github": {
      "type": "streamable_http",
      "url": "https://api.githubcopilot.com/mcp",
      "description": "GitHub MCP Server",
      "headers": {
        "Authorization": "Bearer [REDACTED_GITHUB_PAT]"
      }
    }
  }
}

It appears the Authorization header is not being sent with the request despite being set in the configuration. Please investigate why the header may not be included with streamable_http MCP calls.

Steps to Reproduce

  1. Add a GitHub MCP server configuration in AionUi as shown above (type=streamable_http with headers.Authorization set).
  2. Attempt to connect or use the configured MCP server.
  3. Observe the error indicating the Authorization header is missing.

Expected Behavior

The Authorization header set in the mcpServers configuration should be included in all HTTP requests to the MCP server, allowing authenticated access without missing header errors.

Actual Behavior

The application throws an error indicating the required Authorization header is missing, despite being present in the configuration. The request does not include the Authorization header when talking to the MCP server.

Additional Context

  • MCP server type: streamable_http
  • Downstream MCP server: https://api.githubcopilot.com/mcp
  • Configuration is shown above.
  • This may be an issue in how the StreamableHTTPClientTransport applies headers from configuration when making a request, or in the bridge/service codepath (see usage in McpService and McpProtocol classes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions