mirror of
https://github.com/open-webui/mcpo.git
synced 2026-11-05 01:27:39 +00:00
[PR #251] [MERGED] Feat: Add client header forwarding feature #224
Labels
No labels
bug
can't reproduce
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/mcpo#224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/mcpo/pull/251
Author: @rkconsulting
Created: 9/18/2025
Status: ✅ Merged
Merged: 9/24/2025
Merged by: @tjbck
Base:
dev← Head:issues/182/forward-client-http-headers📝 Commits (2)
b50509dAdd client header forwarding feature086ee45Merge branch 'dev' into issues/182/forward-client-http-headers📊 Changes
5 files changed (+670 additions, -385 deletions)
View changed files
➕
CLIENT_HEADER_FORWARDING.md(+151 -0)📝
src/mcpo/main.py(+13 -2)➕
src/mcpo/utils/headers.py(+99 -0)📝
src/mcpo/utils/main.py(+29 -5)📝
uv.lock(+378 -378)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This feature addition enables proper use of mcpo with MCP servers adhering to the MCP June 2025 spec for authentication. mcpo itself does not do any authentication because all MCP servers supporting this already have authentication and session management built in according to the MCP spec. v0.0.15 added support for setting connection-level headers for when mcpo connects to its MCP servers - however, for proper session management we need to continually forward HTTP headers (like the Authorization header forwarded by OWUI tools with the new auth_type
system_oauthwith every tool call! The MCP spec denotes that this is done via the _meta.headers attribute and the implementation does exactly this. Note that this works for all transport types, even for stdio!Note: I've added a file CLIENT_HEADER_FORWARDING.md describing the feature - we may want to consolidate this info into the README...?
Changelog entry:
Added tool-call level header forwarding to enable proper MCP-based session and authentication handling
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Related issues:
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.