PHP MCP Server
About
基于 PHP 实现的 MCP (Model Control Protocol) 服务器框架,通过注解优雅地定义 MCP 服务,支持 Tool、Prompt、Resource 三种处理器,支持Stdio、Sse 两种 transport。
Details
- Author
- he426100
- GitHub stars
- 21
- Downloads
- 247
- Categories
- Other
Jump to
- Annotation-based definition of MCP services
- Support for Tool, Prompt, and Resource handlers
- Stdio and SSE transport modes
- Compatible with Swow (>1.5) and Swoole (>5.1) environments
- Integrated logging system
- Docker support for containerized deployment
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PHP MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository and install dependencies via Composer. Run the test server with php bin/console mcp:test-server and optionally pass --transport (stdio or sse) and --port (default 8000 for SSE). The server can also be executed without local installation via CPX (Composer Package Executor) using cpx he426100/php-mcp-server mcp:test-server.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"php mcp server": {
"php-mcp-server": {
"command": "docker",
"args": [
"build",
"-t",
"php-mcp-server",
"."
]
}
}
}
}
McpServers
{
"php-mcp-server": {
"command": "docker",
"args": [
"build",
"-t",
"php-mcp-server",
"."
]
}
}
PHP MCP Server
这是一个基于 PHP 实现的 MCP (Model Control Protocol) 服务器框架,支持通过注解优雅地定义 MCP 服务。
项目概述
本项目提供了一个完整的 MCP 服务器实现,特色功能:
- 基于注解的 MCP 服务定义
- 支持 Tool、Prompt、Resource 三种处理器
- 支持 Stdio、Sse 两种传输方式
- 支持 Swow 和 Swoole 两种环境
- 完整的日志系统
- Docker 支持
系统要求
- PHP >= 8.1
- Composer
- Swow 扩展 > 1.5 或 Swoole > 5.1
- Docker (可选)
快速开始
安装
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



