mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #17768] issue: MCP feature doesn't support multi-tenant use case #18392
Reference in New Issue
Block a user
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?
Originally created by @hsuyuming on GitHub (Sep 26, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17768
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
v0.6.31
Ollama Version (if applicable)
No response
Operating System
Debian 12
Browser (if applicable)
Chrome 140.0.7339.133
Confirmation
README.md.Expected Behavior
Metadata discovery logic should follow the MCP spec documentation for multi-tenant usecase.
https://modelcontextprotocol.io/specification/draft/basic/authorization#authorization-server-metadata-discovery
FYI: Our secured remote mcp server can work well when using mcp inspector and mcp-remote npm package
Actual Behavior
Hi:
When I attempt to test the latest MCP feature released in version v0.6.31, I try to connect it to one of our secured remote MCP servers. However, during metadata discovery, it cannot locate the correct path. This issue arises because we are using an Apigee reverse proxy in a multi-tenant setup.
Our MCP URL : https:///<subpath(tenant)>/mcp
Currently, the mcp code logic ignores the subpath, so it attempts to send a request to https:///.well-known/oauth-authorization-server, which does not exist.
Error message:
{
"detail": "Failed to fetch OAuth 2.1 discovery document from [https:///.well-known/oauth-authorization-server"](https:///.well-known/oauth-authorization-server%
Steps to Reproduce
Step:
URL: https:///abehsu-mcp-test/mcp
Select OAuth 2.1, provide client_id c0657649-6f42-4103-b581-2d6592d63bb0
Click "Verify connection" -> Fail
Logs & Screenshots
Error from cmd:
2025-09-26 04:50:27.653 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 127.0.0.1:54310 - "POST /api/v1/configs/tool_servers/verify HTTP/1.1" 400
Error from browser:
Additional Information
https://apigee/.well-known/oauth-protected-resource/abehsu-mcp-test/mcp exist


https:///.well-known/oauth-authorization-server/abehsu-mcp-test exist
@tjbck commented on GitHub (Sep 26, 2025):
should be addressed with
0431ad9cc4, testing wanted here.@hsuyuming commented on GitHub (Sep 27, 2025):
Thank you @tjbck , Let me test it next week!
@logan-hcg commented on GitHub (Nov 17, 2025):
@tjbck it looks like the order of the metadata lookup is reversed. Based on https://modelcontextprotocol.io/specification/draft/basic/authorization#authorization-server-metadata-discovery, it should check the "tenant" metadata. It doesn't say anything about falling back to the "non-tenant" discovery locations, but I think that is reasonable.
Edit: opened a PR: https://github.com/open-webui/open-webui/pull/19244
@xqqp commented on GitHub (Nov 18, 2025):
This part of the metadata discovery is not implemented yet. I think the issue should be reopened.