Skip to content

Commit 9bb47c9

Browse files
committed
Merge upstream v2/main and verify append tools in both eras
Signed-off-by: Benyamin <[email protected]>
2 parents b545744 + 6d613ec commit 9bb47c9

148 files changed

Lines changed: 8935 additions & 3783 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-everything": minor
3+
---
4+
5+
Serve the 2026-07-28 protocol revision alongside the 2025 era (#4852), over stdio (`serveStdio`) and Streamable HTTP (one `/mcp` endpoint: `createMcpHandler` for 2026-07-28 requests, the existing sessionful transport for 2025-era clients). New for 2026-07-28 clients: `server/discover`, multi-round-trip requests (`input_required`) for the elicitation, sampling and roots tools, `subscriptions/listen` change notifications, cache hints (`ttlMs` / `cacheScope`), and the tasks extension (`io.modelcontextprotocol/tasks`, advertised under `capabilities.extensions`), on which `simulate-research-query`, `trigger-sampling-request-async` and `trigger-elicitation-request-async` return. New tools on both eras: `trigger-multi-step-elicitation` (`requestState` across rounds), `trigger-log-messages` (per-request log levels), `trigger-list-changed`, `trigger-resource-update`, and `get-header-params` (`x-mcp-header` and JSON Schema 2020-12 schemas). `toggle-simulated-logging` and `toggle-subscriber-updates` are offered to 2025-era clients only, labelled deprecated with the roots, sampling and logging tools. For 2025-era clients: `get-roots-list` asks the client for its roots on every call; a failed sampling, elicitation or roots request is reported as `Fulfilling input required by 'tools/call' failed: <message>`; a read of a dynamic resource with an invalid id is answered `-32602` with the URI in `data`; and the toggle tools' messages and the subscription acknowledgements no longer name a session id. `gzip-file-as-resource` limits its `name` argument to 255 characters. The HTTP+SSE transport prints a deprecation warning on start.

‎.changeset/everything-sdk-v2.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-everything": major
3+
---
4+
5+
Move to the TypeScript SDK v2 packages (`@modelcontextprotocol/server`, `@modelcontextprotocol/node`, and `@modelcontextprotocol/server-legacy` for the deprecated HTTP+SSE transport) from `@modelcontextprotocol/sdk` 1.x (#4856). The task tools `simulate-research-query`, `trigger-sampling-request-async` and `trigger-elicitation-request-async` are removed, and the server no longer advertises the `tasks` capability, because SDK v2 dropped the experimental tasks layer they were built on; they return on the tasks extension in #4852. Breaking for clients: the server now requires Node.js 20 or later; over stdio, a single incoming JSON-RPC message larger than 10 MiB now closes the connection (the SDK v2 default read-buffer cap; SDK 1.x buffered without a limit); an unknown tool name is rejected with JSON-RPC error `-32602` instead of returning an `isError` result; error messages no longer carry the `MCP error <code>: ` prefix, and input-validation messages name the field first (`field: message`); tool schemas in `tools/list` declare JSON Schema 2020-12 instead of draft-07; and tools no longer advertise `execution.taskSupport`. The optional `state` argument of `args-prompt` now carries its description.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-filesystem": minor
3+
---
4+
5+
Serve the 2026-07-28 protocol revision alongside the 2025 era on stdio, through the SDK's `serveStdio` entry (#4852). A 2026-07-28 connection has no `initialize` and no server-to-client `roots/list`, and Roots is deprecated as of that revision, so the command-line directories are its whole allow-list; a server started with none answers each tool call on such a connection with an error saying so. 2025-era clients keep the Roots behavior they had. The README now recommends command-line directories over Roots (#4844).

‎.changeset/filesystem-sdk-v2.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-filesystem": major
3+
---
4+
5+
Move to the TypeScript SDK v2 packages (`@modelcontextprotocol/server`) from `@modelcontextprotocol/sdk` 1.x (#4856). Breaking for clients: the server now requires Node.js 20 or later; over stdio, a single incoming JSON-RPC message larger than 10 MiB now closes the connection (the SDK v2 default read-buffer cap; SDK 1.x buffered without a limit); an unknown tool name is rejected with JSON-RPC error `-32602` instead of returning an `isError` result; error messages no longer carry the `MCP error <code>: ` prefix, and input-validation messages name the field first (`field: message`); and tools no longer advertise `execution.taskSupport`.

‎.changeset/memory-modern-era.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-memory": minor
3+
---
4+
5+
Serve the 2026-07-28 protocol revision alongside the 2025 era on stdio, through the SDK's `serveStdio` entry (#4852). A 2026-07-28 client gets `notifications/resources/updated` for `memory://knowledge-graph` on a `subscriptions/listen` stream whose `resourceSubscriptions` name it; 2025-era clients still subscribe with `resources/subscribe`.

‎.changeset/memory-sdk-v2.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-memory": major
3+
---
4+
5+
Move to the TypeScript SDK v2 packages (`@modelcontextprotocol/server`) from `@modelcontextprotocol/sdk` 1.x (#4856). Breaking for clients: the server now requires Node.js 20 or later; over stdio, a single incoming JSON-RPC message larger than 10 MiB now closes the connection (the SDK v2 default read-buffer cap; SDK 1.x buffered without a limit); an unknown tool name is rejected with JSON-RPC error `-32602` instead of returning an `isError` result; error messages no longer carry the `MCP error <code>: ` prefix, and input-validation messages name the field first (`field: message`); tool schemas in `tools/list` declare JSON Schema 2020-12 instead of draft-07; and tools no longer advertise `execution.taskSupport`.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-sequential-thinking": minor
3+
---
4+
5+
Serve the 2026-07-28 protocol revision alongside the 2025 era on stdio, through the SDK's `serveStdio` entry (#4852). The thought history lasts as long as the client's connection, on either era.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-sequential-thinking": major
3+
---
4+
5+
Move to the TypeScript SDK v2 packages (`@modelcontextprotocol/server`) from `@modelcontextprotocol/sdk` 1.x (#4856). Breaking for clients: the server now requires Node.js 20 or later; over stdio, a single incoming JSON-RPC message larger than 10 MiB now closes the connection (the SDK v2 default read-buffer cap; SDK 1.x buffered without a limit); an unknown tool name is rejected with JSON-RPC error `-32602` instead of returning an `isError` result; error messages no longer carry the `MCP error <code>: ` prefix, and input-validation messages name the field first (`field: message`); tool schemas in `tools/list` declare JSON Schema 2020-12 instead of draft-07; and tools no longer advertise `execution.taskSupport`.

‎.claude/skills/client-smoke/SKILL.md‎

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -172,27 +172,27 @@ CLI) or **Server Settings → Protocol Era** (the web UI):
172172
| `modern` | Pins 2026-07-28 through `server/discover`, with no fallback |
173173
| `auto` | Probes `server/discover`, and falls back to `initialize` |
174174

175-
⚠️ **Only the legacy era can be exercised against these servers today.** All
176-
seven are on a v1 SDK (`@modelcontextprotocol/sdk` 1.x, `mcp` 1.x), whose
177-
newest protocol version is 2025-11-25. None implements `server/discover`. So:
178-
179-
- `--protocol-era modern` fails, by design, with `Version negotiation failed:
180-
the server did not offer pinned protocol version 2026-07-28 via
181-
server/discover (no fallback in pin mode)` and exit 1. That is the expected
182-
result for an unmigrated server, not a regression in your change.
183-
- `--protocol-era auto` succeeds, but through the fallback, so it is a legacy
184-
connection and proves nothing about 2026-07-28.
185-
186-
The both-eras check that `/pr-flow` asks for (#4857) therefore has one half
187-
that can pass today. For a server that does not yet serve the modern era,
188-
record the legacy run, and say in the PR that the server does not yet speak
189-
2026-07-28 rather than leaving the modern era unmentioned. Moving a server to
190-
a v2 SDK (#4856 for TypeScript, #4851 for Python) does not change that by
191-
itself: those keep the legacy wire behavior. Modern-era support arrives with
192-
#4852 (TypeScript) and #4853 (Python). Once a server has it, run every command
193-
twice, with `--protocol-era legacy` and `--protocol-era modern`, and expect
194-
both to succeed. Do not use `auto` for evidence in either case: it
195-
does not say which era answered.
175+
**Every server serves both eras**: the Python servers since #4853, the
176+
TypeScript servers since #4852 (stdio through the SDK's `serveStdio`, and
177+
`everything`'s Streamable HTTP endpoint through `createMcpHandler` for
178+
2026-07-28 requests). Run every command twice, with `--protocol-era legacy`
179+
and `--protocol-era modern`, and expect both to succeed. A 2026-07-28 result
180+
carries `io.modelcontextprotocol/serverInfo` in its `_meta`, which is the
181+
quick way to see which era answered. Do not use `auto` for evidence: it does
182+
not say which era answered.
183+
184+
`everything` lists some tools on one era only (the task tools on 2026-07-28,
185+
the two `toggle-*` tools on the 2025 era), so a `tools/list` that differs
186+
between the two runs is expected.
187+
188+
The CLI declares no client capabilities, so a tool that asks the client for
189+
input (elicitation, sampling, roots) cannot run from it: on the 2025 era
190+
`everything` does not list it (`tool_not_found`, exit 5), and on 2026-07-28
191+
the SDK refuses the call because the request did not declare the capability
192+
(`Cannot request input 'form' (elicitation/create): the request's client
193+
capabilities do not declare the required capability`, exit 1). Drive those
194+
from the web UI. On 2026-07-28 the CLI does follow a task handle: a call to
195+
`simulate-research-query` polls the task and prints its final result.
196196

197197
## The Inspector web UI
198198

@@ -259,8 +259,10 @@ Claude Code, run this way, has no era switch and does not print the protocol
259259
version it negotiated. `/pr-flow` asks for the LLM client in both eras as well;
260260
where the client gives no way to choose, record the client and its version and
261261
say that the era could not be selected, rather than labelling the run with an
262-
era it was not shown to use. Against a v1-SDK server the connection is legacy
263-
whatever the client prefers, for the reason given under Protocol eras.
262+
era it was not shown to use. `everything` shows which era a client
263+
negotiated through its tool list: a 2026-07-28 client sees
264+
`simulate-research-query` and no `toggle-*` tools, a 2025-era client the
265+
reverse. Claude Code 2.1.296 negotiates 2026-07-28 against these servers.
264266

265267
## What to write down
266268

‎.claude/skills/pre-push-gate/SKILL.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,31 @@ of the server's stderr. Re-run a subset with
273273
- **A new server fails `test:scripts`** with "every server directory in the
274274
repo has a smoke entry": add it to `SERVERS` in `scripts/smoke-servers.mjs`.
275275

276+
### `interface-diff`
277+
278+
The last stage diffs the `everything` server's MCP interface (capabilities,
279+
tools, prompts, resources, resource templates) in this checkout's build
280+
against the same server built from the merge-base with `origin/v2/main`, and
281+
prints the report. **A changed interface does not fail it**: the report is
282+
what the PR's sticky comment will show, so read it, and if a change is not
283+
one you meant, that is the finding. It fails only when the diff cannot run,
284+
with `❌ The interface diff could not run` and the reason:
285+
286+
- **"origin/v2/main is not available"**: `git fetch origin v2/main`.
287+
- **"src/everything/dist/index.js does not exist"**: you ran it on its own
288+
before building: `npm run build -w src/everything`.
289+
- **An `npm ci` or `npm run build` failure**: the _base_ did not install or
290+
build. Offline with a cold npm cache is the usual cause; otherwise name a
291+
base that builds with `npm run interface-diff -- --base <ref>`.
292+
- **"Base server probe failed" / "Target probe failed"**: a server did not
293+
answer the probe. A target failure is this checkout's server and is the
294+
real defect; the smoke stage before it usually fails first.
295+
296+
Re-run it on its own with `npm run interface-diff` (about ten seconds). What
297+
it compares against in CI, and why it is a script rather than an action, is
298+
in [`docs/quality-gate.md`](../../../docs/quality-gate.md) and the header of
299+
`scripts/interface-diff.mjs`.
300+
276301
## Waiting on the lease
277302

278303
A gate that starts with

0 commit comments

Comments
 (0)