Repository navigation
Commit 7fb140a
Your Name
Fix modelcontextprotocol#3267: Add DISABLE_SSE_RESUMABILITY option to work around empty SSE event parsing issues
When connecting with protocol version 2025-11-25+, the everything server
sends an empty SSE priming event as required by SEP-1699 for resumability
support. However, some clients (like the Java MCP client) don't properly
handle empty SSE data events per the SSE specification, causing
deserialization failures.
This commit adds a DISABLE_SSE_RESUMABILITY environment variable that
allows users to disable the eventStore, preventing the priming event from
being sent. This is a workaround for clients that don't properly handle
empty SSE events.
Users can now disable resumability with:
DISABLE_SSE_RESUMABILITY=true npx @modelcontextprotocol/server-everything streamableHttp
Changes:
- Modified streamableHttp.ts to check DISABLE_SSE_RESUMABILITY env var
- Only create eventStore if resumability is enabled
- Updated README.md with documentation and usage examples
The proper fix is still to update affected clients to handle empty SSE
events correctly per the SSE standard.1 parent a83b145 commit 7fb140a
2 files changed
Lines changed: 41 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | | - | |
| 88 | + | |
79 | 89 | | |
80 | 90 | | |
81 | 91 | | |
| |||
0 commit comments