MCP PHP SDK

DiscoverResult implements ResultInterface

The server's response to a `server/discover` request.

The modern era's replacement for InitializeResult: it reports every version this server speaks rather than negotiating one, and each request picks from that list.

Tags
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Interfaces

ResultInterface
Base class for all specific MCP result objects (the value of the 'result' field).

Properties

$capabilities  : ServerCapabilities
$instructions  : string|null
$supportedVersions  : array<string|int, mixed>

Methods

__construct()  : mixed
jsonSerialize()  : ServerCapabilities, instructions?: string}
`resultType`, caching hints and serverInfo are wire vocabulary, stamped by {@see \Mcp\Server\Wire\Rev2026Codec} rather than modelled here.

Properties

$supportedVersions read-only

public array<string|int, mixed> $supportedVersions

Methods

jsonSerialize()

`resultType`, caching hints and serverInfo are wire vocabulary, stamped by {@see \Mcp\Server\Wire\Rev2026Codec} rather than modelled here.

public jsonSerialize() : ServerCapabilities, instructions?: string}
Return values
ServerCapabilities, instructions?: string}
On this page

Search results