Skip to content

Pass through custom headers into MCP Server for user specific authentication. #534

Description

@MatthewWilsonThomas

I am using an MCP server as an OpenAPI spec API endpoint wrapper and I need user authentication for that API based on the react bearer token. My suggestion of a solution is that there are passthrough http headers that are sent to the mcp-server upon request, allowing for this behaviour.

It would be intuitie to have the MCPProvider allow for this configuration as a way of passing custom headers to server-side MCP servers.

There is an existing workaround by exposing my MCP endpoint to the browser and using a client side MCP provider to access the url, then passing custom headers to you MCPClient which supports them.

Ideally there would be a way to support ServerSide MCP endpoints with custom header in the MCPProvider, but it would be equally useful to have a passthrough custom header to client-side provider to support user specific authentication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions