server

MCP.Pizza Chef: php-mcp

Developers use this toolkit to expose parts of an existing PHP application โ€” a calculator, a customer lookup, a saved report โ€” so an assistant such as Claude, Cursor or ChatGPT can call them directly. It is a building block rather than something you install and use straight away: you write the PHP, mark the functions you want shared, and run the result as a small local program. It needs PHP 8.1 or newer and Composer. Laravel users are pointed to a companion package.

Unmaintained ยท No commits in 13 months.
Coding

Use This MCP server To

Share a report from my PHP app with my assistant Let an assistant look up a customer in my system Turn an existing PHP function into an assistant tool Use my company's own tools from inside Cursor Keep my business logic in PHP and reuse it in chat

README

PHP MCP Server SDK

Latest Version on Packagist Total Downloads Tests License

A comprehensive PHP SDK for building Model Context Protocol (MCP) servers. Create production-ready MCP servers in PHP with modern architecture, extensive testing, and flexible transport options.

This SDK enables you to expose your PHP application's functionality as standardized MCP Tools, Resources, and Prompts, allowing AI assistants (like Anthropic's Claude, Cursor IDE, OpenAI's ChatGPT, etc.) to interact with your backend using the MCP standard.

๐Ÿš€ Key Features

  • ๐Ÿ—๏ธ Modern Architecture: Built with PHP 8.1+ features, PSR standards, and modular design
  • ๐Ÿ“ก Multiple Transports: Supports stdio, http+sse, and new streamable HTTP with resumability
  • ๐ŸŽฏ Attribute-Based Definition: Use PHP 8 Attributes (#[McpTool], #[McpResource], etc.) for zero-config element registration
  • ๐Ÿ”ง Flexible Handlers: Support for closures, class methods, static methods, and invokable classes
  • ๐Ÿ“ Smart Schema Generation: Automatic JSON schema generation from method signatures with optional #[Schema] attribute enhancements
  • โšก Session Management: Advanced session handling with multiple storage backends
  • ๐Ÿ”„ Event-Driven: ReactPHP-based for high concurrency and non-blocking operations
  • ๐Ÿ“Š Batch Processing: Full support for JSON-RPC batch requests
  • ๐Ÿ’พ Smart Caching: Intelligent caching of discovered elements with manual override precedence
  • ๐Ÿงช Completion Providers: Built-in support for argument completion in tools and prompts
  • ๐Ÿ”Œ Dependency Injection: Full PSR-11 container support with auto-wiring
  • ๐Ÿ“‹ Comprehensive Testing: Extensive test suite with integration tests for all transports

This package supports the 2025-03-26 version of the Model Context Protocol with backward compatibility.

๐Ÿ“‹ Requirements

  • PHP >= 8.1
  • Composer
  • For HTTP Transport: An event-driven PHP environment (CLI recommended)
  • Extensions: json, mbstring, pcre (typically enabled by default)

server FAQ

Is this something I can install and start using right away?
No. It is a toolkit for building your own server in PHP, so it assumes you are comfortable writing code.
Which apps can connect to what I build with it?
Anything that speaks MCP, including Claude, Cursor and ChatGPT.
What do I need installed?
PHP 8.1 or newer plus Composer. Running it in web mode also wants a long-lived command line process.
Can I use this to let an assistant read data from my existing PHP site?
Yes, that is its main purpose. You mark the functions you want to share and it handles the rest.
Does it work with Laravel?
Yes, and the readme recommends a companion Laravel package for tighter integration.
Which version of the protocol does it follow?
The 2025-03-26 version, with backward compatibility for older apps.