The MCP PHP SDK provides a framework-agnostic API for building Model Context Protocol servers and clients in PHP, enabling developers to expose application functionality (tools, resources, and prompts) to AI agents or connect to MCP servers from PHP applications. The SDK offers both server and client implementations with capabilities including executable tools, data resources, resource templates, prompt templates, and server-initiated communication features like logging and progress notifications. Developed collaboratively by the PHP Foundation and Symfony project, it provides multiple registration methods for MCP capabilities, including attribute-based discovery and builder patterns.
claude mcp add --transport stdio modelcontextprotocol-php-sdk uvx php-sdk