mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[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) #35126
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 @nileshgajare on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21864
Check Existing Issues
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
README.md.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
ghcr.io/open-webui/open-webui:main(8.x.x)AddMcpServer().WithHttpTransport()http://localhost:3333/mcpA) Reproduction with Custom .NET MCP Server
1️⃣ Start Open WebUI via Docker
2️⃣ Start MCP Server (.NET Example)
3️⃣ Configure MCP in Open WebUI
MCP Streamable HTTPhttp://host.docker.internal:3333/mcp4️⃣ Trigger Tool Execution
B) Reproduction with Microsoft MCP Sample
https://learn.microsoft.com/api/mcpMCP Streamable HTTPObserved Log Output (Open WebUI Container)
Result
200 OK)Expected Result
7.x.xwhere the same setup worked correctlyLogs & 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
@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:
Example:
bug: Login fails when using special characters in password@Classic298 commented on GitHub (Feb 25, 2026):
likely duplicate of https://github.com/open-webui/open-webui/issues/21818