[GH-ISSUE #21864] issue:MCP Streamable HTTP Disconnect Loop in 8.x (Works in 7.x, Session Negotiates but GET Stream Closes and Reconnects Repeatedly) #58263

Closed
opened 2026-05-05 22:43:43 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @nileshgajare on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21864

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.5

Ollama Version (if applicable)

No response

Operating System

Windows 11

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

MCP tools should work reliably as they did in Open WebUI 7.x.x.
When adding an MCP server using MCP Streamable HTTP, Open WebUI should keep the GET stream stable (or handle stream lifecycle without breaking tool execution), and MCP tools should execute consistently.

Actual Behavior

In Open WebUI 8.x.x (main/latest), MCP does not work reliably (regression vs 7.x.x).
 Open WebUI successfully negotiates MCP session + protocol, but the stream disconnects shortly after, triggering reconnect loops and session deletion.
Observed in logs:
Session negotiated successfully
GET stream opens (200 OK)
Then: GET stream disconnected, reconnecting...

Open WebUI sends DELETE /mcp and repeats
This occurs with:
A custom .NET MCP server (Kestrel) using AddMcpServer().WithHttpTransport()

Microsoft MCP sample (https://learn.microsoft.com/api/mcp)

Steps to Reproduce

Steps to Reproduce

Environment

  • OS: Windows (Docker Desktop)
  • Open WebUI: ghcr.io/open-webui/open-webui:main (8.x.x)
  • MCP Server: ASP.NET Core (.NET) using AddMcpServer().WithHttpTransport()
  • MCP Endpoint: http://localhost:3333/mcp
  • Browser: Chrome (latest)

A) Reproduction with Custom .NET MCP Server

1️⃣ Start Open WebUI via Docker

docker run -d \
  -p 3000:8080 \
  -v open-webui:/app/backend/data \
  --name open-webui3 \
  ghcr.io/open-webui/open-webui:main

2️⃣ Start MCP Server (.NET Example)

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddHttpContextAccessor();
builder.Services
    .AddMcpServer()
    .WithHttpTransport()
    .WithTools<HrmsMcpTools>();

var app = builder.Build();

app.MapMcp("/mcp");

app.Run("http://localhost:3333/");

3️⃣ Configure MCP in Open WebUI

  1. Go to Settings → Tools (MCP)
  2. Click Add MCP Server
  3. Configure:
    • Type: MCP Streamable HTTP
    • URL: http://host.docker.internal:3333/mcp
    • Auth: None (or Bearer token if required)
  4. Enable the MCP server toggle

4️⃣ Trigger Tool Execution

  1. Open a new chat
  2. Enter a prompt that triggers an MCP tool
  3. Observe Docker logs

B) Reproduction with Microsoft MCP Sample

  1. Configure Open WebUI MCP using the Microsoft MCP endpoint:
    • https://learn.microsoft.com/api/mcp
  2. Use:
    • Type: MCP Streamable HTTP
  3. Trigger any tool call
  4. Observe the same disconnect/reconnect behavior

Observed Log Output (Open WebUI Container)

HTTP Request: POST http://host.docker.internal:3333/mcp "HTTP/1.1 200 OK"
Received session ID: <session-id>
Negotiated protocol version: 2025-06-18
HTTP Request: GET http://host.docker.internal:3333/mcp "HTTP/1.1 200 OK"
...
mcp.client.streamable_http:handle_get_stream - GET stream disconnected, reconnecting in 1000ms...
HTTP Request: DELETE http://host.docker.internal:3333/mcp "HTTP/1.1 200 OK"

Result

  • Session negotiates successfully
  • GET stream opens (200 OK)
  • Stream disconnects shortly after
  • Open WebUI deletes session
  • Reconnect loop begins

Expected Result

  • Persistent GET stream should remain stable
  • MCP tools should execute reliably without repeated session teardown
  • Behavior should match Open WebUI 7.x.x where the same setup worked correctly

Logs & Screenshots

