PHP MCP
Implements a Model Context Protocol (MCP) server for PHP applications.
About
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
- Explicit discovery via the `$server->discover()` method
- Manual registration with a fluent builder API
- Attribute-based definition using PHP 8 Attributes
- 154 GitHub stars
- Optional caching of discovered element definitions
- Automatic metadata inference from PHP type hints and DocBlocks
Use Cases
- Enabling AI assistants to interact with PHP backend systems
- Building robust and flexible MCP servers within PHP environments
- Exposing application functionality as standardized MCP elements