About PHP MCP Server sdk
A PHP 8.2+ SDK for developers building MCP servers in PHP. It supports standard transports and handles protocol messages and lifecycle events.
Key features
- 01Build MCP servers in PHP
- 02Expose resources, prompts, and tools
- 03Support stdio and Streamable HTTP(SSE)
- 04Handle protocol messages and lifecycle events
Use cases
- 01Implementing a PHP MCP server
- 02Serving MCP over stdio or HTTP(SSE)
MCP support
The SDK helps build MCP servers that expose resources, prompts, and tools to MCP clients. It supports stdio and Streamable HTTP(SSE) transports.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEPHP MCP Server sdk
Requirements
- PHP 8.2+
Overview
- Build MCP servers that expose resources, prompts and tools on PHP
- Use standard transports like stdio and Streamable HTTP(SSE)
- Handle all MCP protocol messages and lifecycle events
Installation
$ composer require yamayuski/php-mcp-server-sdk
Development
You need Development containers with vscode or PhpStorm
$ composer install
# Unit test
$ composer test
# Inspector test
$ ./start-inspector.sh
LICENSE
Under Apache-2.0.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.