php-mcp-server

php-mcp-server

3.5

If you are the rightful owner of php-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

PHP MCP Server is a framework for implementing Model Control Protocol servers using PHP, allowing elegant service definitions through annotations.

The PHP MCP Server is a comprehensive framework for implementing Model Control Protocol (MCP) servers using PHP. It allows developers to define MCP services elegantly through annotations and supports three types of processors: Tool, Prompt, and Resource. The server can operate using two transport methods, Stdio and SSE, and is compatible with both Swow and Swoole environments. The framework includes a complete logging system and offers Docker support for easy deployment. It requires PHP 8.1 or higher, Composer, and either the Swow or Swoole extension. The server can be quickly set up by cloning the repository, installing dependencies, and optionally installing the Swow extension. The framework provides annotations for defining tools, prompts, and resources, making it easy to create custom services.

Features

  • Annotation-based MCP service definition
  • Supports Tool, Prompt, and Resource processors
  • Compatible with Swow and Swoole environments
  • Complete logging system
  • Docker support for easy deployment

Tools

  1. Tool 注解

    Used to define tool class processors, support parameter definition and multiple return types

  2. Prompt 注解

    Used to define prompt template processors, support parameter definitions and multiple return types

  3. Resource 注解

    Used to define resource processors, support resource URI, name, description, and MIME type definitions