MCP PHP SDK

RequestEnvelope

FinalYes

Stamps the per-request `_meta` that replaces the `initialize` handshake (SEP-2575).

The modern era has no connection-scoped negotiation, so what a handshake would have said once now rides on every message: the revision this request is written against, and what the client can be asked to do while answering it. RequestMeta is the server's reader for the same envelope.

Tags
see
https://modelcontextprotocol.io/specification/2026-07-28/basic/index#meta
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Properties

$capabilities  : ClientCapabilities
$clientInfo  : Implementation
$protocolVersion  : ProtocolVersion

Methods

__construct()  : mixed
protocolVersion()  : ProtocolVersion
stamp()  : array<string, mixed>
Merges the envelope into an encoded message, preserving whatever `_meta` the caller already put there — a `progressToken` most of all, which would otherwise be dropped and take every progress notification with it.
withProtocolVersion()  : self

Properties

Methods

stamp()

Merges the envelope into an encoded message, preserving whatever `_meta` the caller already put there — a `progressToken` most of all, which would otherwise be dropped and take every progress notification with it.

public stamp(array<string, mixed> $payload) : array<string, mixed>
Parameters
$payload : array<string, mixed>

a serialized JSON-RPC message

Return values
array<string, mixed>
On this page

Search results