mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
issue: open-webui does not work with StreamableHttpTransport based MCP servers #5471
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 @alainivars on GitHub (Jun 7, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.13
Ollama Version (if applicable)
No response
Operating System
EndeavourOS (Arch Linux)
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
The requests that must be made by openwebui to the MCP server are (sequence made by Inspector):
INFO: 127.0.0.1:58286 - "POST /mcp/ HTTP/1.1" 200 OK
INFO: 127.0.0.1:58286 - "POST /mcp/ HTTP/1.1" 202 Accepted
INFO: 127.0.0.1:58294 - "GET /mcp/ HTTP/1.1" 200 OK
Actual Behavior
The requests made by openwebui to the MCP server are:
INFO: 127.0.0.1:51484 - "OPTIONS /mcp//openapi.json HTTP/1.1" 405 Method Not Allowed
Steps to Reproduce
1/ download the official sdk at :
git clone https://github.com/modelcontextprotocol/python-sdk.git
cd python-sdk/examples/servers/simple-streamablehttp/mcp_simple_streamablehttp
2/ create and active venv
uv init .
uv venv --python 3.12
source .venv/bin/activate
3/ run the mcp stream-http server (be sure the port is available on your machine)
uv run mcp-simple-streamablehttp-stateless --port 8000 --log-level DEBUG
4/ open openwebui
Click on your "user" then "settings" then "tools"
5/ add the server (try it)
Click on "+" then paste "http://0.0.0.0:8000/mcp"
HERE IS THE ISSUE, describe in Actual Behavior and Expected Behavior
Logs & Screenshots
log on mcp server for Inspector:
log on mcp server for openwebui:
Additional Information
No response
@rgaricano commented on GitHub (Jun 7, 2025):
you have to paste mcp url with full protocol string: http://0.0.0.0:8000/mcp or https://0.0.0.0:8000/mcp if not a starting slash "/" is added.
(not only 0.0.0.0:8000/mcp as in your example )
53764fe648/backend/open_webui/utils/tools.py (L495-L501)Recheck & if work on your end, please close thread.
@alainivars commented on GitHub (Jun 7, 2025):
Thanks @rgaricano for your quick response.
You probably read the bug description to quickly, please read it again, the point 5 in step to reproduce, the protocol is present.
I checked lot of other ways before opening the bug, with slash at the end or not, with http and https, etc. I just gave here a simple way to reproduce it, not all the ways I tested.
@Hisma commented on GitHub (Jun 7, 2025):
@alainivars your MCP endpoint syntax appears to be wrong based on your logs.
This is what your MCPO endpoints should look like -
It should be
<server url>/<mcp tool name>, configured underSettings -> Tools(I define mine at the user level, not the Admin level).Confirm you can hit the MCP endpoint docs url -
If you can't get that page to come up, you set up your MCP server wrong.
@rgaricano commented on GitHub (Jun 7, 2025):
Put mouse over 5. link, & look at bottom left: