Implements a Model Context Protocol (MCP) server for PHP applications.
PHP MCP Server offers a comprehensive server-side solution for PHP applications utilizing the Model Context Protocol (MCP). It simplifies exposing application components as standardized MCP Tools, Resources, and Prompts, enabling seamless interaction with AI assistants through the MCP standard. With features like attribute-based definition, manual registration, and flexible transports (stdio and http+sse), this package provides a robust and adaptable platform for building MCP servers within PHP environments.
Key Features
01Explicit discovery via the `$server->discover()` method
02Manual registration with a fluent builder API
03Attribute-based definition using PHP 8 Attributes
04154 GitHub stars
05Optional caching of discovered element definitions
06Automatic metadata inference from PHP type hints and DocBlocks
Use Cases
01Enabling AI assistants to interact with PHP backend systems
02Building robust and flexible MCP servers within PHP environments
03Exposing application functionality as standardized MCP elements