PHPackages                             dalehurley/php-mcp-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dalehurley/php-mcp-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dalehurley/php-mcp-sdk
======================

Model Context Protocol (MCP) implementation for PHP

v0.1.10(5mo ago)26434↑88.9%31MITPHPPHP ^8.1CI failing

Since Sep 15Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/dalehurley/php-mcp-sdk)[ Packagist](https://packagist.org/packages/dalehurley/php-mcp-sdk)[ Docs](https://github.com/dalehurley/php-mcp-sdk)[ RSS](/packages/dalehurley-php-mcp-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (24)Versions (12)Used By (1)

PHP MCP SDK
===========

[](#php-mcp-sdk)

[![Latest Version](https://camo.githubusercontent.com/24f7f3c3b5d3f2f453e631240087bd725c0eff72de462f08046ad4c820ba1ff8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616c656875726c65792f7068702d6d63702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dalehurley/php-mcp-sdk)[![PHP Version](https://camo.githubusercontent.com/e837cb90f2e163ba3d8876c47e1572cb8301f2fe59ebb72b704e2c175eb2d6c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64616c656875726c65792f7068702d6d63702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dalehurley/php-mcp-sdk)[![Total Downloads](https://camo.githubusercontent.com/91c69c65c1803aeb4b52f221e8e03d83778dba575fe7272d9a95499e43117c56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616c656875726c65792f7068702d6d63702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dalehurley/php-mcp-sdk)[![License](https://camo.githubusercontent.com/c3b46ca71e2aaa2e6ff3dcfeb551811f5b80b22c2b369a3dc5eb2bd5721f2bf6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64616c656875726c65792f7068702d6d63702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/dalehurley/php-mcp-sdk/blob/main/LICENSE)[![Documentation](https://github.com/dalehurley/php-mcp-sdk/workflows/Deploy%20Documentation/badge.svg)](https://github.com/dalehurley/php-mcp-sdk/actions)

PHP implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.

✨ Features
----------

[](#-features)

- 🚀 **Complete MCP Protocol Support** - Full implementation of the MCP specification
- 🔧 **Type-Safe** - Leverages PHP 8.1+ type system with enums, union types, and strict typing
- ⚡ **Async First** - Built on Amphp for non-blocking I/O operations
- 🔌 **Multiple Transports** - STDIO, HTTP Streaming, and WebSocket
- 🔐 **OAuth 2.0 Ready** - Built-in authentication with PKCE support
- 🏗️ **Framework Integration** - Laravel, Symfony, and PSR-compatible design
- 📦 **PSR Compliant** - Follows PSR-4, PSR-7, PSR-12, and PSR-15 standards
- 🛡️ **Production Ready** - Comprehensive error handling, logging, and monitoring
- 🤖 **Agentic AI Support** - Build intelligent AI agents with MCP tool orchestration
- 🏭 **Real-World Examples** - Complete applications (Blog CMS, Task Manager, API Gateway)
- 📚 **Comprehensive Documentation** - Best-in-class documentation with tested examples
- 🧪 **Automated Testing** - All documentation examples are automatically tested

📋 Requirements
--------------

[](#-requirements)

- **PHP 8.1+** - Leverages modern PHP features
- **Composer** - For dependency management
- **ext-json** - JSON processing
- **ext-mbstring** - String handling

🚀 Installation
--------------

[](#-installation)

### Via Composer

[](#via-composer)

```
composer require dalehurley/php-mcp-sdk
```

### Development Version

[](#development-version)

```
composer require dalehurley/php-mcp-sdk:dev-main
```

⚡ Quick Start
-------------

[](#-quick-start)

### Creating an MCP Server

[](#creating-an-mcp-server)

```
#!/usr/bin/env php
