Skip to content

Modern stateless server for MCP 2026-07-28 - #1170

Open
chemicL wants to merge 2 commits into
modelcontextprotocol:mainfrom
chemicL:modern-stateless-server
Open

chemicL wants to merge 2 commits into
modelcontextprotocol:mainfrom
chemicL:modern-stateless-server

Conversation

@chemicL

@chemicL chemicL commented Oct 10, 2026

Copy link
Copy Markdown
Member

A new server in io.modelcontextprotocol.modern, next to the existing
one and independent of the legacy McpSchema. Passes all 37 required
2026-07-28 conformance scenarios.

  • Pick a paradigm, not a server: one McpServer, sync or async
    repositories, no Reactor in sync code. The immediateExecution flag
    is gone; the transport decides where blocking code runs, and
    thread-locals from servlet filters just work.
  • Primitives are yours: tools, resources, prompts and completions come
    from repositories you implement. Dynamic, per-tenant, filtered and
    paginated catalogs, no SDK registry in the way.
  • Stream when it pays: a handler returns a single result
    (application/json) or a streaming body (SSE). No more JSON-only
    stateless vs. SSE-always sessions.
  • McpFeature as the one extension point: methods, handler, capabilities.
  • MRTR with requestState HMAC-sealed to principal, expiry, method and
    tool or resource.
  • server/discover, caching hints, subscriptions/listen fed by
    McpChangeFeed.
  • Tool arguments checked against inputSchema, structuredContent against
    outputSchema; prompt arguments and completions validated too.
  • McpException goes out as given; other exception messages stay in
    the log.
  • HTTP: POST only, keep-alives, disconnect detection, configurable
    error statuses, cross-origin refused by default.
  • Stdio: concurrent requests, cancellation, one writer, line size limit.
  • Logging dropped, as the revision deprecates it.

Also: modern conformance server and CI job, conformance runs moved to
0.2.0-alpha.12, CONTRIBUTING record rules refined.

Not yet: SEP-2243 custom headers, tasks, a modern client.

Addresses, for users of the modern server

A new server in io.modelcontextprotocol.modern, next to the existing
one and independent of the legacy McpSchema. Passes all 37 required
2026-07-28 conformance scenarios.

- Pick a paradigm, not a server: one McpServer, sync or async
  repositories, no Reactor in sync code. The immediateExecution flag
  is gone; the transport decides where blocking code runs, and
  thread-locals from servlet filters just work.
- Primitives are yours: tools, resources, prompts and completions come
  from repositories you implement. Dynamic, per-tenant, filtered and
  paginated catalogs, no SDK registry in the way.
- Stream when it pays: a handler returns a single result
  (application/json) or a streaming body (SSE). No more JSON-only
  stateless vs. SSE-always sessions.
- McpFeature as the one extension point: methods, handler, capabilities.
- MRTR with requestState HMAC-sealed to principal, expiry, method and
  tool or resource.
- server/discover, caching hints, subscriptions/listen fed by
  McpChangeFeed.
- Tool arguments checked against inputSchema, structuredContent against
  outputSchema; prompt arguments and completions validated too.
- McpException goes out as given; other exception messages stay in
  the log.
- HTTP: POST only, keep-alives, disconnect detection, configurable
  error statuses, cross-origin refused by default.
- Stdio: concurrent requests, cancellation, one writer, line size limit.
- Logging dropped, as the revision deprecates it.

Also: modern conformance server and CI job, conformance runs moved to
0.2.0-alpha.12, CONTRIBUTING record rules refined.

Not yet: SEP-2243 custom headers, tasks, a modern client.

Addresses, for users of the modern server
- Sessions gone: modelcontextprotocol#274, modelcontextprotocol#499, modelcontextprotocol#577, modelcontextprotocol#738, modelcontextprotocol#952, modelcontextprotocol#1063
- No server-to-client requests: modelcontextprotocol#1061
- Errors: modelcontextprotocol#249, modelcontextprotocol#737, modelcontextprotocol#955, modelcontextprotocol#1081, modelcontextprotocol#1086
- HTTP: modelcontextprotocol#293, modelcontextprotocol#400, modelcontextprotocol#539, modelcontextprotocol#844, modelcontextprotocol#880, modelcontextprotocol#957, modelcontextprotocol#1155
- Stdio: modelcontextprotocol#303, modelcontextprotocol#936
- Repositories: modelcontextprotocol#578, modelcontextprotocol#626, modelcontextprotocol#941, modelcontextprotocol#967
- Context and schema: modelcontextprotocol#492, modelcontextprotocol#766
- 2026-07-28 server side: modelcontextprotocol#1001, modelcontextprotocol#1004, modelcontextprotocol#1009, modelcontextprotocol#1010, modelcontextprotocol#1011

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
If the install directory exists but lacks the server, e.g. after the OS
cleaned up the temporary directory, delete it and install again instead
of failing on every run.

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
@chemicL chemicL changed the title Modern stateless server Modern stateless server for MCP 2026-07-28 Oct 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant