PHPackages                             nexusphp/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. nexusphp/mcp-sdk

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

nexusphp/mcp-sdk
================

PHP SDK for the MCP specification

v0.5.0(1w ago)00[1 PRs](https://github.com/NexusPHP/mcp-sdk/pulls)MITPHPPHP ^8.4CI passing

Since May 23Pushed 6d agoCompare

[ Source](https://github.com/NexusPHP/mcp-sdk)[ Packagist](https://packagist.org/packages/nexusphp/mcp-sdk)[ RSS](/packages/nexusphp-mcp-sdk/feed)WikiDiscussions 1.x Synced 1w ago

READMEChangelog (5)Dependencies (15)Versions (7)Used By (0)

Nexus MCP SDK
=============

[](#nexus-mcp-sdk)

[![PHP](https://camo.githubusercontent.com/f24e42ee2b80eaf422dd0b316b0f6004f5bb6ce0d424313e3fb98c91663ab5b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135253230382e342d3737376262343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net)[![Latest Stable Version](https://camo.githubusercontent.com/16a823c1802ba300e80cbc6c57443a8e569e5f3eb536487d2e50fc7b2f58f7af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e657875737068702f6d63702d73646b)](https://packagist.org/packages/nexusphp/mcp-sdk)[![Unit Tests](https://github.com/NexusPHP/mcp-sdk/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/NexusPHP/mcp-sdk/actions/workflows/unit-tests.yml)[![Static analysis](https://github.com/NexusPHP/mcp-sdk/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/NexusPHP/mcp-sdk/actions/workflows/static-analysis.yml)[![Code style](https://github.com/NexusPHP/mcp-sdk/actions/workflows/code-style.yml/badge.svg)](https://github.com/NexusPHP/mcp-sdk/actions/workflows/code-style.yml)[![Mutation score](https://camo.githubusercontent.com/8955f1fd5e71e3de48936a26cd97f92f55d6746e23de4c98cf9f2f1813e4aac7/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532464e657875735048502532466d63702d73646b253246312e78)](https://dashboard.stryker-mutator.io/reports/github.com/NexusPHP/mcp-sdk/1.x)[![License](https://camo.githubusercontent.com/89be291dc277dd744de34bad14ac06692a6855b36dc62b9fdacd75fdaae02fbf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4e657875735048502f6d63702d73646b)](LICENSE)

Important

Pre-v1.0.0. Through `0.x` the project ships the single umbrella package `nexusphp/mcp-sdk`, and minor releases may carry breaking changes until `1.0.0`. The stdio transport is implemented. Streamable HTTP lands with the 2026-07-28 migration.

A PHP SDK for the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro), tracking spec revision **2025-11-25**. It provides both sides of an MCP session: a server for exposing tools, resources, and prompts, and a client for connecting to MCP servers over a transport.

This SDK is architected independently of the official PHP MCP SDK. See [ROADMAP.md](ROADMAP.md) for direction and the path to the 2026-07-28 spec migration.

Requirements
------------

[](#requirements)

- PHP 8.4 or newer
- [Composer](https://getcomposer.org)

Installation
------------

[](#installation)

```
composer require nexusphp/mcp-sdk
```

The SDK runs on [AMPHP](https://amphp.org) and [Revolt](https://revolt.run). Its synchronous-looking API is driven by fibers under the hood.

Quickstart
----------

[](#quickstart)

A minimal stdio server exposing one tool:

```
