mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #21179] issue: [Bug] Web UI Trims Trailing Slash from MCP Server URL, Causing 301 Redirect and Broken Authorization #34941
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 @ianohin on GitHub (Feb 5, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21179
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.7.2
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
The URL entered by the user (https://api.example.com/mcp/) should be saved and used exactly as provided, preserving the trailing slash.
Actual Behavior
When configuring a Model Context Protocol (MCP) server via the OpenWebUI web interface, a trailing slash (/) at the end of the server URL is automatically removed upon saving. This causes the client to send requests to an incorrect endpoint, triggering a server-side redirect (301). During this redirect, critical authentication headers (like Authorization: Bearer) are lost or the request method changes, ultimately resulting in a 400 Bad Request error.
This is a critical issue for integrating with MCP servers (like Bitrix24) that strictly require a specific path format.
Steps to Reproduce
Go to the MCP servers configuration section in the OpenWebUI settings.
Add a new server with a URL that requires a trailing slash (e.g., https://api.example.com/mcp/).
Save the configuration.
Observe that the saved/displayed URL is now https://api.example.com/mcp (slash is missing).
Attempt to use this MCP server. The client will fail to connect, and the logs will show a 301 Moved Permanently followed by a 400 Bad Request.
Logs & Screenshots
docker logs
httpx._client:_send_single_request:1740 - HTTP Request: POST https://mcp.bitrix24.tech/mcp "HTTP/1.1 301 Moved Permanently"
httpx._client:_send_single_request:1740 - HTTP Request: GET https://mcp.bitrix24.tech/mcp/ "HTTP/1.1 400 Bad Request"
Additional Information
No response
@owui-terminator[bot] commented on GitHub (Feb 5, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
by thrasher • Jan 12, 2026 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.