Implement MCP 2026-07-28 (#2286)
Co-authored-by: Matt <77928207+mattzcarey@users.noreply.github.com> Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
e4227d135c
commit
1823aae891
1 changed files with 69131 additions and 9001 deletions
12
examples/dual-era/README.md
Normal file
12
examples/dual-era/README.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# dual-era
|
||||
|
||||
One server factory, both protocol eras (2025 `initialize` and 2026-07-28 per-request envelope), both transports (stdio and Streamable HTTP). The client connects once as a plain 2025 client and once with `versionNegotiation: { mode: 'auto' }`; the same `greet` tool answers both
|
||||
and reports which era served the call.
|
||||
|
||||
This is the recommended **first** example to read if you are migrating an existing server to the 2026 era: the entry (`serveStdio` / `createMcpHandler`) owns the era decision, the factory is era-agnostic.
|
||||
|
||||
```bash
|
||||
pnpm tsx examples/dual-era/client.ts # stdio
|
||||
pnpm tsx examples/dual-era/server.ts --http --port 3000 # term 1
|
||||
pnpm tsx examples/dual-era/client.ts --http http://127.0.0.1:3000/ # term 2
|
||||
```
|
||||
Loading…
Reference in a new issue