Skip to content

Commit 51b6382

Browse files
authored
Merge pull request #5166 from modelcontextprotocol/v2/chore/5159-release-v2.0.0
Release v2.0.0: merge v2/main into main
2 parents bbb701e + f18beb7 commit 51b6382

171 files changed

Lines changed: 10522 additions & 4553 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.

‎.changeset/config.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
33
"changelog": [
44
"@changesets/changelog-github",
5-
{ "repo": "modelcontextprotocol/servers" }
5+
{
6+
"repo": "modelcontextprotocol/servers",
7+
"template": "\n\n- {pull} {commit} {authors} - {summary}"
8+
}
69
],
710
"commit": false,
811
"fixed": [],

‎.claude/skills/board-ops/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,13 +429,17 @@ if [ -s "$BOARD_TMP/lost-ids.json" ]; then
429429
gh project item-edit --project-id PVT_kwDOCt2Azc4BcZgq --id "$id" \
430430
--field-id PVTSSF_lADOCt2Azc4BcZgqzhXCpm0 --single-select-option-id <NEW_OPTION_ID> \
431431
|| { echo "item-edit failed on $id — stopping; re-run step 1 to see what is left" >&2; break; }
432-
sleep 0.4
432+
sleep 8 # a sustained loop: see AGENTS.md "Pacing GitHub writes"
433433
done
434434
else
435435
echo "no lost-ids.json — step 1 did not complete; nothing re-applied" >&2
436436
fi
437437
```
438438

439+
Step 3 is a sustained loop, so it sleeps 8 s between edits, long enough to stay
440+
inside every limit in `AGENTS.md` **Pacing GitHub writes** for as long as it
441+
runs: a restore of 250 cards takes about 35 minutes.
442+
439443
Step 1's join is the safety check: only a card that held the deleted option in
440444
the snapshot is re-applied, so you don't overwrite a card that was already blank
441445
or that someone legitimately cleared in the meantime. Read its "NOT restored"

‎.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/issue-triage/SKILL.md‎

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ reporter is notified of each one. So:
4242
manifest** that lists each item, its class, and the issue it will point at.
4343
A wrong class is cheap to fix in a file and expensive to fix after a
4444
notification went out. Closing a single item the maintainer named is fine.
45-
- **Pace every write loop**: a few seconds between calls, and **stop on the
46-
first failed call** rather than carrying on blind. GitHub's secondary rate
47-
limit on content creation trips well before its primary one, and a loop that
45+
- **Pace every write loop** by `AGENTS.md` **Pacing GitHub writes**, and
46+
**stop on the first failed call** rather than carrying on blind. GitHub's
47+
secondary rate limit trips well before its primary one, and a loop that
4848
keeps going after a 403 leaves a half-applied batch nobody can see.
4949
- **Never restate a vulnerability in public**, not even to summarize a report
5050
that was already filed publicly. See [Security reports](#security-reports).
@@ -86,14 +86,22 @@ D=${D:-$(mktemp -d)}
8686
# Copy the class's response from Canned responses into "$D/response.md" (the
8787
# text inside the quote, with #ORIGINAL or the SDK link filled in) first.
8888
# Close as not planned, with that response (body in a file, so quoting is
89-
# safe). NOT for a duplicate: post the Duplicate response with `gh issue
90-
# comment`, close it with the `board-ops` state_reason=duplicate call, and
91-
# delete its card if it has one (`board-ops`, Delete a card). An empty or missing response stops here instead of closing silently.
89+
# safe). The comment and the close are two writes (`gh issue close --comment`
90+
# sends them back to back), and a run closes several issues, so every write
91+
# here is followed by the PR-close loop's `sleep 8`, including the last one
92+
# before the next issue. NOT for a duplicate: post the Duplicate response with
93+
# `gh issue comment`, close it with the `board-ops` state_reason=duplicate
94+
# call, and delete its card if it has one (`board-ops`, Delete a card), with
95+
# the same `sleep 8` after each of those three writes. An empty or missing
96+
# response stops here instead of closing silently.
9297
BODY=$(cat "$D/response.md") && [ -n "$BODY" ] \
93-
&& gh issue close <N> --repo modelcontextprotocol/servers --reason "not planned" --comment "$BODY" \
94-
|| { echo "no response or close failed for #<N> — stop and check it" >&2; false; }
98+
&& gh issue comment <N> --repo modelcontextprotocol/servers --body "$BODY" \
99+
&& sleep 8 \
100+
&& gh issue close <N> --repo modelcontextprotocol/servers --reason "not planned" \
101+
&& sleep 8 \
102+
|| { echo "no response, or the comment or close failed for #<N> — look before retrying" >&2; false; }
95103
# Spam or empty, the one class with no response:
96-
gh issue close <N> --repo modelcontextprotocol/servers --reason "not planned"
104+
gh issue close <N> --repo modelcontextprotocol/servers --reason "not planned" && sleep 8
97105
```
98106

99107
## Pass 1 — sweep onto the board (no approval implied)
@@ -447,13 +455,22 @@ while IFS=$'\t' read -r PR CLASS ISSUE _; do
447455
if [ -n "$SWEEP_LABEL" ]; then
448456
gh pr edit "$PR" --repo modelcontextprotocol/servers --add-label "$SWEEP_LABEL" </dev/null \
449457
|| { echo "label FAILED on #$PR — stopping" >&2; break; }
458+
sleep 8
450459
fi
451-
gh pr close "$PR" --repo modelcontextprotocol/servers --comment "$BODY" </dev/null \
452-
|| { echo "close FAILED on #$PR — stopping; re-snapshot to see what is left" >&2; break; }
453-
sleep 5
460+
# Comment and close as two writes, so each is paced: `gh pr close --comment`
461+
# sends both back to back.
462+
gh pr comment "$PR" --repo modelcontextprotocol/servers --body "$BODY" </dev/null \
463+
|| { echo "comment FAILED on #$PR — stopping; look before retrying, it may have landed" >&2; break; }
464+
sleep 8
465+
gh pr close "$PR" --repo modelcontextprotocol/servers </dev/null \
466+
|| { echo "close FAILED on #$PR (its comment is posted; close it, do not re-comment) — stopping" >&2; break; }
467+
sleep 8
454468
done < "$D/manifest.tsv"
455469
```
456470

471+
Each `sleep 8` paces a sustained loop, long enough to stay inside every limit
472+
in `AGENTS.md` **Pacing GitHub writes** for as long as the batch runs.
473+
457474
The step 0 issue closes take the same two sweep additions during the backlog
458475
sweep: the close label (`gh issue edit <N> --add-label`) and the `#4875`
459476
sentence at the end of the response, in the original comment rather than a

‎.claude/skills/local-dev/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Driving a running server with a client is `/client-smoke`; tests are
1414

1515
## Install and build
1616

17-
Node 22 for the TypeScript servers, and `uv` for the Python ones.
17+
Node 24 (the development version, and the oldest supported) for the
18+
TypeScript servers, and `uv` for the Python ones.
1819

1920
```sh
2021
npm install # at the repo root: all four TypeScript workspaces

‎.claude/skills/pr-flow/SKILL.md‎

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,40 @@ gh issue edit <N> --repo modelcontextprotocol/servers --add-assignee @me
3939

4040
## 2. Branch
4141

42-
`v2/<type>/<N>-<slug>`, cut from **`origin/v2/main`**:
42+
`v2/<type>/<N>-<slug>`, cut from **`origin/v2/main`** into a **new git
43+
worktree**, never by switching branches in the primary checkout. Several agent
44+
sessions work this repo on one machine at once and share the primary checkout:
45+
a `git switch` there moves the branch out from under every other session using
46+
it, and carries one task's uncommitted edits, `dist/` output and
47+
`node_modules` into another's. A worktree per issue gives each task its own
48+
tree and leaves the primary checkout alone.
49+
50+
Run it from the primary checkout. The worktree is a **sibling** directory named
51+
for the checkout plus the issue number (`servers` → `../servers-4810`), never a
52+
directory inside the repo, where every format, lint and typecheck scope would
53+
see a second copy of the source:
4354

4455
```sh
4556
git fetch origin v2/main
46-
git switch -c v2/fix/4810-filesystem-symlink-escape origin/v2/main
57+
git worktree add --no-track "../$(basename "$PWD")-4810" \
58+
-b v2/fix/4810-filesystem-symlink-escape origin/v2/main
59+
cd "../$(basename "$PWD")-4810"
60+
npm install
4761
```
4862

63+
- `--no-track` keeps the new branch from tracking `origin/v2/main`, so
64+
`git status` does not report your work as "ahead of v2/main", and the first
65+
push is an explicit `git push -u origin <branch>` to a branch of its own name.
66+
- ⚠️ **The `npm install` is part of the step.** A worktree starts with no
67+
`node_modules`, no `dist/` and no `.venv` (`/local-dev`). The root install
68+
builds every TypeScript server; a Python server builds its `.venv` on its
69+
first `uv run`. Background the install if you have edits to make first; the
70+
gate needs it finished.
71+
- Every later step (edits, the gate, commits, the push) runs **inside the
72+
worktree**.
73+
- The harness's `EnterWorktree` tool, where available, does the same; name the
74+
branch by the rule above.
75+
4976
`<type>` follows the issue's type label: `bug` → `fix`, `enhancement` → `feat`,
5077
`documentation` → `docs`, `chore` → `chore`. A `question` has no branch type,
5178
because answering one ships nothing: if it turns out to need a change, relabel
@@ -56,10 +83,11 @@ branch and keeps the work legible in `git branch -a` next to `main`.
5683
history, so the PR diff would show unrelated changes.
5784

5885
**Stacking.** When one issue's work depends on another PR that has not merged
59-
yet, branch from that PR's branch and open the PR with `--base` set to it. Say
60-
in the body that it is stacked and on which PR. When the lower PR merges,
61-
retarget the stacked one to `v2/main` (`gh pr edit <PR> --base v2/main`) and
62-
rebase it if GitHub reports conflicts.
86+
yet, branch from that PR's branch (its worktree is cut from it:
87+
`git worktree add … -b <child> <parent-branch>`) and open the PR with `--base`
88+
set to it. Say in the body that it is stacked and on which PR. When the lower
89+
PR merges, retarget the stacked one to `v2/main`
90+
(`gh pr edit <PR> --base v2/main`) and rebase it if GitHub reports conflicts.
6391

6492
## 3. Sign off every commit (DCO)
6593

@@ -310,6 +338,9 @@ worth doing on its own. Implementing a suggestion differently is fine.
310338
-f body='Fixed in <sha>: …'
311339
```
312340

341+
A round with many comments is a bulk write: send the replies one at a time,
342+
paced by `AGENTS.md` **Pacing GitHub writes**.
343+
313344
- ⚠️ **Then post a PR-level summary of the round, in addition, never instead.**
314345
Inline replies go hidden once the fix is pushed, because the threads become
315346
outdated, so the summary is what keeps the round readable afterwards. It does
@@ -391,3 +422,16 @@ issue will not be done, the issue shipped nothing: close it as not planned and
391422
**delete its card** (`/board-ops`) rather than moving it to Done.
392423
393424
If PRs were stacked on this one, retarget each to `v2/main` (step 2).
425+
426+
**Then remove the worktree and its local branch**, from the primary checkout,
427+
once the PR shows as merged (or closed, for abandoned work). A stale worktree
428+
keeps its branch checked out, so git refuses to check that branch out anywhere
429+
else, and it holds a full `node_modules` on disk per issue:
430+
431+
```sh
432+
git worktree remove "../$(basename "$PWD")-<N>"
433+
git branch -D v2/<type>/<N>-<slug>
434+
```
435+
436+
`git worktree remove` refuses a worktree with uncommitted or untracked changes;
437+
read what is there before reaching for `--force`.

‎.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)