Skip to content

T10 - client stateless lifecycle #248

Description

@kubinio123

Target branch: 2026-07-28-protocol-support

Requires:

Requests

  • With a stateless version there is no initialize and no notifications/initialized
  • Every request carries _meta with the protocol version, the client info and the client capabilities, the capabilities reflect the handlers the client was created with
  • Over HTTP the MCP-Protocol-Version header always equals the version in _meta
  • The protocol version is set once, on the client, transports do not carry their own version
  • A logLevel option puts _meta.logLevel on every request, without it the client sends no log level and expects no notifications/message

Responses

  • A result without resultType is complete. A result with an unknown resultType fails with McpProtocolException.
  • On -32022 the client retries once with a version from supported that chimp also supports, with no common version the call fails with an error that names both version lists
  • serverCapabilities and serverInfo come from server/discover, discover is available as an operation
  • the capability checks that guard operations use the discover result, as they use the initialize result today.

Legacy-only operations

  • ping, setLoggingLevel, subscribeResource, unsubscribeResource, sendProgress and sendRootsListChanged fail with McpProtocolException on the stateless wire, they keep working for legacy versions

Coverage

  • The rules above hold for the sync and streaming clients, over HTTP and stdio, on ZIO, Ox and Pekko.
  • The conformance client handles the request-metadata and json-schema-ref-no-deref scenarios.

Spec:

Conformance scenarios that must pass after this task:

  • Client: request-metadata, tools_call, json-schema-ref-no-deref

Docs: yes.

  • New page docs/client/protocol.md: the protocolVersion parameter, what a stateless client sends on every request, discover(), version negotiation on -32022, the operations that exist only for legacy versions, the logLevel option.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions