Skip to main content
server/discover lets a client query a server’s supported protocol versions, capabilities, and identity before sending any other requests. Servers MUST implement it.

Request

The request carries no body parameters beyond the standard _meta:

Response

The server replies with its supported protocol versions, capabilities, and identity. This operation supports caching.

Response Fields

When to Call

Calling server/discover is optional for clients — a client may invoke any RPC inline and handle UnsupportedProtocolVersionError if the server does not support the requested version. However, server/discover is useful in two scenarios:
  • Up-front version selection. The client learns the server’s supported versions before sending any other request, avoiding a round-trip error.
  • stdio backward-compatibility probe. On stdio, there is no per-request HTTP status code to drive fallback. A client that supports both modern (per-request _meta) and legacy (initialize handshake) servers SHOULD send server/discover first; see stdio: Backward Compatibility for the fallback rules.
See Protocol Version Negotiation for the full version-selection flow. For HTTP-specific status codes returned for unknown methods, see the Protocol Version Header section in Transports.