You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 780f0c9
Browse filesBrowse the repository at this point in the historyBrowse files
docs(everything): keep the README tables' form and link the reporter without a mention
The idle-session change had re-aligned both environment-variable tables in
the README, which Markdown is not formatted for in this repo, so the diff
touched the unrelated GZIP table. The tables are back in their existing
form, with only the SESSION_IDLE_TIMEOUT_MILLIS row added. The changeset
credits the reporter with a profile link rather than a bare mention, which
would notify them from the changelog and from every regeneration of the
Version Packages PR.
Part of #5558
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
Copy file name to clipboardExpand all lines: .changeset/everything-evict-idle-sessions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"@modelcontextprotocol/server-everything": minor
3
3
---
4
4
5
-
The Streamable HTTP transport now evicts a 2025-era session that has been idle for 30 minutes: one with no request in flight and no stream open. Until now a session whose client never sent a DELETE stayed in memory, with its server instance, for the life of the process. An evicted session's next request is answered `404 Session not found`, the spec's signal for the client to initialize again. Set the new `SESSION_IDLE_TIMEOUT_MILLIS` environment variable to change the timeout, or to `0` to keep sessions until their client ends them. 2026-07-28 clients have no sessions and are unaffected. Thanks to @Pierpaolo1223 for the report and the measurements in [#5558](https://github.com/modelcontextprotocol/servers/issues/5558).
5
+
The Streamable HTTP transport now evicts a 2025-era session that has been idle for 30 minutes: one with no request in flight and no stream open. Until now a session whose client never sent a DELETE stayed in memory, with its server instance, for the life of the process. An evicted session's next request is answered `404 Session not found`, the spec's signal for the client to initialize again. Set the new `SESSION_IDLE_TIMEOUT_MILLIS` environment variable to change the timeout, or to `0` to keep sessions until their client ends them. 2026-07-28 clients have no sessions and are unaffected. Thanks to [Pierpaolo1223](https://github.com/Pierpaolo1223) for the report and the measurements in [#5558](https://github.com/modelcontextprotocol/servers/issues/5558).
|`GZIP_MAX_FETCH_SIZE`| 10 MiB | The largest response, in bytes, it reads|
38
-
|`GZIP_MAX_FETCH_TIME_MILLIS`| 30000 | How long a fetch may take, redirects included|
39
-
|`GZIP_ALLOWED_DOMAINS`| empty (any name) | Comma-separated host names; a host must be one of them or a subdomain of one. Checked on the caller's URL and on every redirect hop |
40
-
|`GZIP_ALLOW_PRIVATE_IPS`| off | Set to `1` or `true` to allow loopback, private (RFC 1918), CGNAT, link-local (cloud metadata) and other non-public addresses|
35
+
| Variable | Default | Effect |
36
+
| --- | --- | --- |
37
+
|`GZIP_MAX_FETCH_SIZE`| 10 MiB | The largest response, in bytes, it reads |
38
+
|`GZIP_MAX_FETCH_TIME_MILLIS`| 30000 | How long a fetch may take, redirects included |
39
+
|`GZIP_ALLOWED_DOMAINS`| empty (any name) | Comma-separated host names; a host must be one of them or a subdomain of one. Checked on the caller's URL and on every redirect hop |
40
+
|`GZIP_ALLOW_PRIVATE_IPS`| off | Set to `1` or `true` to allow loopback, private (RFC 1918), CGNAT, link-local (cloud metadata) and other non-public addresses |
41
41
42
42
By default the tool refuses a URL whose host resolves to a non-public address, and follows at most five redirects, checking each hop the same way. An IPv6 address that wraps an IPv4 one (IPv4-mapped, IPv4-translated, or in the NAT64 prefix `64:ff9b::/96`) is judged by that IPv4, and any other IPv6 address outside global unicast (`2000::/3`) is refused. `GZIP_ALLOWED_DOMAINS` filters names, not addresses: a listed name that resolves to a private address is still refused unless `GZIP_ALLOW_PRIVATE_IPS` is set. The address is checked before the request and resolved again when it is made, so a DNS answer that changes in between (DNS rebinding) is not caught. `data:` URLs are not fetched, so neither check applies to them.
43
43
@@ -129,10 +129,10 @@ The endpoint is `http://localhost:3001/mcp` (`PORT` overrides the port). It serv
129
129
130
130
Both HTTP transports (Streamable HTTP and HTTP+SSE) listen on the loopback interface, `127.0.0.1`, by default, so only clients on the same machine can reach them. Set `HOST` to bind another address: `HOST=0.0.0.0` listens on every interface, which exposes the server's tools to every host that can reach the machine, so set it only on a network you trust. The listening line the server prints names the address and port it bound, such as `127.0.0.1:3001`.
|`PORT`|`3001`| The port the HTTP transport listens on|
135
-
|`HOST`|`127.0.0.1`| The address it binds; `0.0.0.0` (or `::`) for every interface|
132
+
| Variable | Default | Effect |
133
+
| --- | --- | --- |
134
+
|`PORT`|`3001`| The port the HTTP transport listens on |
135
+
|`HOST`|`127.0.0.1`| The address it binds; `0.0.0.0` (or `::`) for every interface |
136
136
|`SESSION_IDLE_TIMEOUT_MILLIS`|`1800000` (30 minutes) | Streamable HTTP only: how long a 2025-era session may sit idle before the server ends it; `0` never ends one |
137
137
138
138
A 2025-era Streamable HTTP session normally ends when its client sends a `DELETE`. One whose client goes away without doing so is ended by the server once it has been idle for `SESSION_IDLE_TIMEOUT_MILLIS`: its server instance is closed and its timers and subscriptions are released. Idle means no request in flight and no stream open, so a client that keeps its `GET` stream open, or is waiting on a long tool call, is never timed out; the clock starts when the session's last response closes, and idle sessions are looked for every tenth of the timeout (no less than a second and no more than a minute apart), so one is ended that much late at most. A request for a session the server has ended is answered `404 Not Found` (`Session not found`), which is the [specification's signal](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management) for the client to start a new session with a fresh `initialize`. Set a short timeout to exercise that path in a client under test, or `0` to keep every session until its client ends it. A value that is not a non-negative number is ignored in favor of the default. 2026-07-28 clients have no sessions, and an HTTP+SSE session ends when its stream's connection closes, so neither is affected.
0 commit comments