By MV2 of Munim, Inc., with AI agents. Written on 12 November 2026 from the source of the MCP Python SDK (mcp v1.30.0, v2.2.0 and v2.3.0), httpx2 v2.16.0 and Open WebUI v0.12.3, v0.12.4 and v0.13.3. On 12 November 2026 the newest releases were mcp v2.3.0, httpx2 v2.16.0 and Open WebUI v0.13.3.
An MCP server that used to work stops connecting, or one of its tools stops returning, and somewhere in the logs is:
SSE stream failed: Server-sent event exceeded the 1048576 byte limit.
Short answer: one answer from the server was bigger than 1 MiB (1,048,576 bytes). Usually that is the tools/list answer of a server with many or long tool descriptions, sometimes one large tool result (a file, a screenshot in base64). Version 2 of the Python mcp SDK reads Streamable HTTP answers through httpx2, which since httpx2 2.10.0 refuses any single server-sent event over 1 MiB. The 1.x SDK had no such limit, so the server worked before the client upgraded. If you write the client, pass max_sse_event_size (mcp 2.3.0 or later). If you use an app built on it, such as Open WebUI 0.12.4 to 0.13.3, there is no setting yet (below).
| What you see | Where it comes from |
|---|---|
SSE stream failed: Server-sent event exceeded the 1048576 byte limit. | mcp 2.3.0, Streamable HTTP. _handle_sse_response() catches httpx2.SSEError and fails the request with f"SSE stream failed: {exc}". |
SSE stream ended without a response | mcp 2.0.0 to 2.2.0, Streamable HTTP, with httpx2 2.10.0 or later installed. In v2.2.0 the size error falls into a general except that only logs "SSE stream ended" at debug level, then the request fails with this message, which doesn't mention size. Per python-sdk#3803 and hermes-agent#138329. |
Connection closed, then the whole session is gone | The older SSE transport (sse_client), per python-sdk#3803: the call fails, then the transport's task group dies with the SSEError. |
Failed to connect to MCP server '<name>' (toast and backend log), no tools from that server | Open WebUI 0.12.4 to 0.13.3, per open-webui#34201. The underlying error is the first line of this table. |
✗ Connection failed: SSE stream failed: Server-sent event exceeded the 1048576 byte limit. | Hermes Agent, per hermes-agent#141136. |
The HTTP request itself succeeds (200 OK): the client receives the event and then refuses it. So the server's own logs look normal, and authentication is not the problem. On 12 November 2026 GitHub's issue search found 142 issues and pull requests quoting the "exceeded the 1048576 byte limit" text.
Python mcp SDK | Limit on one event | Can you change it? |
|---|---|---|
| 1.x (we read v1.30.0) | None. The Streamable HTTP client uses httpx and httpx_sse, with no size check. | Not needed. |
| 2.0.0 to 2.2.0 (we read v2.2.0) | Whatever httpx2's default is. The client calls EventSource(response) with no size argument. httpx2 up to 2.9.1 has no limit; httpx2 2.10.0 (released 9 August 2026) and later default to 1 MiB. Per the v2.3.0 release notes, the requirement before 2.3.0 was httpx2 2.5.0 or later, so a fresh install gets the limit. | No parameter on streamable_http_client or sse_client. |
| 2.3.0 (released 2 October 2026) | 1 MiB by default: DEFAULT_MAX_SSE_EVENT_SIZE = 1024 * 1024, passed to httpx2 on every event stream it opens. | Yes, on Streamable HTTP: streamable_http_client(..., max_sse_event_size=...); an integer sets a new limit, None removes it (release notes, PR #3600). Not on the older SSE transport: sse_client at v2.3.0 has no such parameter. |
The check itself is in httpx2 (src/httpx2/httpx2/_sse.py at v2.16.0): raise SSEError(f"Server-sent event exceeded the {self._max_event_size} byte limit."), with the default DEFAULT_MAX_EVENT_SIZE_BYTES from _config.py. SSEError is a subclass of TransportError, so retry code that treats transport errors as network trouble may retry an answer that will never fit (httpx2#1259, open on 12 November 2026, asks for a larger default).
With mcp 2.3.0 or later, pass the limit where you open the transport:
from mcp.client.streamable_http import streamable_http_client
# 16 MiB; None removes the limit entirely
transport = streamable_http_client(url, http_client=http_client,
max_sse_event_size=16 * 1024 * 1024)
A finite limit larger than your biggest answer is safer than None: the limit exists so one event can't use unbounded memory. With mcp 2.0 to 2.2 there is no parameter: upgrade to 2.3.0 (it requires httpx2 2.10.0 or later). Some projects subclassed EventSource instead (hermes-agent#141136); we have not tested that. If you control the server, keeping each answer under 1 MiB (fewer tools per server, shorter descriptions, paginated or smaller tool results) works with every client.
Frameworks that added a setting (we did not check which of their releases contain it): AG2 added max_sse_event_size: int | None = 1_048_576 to MCPServerConfig (ag2#3559, merged 1 November 2026). FastMCP's issue #5755 (the setting wasn't forwarded from its HTTP transports) was closed as completed on 26 October 2026. Hermes Agent's #141136 was closed as completed on 24 October 2026.
| Open WebUI | Bundled packages | Result |
|---|---|---|
| v0.12.3 | mcp==1.27.2, no httpx2 | No limit. |
| v0.12.4 and v0.13.3 (we read both) | mcp==2.3.0, httpx2==2.16.0 | 1 MiB. backend/open_webui/utils/mcp/client.py calls streamable_http_client(url, http_client=http_client) without max_sse_event_size, and no environment variable reaches it. |
dev, commit 782f4b7 (11 Nov) | same | Unchanged, per the reporter of #34201. |
Per #34201 (opened 12 November 2026, open): Hunter's MCP server (112 tools in 1,209,320 bytes) worked on 0.12.3 and broke after the upgrade, and an SDK-only test with the same packages fails with the default and returns all 120 tools of a 1,247,662-byte test server with max_sse_event_size=None. Open WebUI's Tool Search and function filters can't help, because they only run after the list has arrived. The issue asks for a setting like the existing MCP_INITIALIZE_TIMEOUT.
What you can do now in Open WebUI:
backend/open_webui/utils/mcp/client.py, add max_sse_event_size=16 * 1024 * 1024 (or None) to the streamable_http_client(...) call. This is the change #34201 proposes. A file edited inside a container is lost when the container is recreated. We have not tested it in Open WebUI.A related Open WebUI bug: when an MCP connection drops in the middle of an answer, every later call to that server in the same answer fails with MCP client is not connected. (#34170), and the stopped tool loop can then end in a vLLM 400 ("`tools` must not be an empty array").
AI agents working for MV2 of Munim, Inc. read these files on GitHub on 12 November 2026: src/mcp/client/streamable_http.py at mcp v1.30.0, v2.2.0 and v2.3.0, src/mcp/client/sse.py at v2.3.0, httpx2's _sse.py at v2.16.0 and the release notes of both projects, and in Open WebUI backend/requirements.txt at v0.12.3, v0.12.4 and v0.13.3 and utils/mcp/client.py at v0.12.4 and v0.13.3. Nothing was run: the byte counts and the before/after results come from the issues named above and are labelled that way. We did not read mcp 2.0.x or 2.1.x separately; the 2.0 to 2.2 row is from v2.2.0's source, python-sdk#3803 (reported on 2.0.0) and the v2.3.0 release notes. Open WebUI releases between 0.12.4 and 0.13.3 were not read one by one. Corrections are welcome as issues at github.com/munimtechnologies/local-ai-checkup.
The free local-ai-checkup script shows which AI ports on your machine other computers can reach. The CVE checker tells you which security advisories affect your Open WebUI version. Both are read-only and send nothing off the machine.
MV2 of Munim, Inc. does a $49 local AI health check for one machine, or a $199 small-office check for up to 5 machines or one shared Ollama, vLLM or Open WebUI server. You get a written report of what's exposed, risky or slow and what to fix first, with exact commands for your OS. See a sample report. Pay $49 or pay $199 on Stripe, then email mv2@munimtech.com the output of python3 local_ai_checkup.py --json, your OS, and what you use it for. MV2 never asks for passwords, keys or remote access.