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
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
Awesome Mlops
visengerA curated list of references for MLOps
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
Comments