issue: open-webui does not work with StreamableHttpTransport based MCP servers #5471

Closed
opened 2025-11-11 16:21:52 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @alainivars on GitHub (Jun 7, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

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:

Image

log on mcp server for openwebui:

Image

Additional Information

No response

Originally created by @alainivars on GitHub (Jun 7, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### 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: ![Image](https://github.com/user-attachments/assets/ff7cc983-2910-485a-8f94-83fc2c314d75) log on mcp server for openwebui: ![Image](https://github.com/user-attachments/assets/6d0c584b-6e79-4e56-9657-2e36897fc8bd) ### Additional Information _No response_
GiteaMirror added the bug label 2025-11-11 16:21:52 -06:00
Author
Owner

@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.

@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 ) https://github.com/open-webui/open-webui/blob/53764fe64884da147359e54ed6d9607fe57f1600/backend/open_webui/utils/tools.py#L495-L501 Recheck & if work on your end, please close thread.
Author
Owner

@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.

Image

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.

@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. ![Image](https://github.com/user-attachments/assets/4520a00c-101d-4b74-9f05-fb7725fae047) 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.
Author
Owner

@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 -

Image

It should be <server url>/<mcp tool name>, configured under Settings -> Tools (I define mine at the user level, not the Admin level).

Confirm you can hit the MCP endpoint docs url -

Image

If you can't get that page to come up, you set up your MCP server wrong.

@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 - ![Image](https://github.com/user-attachments/assets/9660086e-655d-40cb-a68e-4b13225fc232) It should be `<server url>/<mcp tool name>`, configured under `Settings -> Tools` (I define mine at the user level, not the Admin level). Confirm you can hit the MCP endpoint docs url - ![Image](https://github.com/user-attachments/assets/44f79526-29ff-421d-a15d-04f1bbd37d39) If you can't get that page to come up, you set up your MCP server wrong.
Author
Owner

@rgaricano commented on GitHub (Jun 7, 2025):

Put mouse over 5. link, & look at bottom left:

Image

@rgaricano commented on GitHub (Jun 7, 2025): Put mouse over 5. link, & look at bottom left: ![Image](https://github.com/user-attachments/assets/7d474e6d-90ee-447f-bdaa-1dc9f31b951d)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5471