php-mcp/server is a PHP library designed to simplify the creation of Model Context Protocol (MCP) compliant servers. It facilitates exposing PHP methods as MCP Tools, Resources, or Prompts using PHP 8 Attributes, supporting a specific protocol version and integrating with various MCP clients. The library is PSR-compliant, allowing flexible configurations and integration with different PHP frameworks. Users can set up MCP elements using attribute-based definitions or manual registration, and the package supports multiple transport mechanisms including stdio and HTTP+SSE.

27m read timeFrom github.com
Post cover image
Table of contents
IntroductionKey FeaturesRequirementsInstallationGetting Started: A Simple stdio ServerCore ConceptsAdvanced Usage & RecipesConnecting MCP ClientsExamplesTestingContributingLicenseSupport & Feedback
4 Comments

Sort: