MCP PHP SDK
The official, framework-agnostic PHP SDK for building Model Context Protocol servers and clients, maintained with the PHP Foundation and the Symfony project.
MCP PHP SDK is the official PHP implementation of the Model Context Protocol, providing a framework-agnostic API for building MCP servers and clients: tools, resources, prompts, STDIO and HTTP transports, sessions and authorization, across both the original initialize-handshake protocol era and a newer stateless revision. It is a collaboration between the PHP Foundation and the Symfony project, and follows Symfony's coding standards and backward-compatibility promise.
A server is a plain PHP class registered with a few lines of wiring, and a client connects over a transport such as stdio to list a remote server's tools and call them directly. The SDK's protocol conformance is measured weekly against the official MCP Conformance Test Framework for both protocol revisions. It installs through Composer and is considered experimental until its first major release.