MCP PHP SDK

JsonRpc

Table of Contents

Interfaces

HasMethodInterface
Interface for all incoming JSON-RPC messages that should be processed by a handler, and are expected to have a method.
MessageInterface
Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
ResultInterface
Base class for all specific MCP result objects (the value of the 'result' field).

Classes

Error
A response to a request that indicates an error occurred.
Notification
Request
Response
Covariant because a Response only hands its result out, never consumes it, so a handler can declare the union of results it may answer with while each return path constructs one concrete type.
On this page

Search results