PHP MCP Server
@he426100
About PHP MCP Server
基于 PHP 实现的 MCP (Model Control Protocol) 服务器框架,通过注解优雅地定义 MCP 服务,支持 Tool、Prompt、Resource 三种处理器,支持Stdio、Sse 两种 transport。
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"php-mcp-server": {
"command": "docker",
"args": [
"build",
"-t",
"php-mcp-server",
"."
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is PHP MCP Server?
PHP MCP Server is a PHP implementation of the Model Context Protocol (MCP) framework that enables developers to define MCP services using annotations. It supports Tool, Prompt, and Resource handlers and can operate over Stdio or SSE transports. It is intended for PHP developers building MCP-compatible servers for AI assistants or other contextual agents.
How to use PHP MCP Server?
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.
Key features of PHP MCP Server
- 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
Use cases of PHP MCP Server
- Build custom MCP tools that AI assistants can invoke
- Expose reusable prompt templates via MCP Prompt handlers
- Serve structured resources (text, binary, JSON) through MCP Resource endpoints
- Run a lightweight MCP server in containerized or serverless environments
FAQ from PHP MCP Server
What are the system requirements?
PHP >=8.1, Composer, and either Swow extension >1.5 or Swoole >5.1. Docker is optional.
What transport types does it support?
Stdio and SSE (Server-Sent Events). The default transport is stdio.
Can I run PHP MCP Server without installing it locally?
Yes, via CPX (Composer Package Executor). Run cpx he426100/php-mcp-server mcp:test-server directly.
Is Docker supported?
Yes. Build the image with docker build -t php-mcp-server . and run with the SSE transport on port 8000.
Where are server logs stored?
Logs are saved to runtime/server_log.txt by default. The path can be customised by overriding $logFilePath in a subclass of AbstractMcpServerCommand.
More Other MCP servers
ACI: Open-Source Infra to Power Unified MCP Servers
aipotheosis-labsACI.dev is the open source tool-calling platform that hooks up 600+ tools into any agentic IDE or custom AI agent through direct function calling or a unified MCP server. The birthplace of VibeOps.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Website
FunnyWolfAdversary simulation and Red teaming platform with AI
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Comments