feat: Support authentication for SSE (Server-Sent Events) or streamable interfaces by configuring HTTP headers. #59

Closed
opened 2026-02-15 20:17:44 -05:00 by yindo · 8 comments
Owner

Originally created by @LYH-RAIN on GitHub (May 12, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Please support authentication for SSE (Server-Sent Events) or streamable interfaces by configuring HTTP headers. My config.json currently looks like this:
Image
However, when starting the Docker container, the following error occurs:
Image

Desired Solution you'd like

Provide a method to configure headers in config.json for authentication purposes."

Alternatives Considered

No response

Additional Context

No response

Originally created by @LYH-RAIN on GitHub (May 12, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Please support authentication for SSE (Server-Sent Events) or streamable interfaces by configuring HTTP headers. My config.json currently looks like this: ![Image](https://github.com/user-attachments/assets/49d88dcb-224f-4e14-b37b-80fa3ece989e) However, when starting the Docker container, the following error occurs: ![Image](https://github.com/user-attachments/assets/5de5258b-3f53-4467-9e82-0be8fb7f146f) ### Desired Solution you'd like Provide a method to configure headers in config.json for authentication purposes." ### Alternatives Considered _No response_ ### Additional Context _No response_
yindo closed this issue 2026-02-15 20:17:44 -05:00
Author
Owner

@riekusr commented on GitHub (May 18, 2025):

I really need this as well.... Any work arounds?

@riekusr commented on GitHub (May 18, 2025): I really need this as well.... Any work arounds?
Author
Owner

@LukeScrewdriver commented on GitHub (May 18, 2025):

Hi, try this #72

https://github.com/open-webui/mcpo/issues/72#issuecomment-2832328428

@LukeScrewdriver commented on GitHub (May 18, 2025): Hi, try this #72 https://github.com/open-webui/mcpo/issues/72#issuecomment-2832328428
Author
Owner

@nkeilar commented on GitHub (May 23, 2025):

In my case I'm trying to pass an API key in the Bearer header, and I want it to be passed to the mcp server. Maybe I'm doing it the wrong way but I want to setup one SSE server, and then have clients (staff) pass in a token url:userid:apikey using this string the SSE server knows which server and credentials to query. Then I can run one SSE MCP server exposed to openwebui as a user added tool.

Seems currently no way to do that

@nkeilar commented on GitHub (May 23, 2025): In my case I'm trying to pass an API key in the Bearer header, and I want it to be passed to the mcp server. Maybe I'm doing it the wrong way but I want to setup one SSE server, and then have clients (staff) pass in a token `url:userid:apikey` using this string the SSE server knows which server and credentials to query. Then I can run one SSE MCP server exposed to openwebui as a user added tool. Seems currently no way to do that
Author
Owner

@iKun4real commented on GitHub (May 29, 2025):

Yea, I kindda need this too because I have already deployed some (stdio to streamable http) MCP servers for Cherry Studio. If request headers can be added, I won't need to deploy these MCP servers on MCPO again, thereby consuming double the resources.

@iKun4real commented on GitHub (May 29, 2025): Yea, I kindda need this too because I have already deployed some (stdio to streamable http) MCP servers for Cherry Studio. If request headers can be added, I won't need to deploy these MCP servers on MCPO again, thereby consuming double the resources.
Author
Owner

@vk2r commented on GitHub (Jun 1, 2025):

Same problem here.

@vk2r commented on GitHub (Jun 1, 2025): Same problem here.
Author
Owner

@fpytloun commented on GitHub (Jun 10, 2025):

Same issue here 🙁

It seems to be a bug, not feature request. Checked mcpo code briefly and it seems to pass headers just fine (https://github.com/open-webui/mcpo/blob/main/src/mcpo/main.py#L325). Added in v0.0.15 (https://github.com/open-webui/mcpo/commit/dc4c4abe0831685a253516cd87ca84365f838a6e).

Ok.. I am using 0.0.14, let's update..

root@61ac1a4deae2:/# pip freeze|grep mcpo
mcpo==0.0.14
@fpytloun commented on GitHub (Jun 10, 2025): Same issue here 🙁 It seems to be a bug, not feature request. Checked mcpo code briefly and it seems to pass headers just fine (https://github.com/open-webui/mcpo/blob/main/src/mcpo/main.py#L325). Added in v0.0.15 (https://github.com/open-webui/mcpo/commit/dc4c4abe0831685a253516cd87ca84365f838a6e). Ok.. I am using 0.0.14, let's update.. ``` root@61ac1a4deae2:/# pip freeze|grep mcpo mcpo==0.0.14 ```
Author
Owner

@fpytloun commented on GitHub (Jun 10, 2025):

Ok, version 0.0.15 works. This can be closed 👍

@fpytloun commented on GitHub (Jun 10, 2025): Ok, version 0.0.15 works. This can be closed 👍
Author
Owner

@MBueschelberger commented on GitHub (Jun 22, 2025):

@nkeilar

Is it maybe related to this issue?

https://github.com/open-webui/mcpo/issues/182

@MBueschelberger commented on GitHub (Jun 22, 2025): @nkeilar Is it maybe related to this issue? https://github.com/open-webui/mcpo/issues/182
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/mcpo#59