2026-02-25 12:24:35.728 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:56512 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2026-02-25 12:24:39.184 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: POST https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 200 OK"
2026-02-25 12:24:39.184 | INFO | mcp.client.streamable_http:_maybe_extract_session_id_from_response:181 - Received session ID: eyJjbGllbnRJbmZvIjp7Im5hbWUiOiJtY3AiLCJ0aXRsZSI6bnVsbCwidmVyc2lvbiI6IjAuMS4wIiwiaWNvbnMiOm51bGwsIndlYnNpdGVVcmwiOm51bGx9LCJ1c2VySWRDbGFpbSI6ImZhNTIwOGIzLTFhNTItNDA3NC1iZDdhLTRjZTIzZWVlNDVhNCJ9
2026-02-25 12:24:39.185 | INFO | mcp.client.streamable_http:_maybe_extract_protocol_version_from_message:193 - Negotiated protocol version: 2025-06-18
2026-02-25 12:24:39.560 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: POST https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 202 Accepted"
2026-02-25 12:24:39.586 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: GET https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 204 No Content"
2026-02-25 12:24:39.586 | INFO | mcp.client.streamable_http:handle_get_stream:298 - GET stream disconnected, reconnecting in 1000ms...
2026-02-25 12:24:40.550 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: POST https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 200 OK"
2026-02-25 12:24:40.899 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: GET https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 204 No Content"
2026-02-25 12:24:48.085 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:35250 - "POST /api/chat/completed HTTP/1.1" 200
2026-02-25 12:24:48.088 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:35252 - "GET /audio/notification.mp3 HTTP/1.1" 206
2026-02-25 12:24:48.105 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:35252 - "GET /static/apple-touch-icon.png HTTP/1.1" 200

Additional Information

No response

