Skip to content

Commit 7fe8867

Browse files
authored
[Docs][Examples][CI] Document and gate the 2026-07-28 lifecycle (#457)
docs/stateless-lifecycle.md walks the revision end to end - per-request _meta, server/discover, multi round-trip requests, caching and subscriptions - and a runnable example on each side shows what that looks like in code. CI matrixes both conformance roles over both revisions. --spec-version is cumulative across the dated revisions, so 2025-11-25 covers the two before it; 2026-07-28 is not cumulative with them and needs its own run against its own baseline. The runner is pinned so a PR only goes red for reasons in the PR, and conformance-weekly tracks the moving target instead - on both revisions, since the draft scenarios ship only on the alpha dist-tag. The Inspector cannot reach a modern-lifecycle server (it opens with initialize), so the example is covered by integration tests instead: one drives it with hand-built HTTP the way a conforming client would, one drives it with this SDK's client, and one drives the single endpoint from both eras.
1 parent 8c06dce commit 7fe8867

15 files changed

Lines changed: 1300 additions & 6 deletions

.github/workflows/conformance-weekly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
baseline: conformance-baseline-2025-11-25.yml
2727
- spec-version: '2026-07-28'
2828
dist-tag: alpha
29-
path: '/stateless'
29+
path: '/'
3030
baseline: conformance-baseline-2026-07-28.yml
3131
steps:
3232
- uses: actions/checkout@v7

.github/workflows/pipeline.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
path: '/'
110110
baseline: conformance-baseline-2025-11-25.yml
111111
- spec-version: '2026-07-28'
112-
path: '/stateless'
112+
path: '/'
113113
baseline: conformance-baseline-2026-07-28.yml
114114

115115
steps:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ examples/**/cache
88
examples/**/sessions
99
tests/Conformance/client-conformance.json
1010
tests/Conformance/server-conformance.json
11-
tests/Conformance/results
11+
tests/Conformance/results*
1212
tests/Conformance/sessions
1313
tests/Conformance/logs/*.log
1414

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ conformance-draft-server:
5555
@echo "Waiting for server to start..."
5656
@sleep 5
5757
rm -rf tests/Conformance/results-2026-07-28
58-
cd tests/Conformance && $(CONFORMANCE) server --url http://localhost:8000/stateless --suite all --spec-version 2026-07-28 --expected-failures conformance-baseline-2026-07-28.yml --output-dir results-2026-07-28 || true
58+
cd tests/Conformance && $(CONFORMANCE) server --url http://localhost:8000/ --suite all --spec-version 2026-07-28 --expected-failures conformance-baseline-2026-07-28.yml --output-dir results-2026-07-28 || true
5959
php tests/Conformance/score.php server 2026-07-28 results-2026-07-28
6060
docker compose -f tests/Conformance/Fixtures/docker-compose.yml down
6161

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- [MCP Elements](mcp-elements.md) — Core capabilities (Tools, Resources, Resource Templates, and Prompts) with registration methods.
44
- [Server Builder](server-builder.md) — Fluent builder class for creating and configuring MCP server instances.
55
- [Client](client.md) — Client SDK for connecting to and communicating with MCP servers.
6+
- [The 2026-07-28 Lifecycle](stateless-lifecycle.md) — The stateless protocol revision: per-request metadata, `server/discover`, multi round-trip requests, caching and subscriptions.
67
- [Transports](transports.md) — STDIO and HTTP transport implementations with guidance on choosing between them.
78
- [Server-Client Communication](server-client-communication.md) — Methods for servers to communicate back to clients: sampling, logging, progress, and notifications.
89
- [Protocol Extensions](extensions.md) — Opt-in protocol extensions announced during capability negotiation, including MCP Apps (HTML UI resources).

docs/server-client-communication.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Client Communication
22

3-
MCP supports various ways a server can communicate back to a server on top of the main request-response flow.
3+
MCP supports various ways a server can communicate back to a client on top of the main request-response flow.
4+
5+
> **Protocol revision `2026-07-28`.** This page describes the handshake era, where a server sends its own
6+
> JSON-RPC requests to the client. The modern lifecycle removed that: sampling, elicitation and roots are
7+
> carried back inside the *result* instead, and `ClientGateway::sample()`, `elicit()` and `listRoots()`
8+
> raise a `LogicException` there. Logging and progress still work as described below — they simply travel
9+
> on the request's own response stream, and the client opts into each. See
10+
> [The 2026-07-28 Lifecycle](stateless-lifecycle.md).
411
512
## Table of Contents
613

0 commit comments

Comments
 (0)