MCP PHP SDK

Configuration

Value Object holding core configuration and shared dependencies for the MCP Server instance.

This object is typically assembled by the Builder and passed to the Server constructor.

Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Table of Contents

Properties

$capabilities  : ServerCapabilities
$instructions  : string|null
$paginationLimit  : int
$protocolVersion  : ProtocolVersion|null
$serverInfo  : Implementation

Methods

__construct()  : mixed
handshakeVersions()  : array<int, ProtocolVersion>
Versions this server is willing to negotiate over `initialize`.

Properties

$instructions read-only

public string|null $instructions = null

Methods

__construct()

public __construct(Implementation $serverInfo, ServerCapabilities $capabilities[, int $paginationLimit = 50 ][, string|null $instructions = null ][, ProtocolVersion|null $protocolVersion = null ]) : mixed
Parameters
$serverInfo : Implementation

info about this MCP server application

$capabilities : ServerCapabilities

capabilities of this MCP server application

$paginationLimit : int = 50

maximum number of items to return for list methods

$instructions : string|null = null

instructions describing how to use the server and its features

$protocolVersion : ProtocolVersion|null = null

handshakeVersions()

Versions this server is willing to negotiate over `initialize`.

public handshakeVersions() : array<int, ProtocolVersion>

A configured version pins the handshake to exactly that revision. Modern revisions are never offered here: they have no initialize at all, so a client negotiating one could not use the connection.

Return values
array<int, ProtocolVersion>
On this page

Search results