Originally created by @nileshgajare on GitHub (Feb 25, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21864 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.5 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 11 ### 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 MCP tools should work reliably as they did in Open WebUI 7.x.x. When adding an MCP server using MCP Streamable HTTP, Open WebUI should keep the GET stream stable (or handle stream lifecycle without breaking tool execution), and MCP tools should execute consistently. ### Actual Behavior In Open WebUI 8.x.x (main/latest), MCP does not work reliably (regression vs 7.x.x).  Open WebUI successfully negotiates MCP session + protocol, but the stream disconnects shortly after, triggering reconnect loops and session deletion. Observed in logs: Session negotiated successfully GET stream opens (200 OK) Then: GET stream disconnected, reconnecting... Open WebUI sends DELETE /mcp and repeats This occurs with: A custom .NET MCP server (Kestrel) using AddMcpServer().WithHttpTransport() Microsoft MCP sample (https://learn.microsoft.com/api/mcp) ### Steps to Reproduce ## **Steps to Reproduce** ### **Environment** - **OS:** Windows (Docker Desktop) - **Open WebUI:** `ghcr.io/open-webui/open-webui:main` (8.x.x) - **MCP Server:** ASP.NET Core (.NET) using `AddMcpServer().WithHttpTransport()` - **MCP Endpoint:** `http://localhost:3333/mcp` - **Browser:** Chrome (latest) --- ## **A) Reproduction with Custom .NET MCP Server** ### **1️⃣ Start Open WebUI via Docker** ```bash docker run -d \ -p 3000:8080 \ -v open-webui:/app/backend/data \ --name open-webui3 \ ghcr.io/open-webui/open-webui:main ``` ### **2️⃣ Start MCP Server (.NET Example)** ```csharp var builder = WebApplication.CreateBuilder(args); builder.Services.AddHttpContextAccessor(); builder.Services .AddMcpServer() .WithHttpTransport() .WithTools<HrmsMcpTools>(); var app = builder.Build(); app.MapMcp("/mcp"); app.Run("http://localhost:3333/"); ``` ### **3️⃣ Configure MCP in Open WebUI** 1. Go to **Settings → Tools (MCP)** 2. Click **Add MCP Server** 3. Configure: - **Type:** `MCP Streamable HTTP` - **URL:** `http://host.docker.internal:3333/mcp` - **Auth:** None (or Bearer token if required) 4. Enable the MCP server toggle ### **4️⃣ Trigger Tool Execution** 1. Open a new chat 2. Enter a prompt that triggers an MCP tool 3. Observe Docker logs --- ## **B) Reproduction with Microsoft MCP Sample** 1. Configure Open WebUI MCP using the Microsoft MCP endpoint: - `https://learn.microsoft.com/api/mcp` 2. Use: - **Type:** `MCP Streamable HTTP` 3. Trigger any tool call 4. Observe the same disconnect/reconnect behavior --- ## **Observed Log Output (Open WebUI Container)** ```text HTTP Request: POST http://host.docker.internal:3333/mcp "HTTP/1.1 200 OK" Received session ID: <session-id> Negotiated protocol version: 2025-06-18 HTTP Request: GET http://host.docker.internal:3333/mcp "HTTP/1.1 200 OK" ... mcp.client.streamable_http:handle_get_stream - GET stream disconnected, reconnecting in 1000ms... HTTP Request: DELETE http://host.docker.internal:3333/mcp "HTTP/1.1 200 OK" ``` --- ## **Result** - Session negotiates successfully - GET stream opens (`200 OK`) - Stream disconnects shortly after - Open WebUI deletes session - Reconnect loop begins --- ## **Expected Result** - Persistent GET stream should remain stable - MCP tools should execute reliably without repeated session teardown - Behavior should match Open WebUI `7.x.x` where the same setup worked correctly ### Logs & Screenshots 2026-02-25 12:24:35.728 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:56512 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2026-02-25 12:24:39.184 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: POST https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 200 OK" 2026-02-25 12:24:39.184 | INFO | mcp.client.streamable_http:_maybe_extract_session_id_from_response:181 - Received session ID: eyJjbGllbnRJbmZvIjp7Im5hbWUiOiJtY3AiLCJ0aXRsZSI6bnVsbCwidmVyc2lvbiI6IjAuMS4wIiwiaWNvbnMiOm51bGwsIndlYnNpdGVVcmwiOm51bGx9LCJ1c2VySWRDbGFpbSI6ImZhNTIwOGIzLTFhNTItNDA3NC1iZDdhLTRjZTIzZWVlNDVhNCJ9 2026-02-25 12:24:39.185 | INFO | mcp.client.streamable_http:_maybe_extract_protocol_version_from_message:193 - Negotiated protocol version: 2025-06-18 2026-02-25 12:24:39.560 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: POST https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 202 Accepted" 2026-02-25 12:24:39.586 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: GET https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 204 No Content" 2026-02-25 12:24:39.586 | INFO | mcp.client.streamable_http:handle_get_stream:298 - GET stream disconnected, reconnecting in 1000ms... 2026-02-25 12:24:40.550 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: POST https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 200 OK" 2026-02-25 12:24:40.899 | INFO | httpx._client:_send_single_request:1740 - HTTP Request: GET https://learn.microsoft.com/api/mcp⁠ "HTTP/1.1 204 No Content" 2026-02-25 12:24:48.085 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:35250 - "POST /api/chat/completed HTTP/1.1" 200 2026-02-25 12:24:48.088 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:35252 - "GET /audio/notification.mp3 HTTP/1.1" 206 2026-02-25 12:24:48.105 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 172.17.0.1:35252 - "GET /static/apple-touch-icon.png HTTP/1.1" 200 ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-05 22:43:43 -05:00
Author
Owner

@pr-validator-bot commented on GitHub (Feb 25, 2026):

⚠️ Invalid Issue Title

Hey @nileshgajare, please provide a descriptive title for your issue. Titles that are empty, very short (under 10 characters), or generic (like "issue:" or "feat:") make it difficult for volunteer contributors to understand and triage issues.

Please update the title to reflect the content of your issue.


⚠️ Missing Issue Title Prefix

@nileshgajare, your issue title is missing a prefix (e.g., bug:, feat:, docs:).

Please update your issue title to include one of the following prefixes:

  • bug: Bug report or error you've encountered
  • feat: Feature request or enhancement suggestion
  • docs: Documentation issue or improvement request
  • question: Question about usage or functionality
  • help: Request for help or support

Example: bug: Login fails when using special characters in password

<!-- gh-comment-id:3958920943 --> @pr-validator-bot commented on GitHub (Feb 25, 2026): # ⚠️ Invalid Issue Title Hey @nileshgajare, please provide a descriptive title for your issue. Titles that are empty, very short (under 10 characters), or generic (like "issue:" or "feat:") make it difficult for volunteer contributors to understand and triage issues. Please update the title to reflect the content of your issue. --- # ⚠️ Missing Issue Title Prefix @nileshgajare, your issue title is missing a prefix (e.g., `bug:`, `feat:`, `docs:`). Please update your issue title to include one of the following prefixes: - **bug**: Bug report or error you've encountered - **feat**: Feature request or enhancement suggestion - **docs**: Documentation issue or improvement request - **question**: Question about usage or functionality - **help**: Request for help or support Example: `bug: Login fails when using special characters in password`
Author
Owner

@Classic298 commented on GitHub (Feb 25, 2026):

likely duplicate of https://github.com/open-webui/open-webui/issues/21818

<!-- gh-comment-id:3958930850 --> @Classic298 commented on GitHub (Feb 25, 2026): likely duplicate of https://github.com/open-webui/open-webui/issues/21818
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58263