Download the PHP package nexusphp/mcp-sdk without Composer
On this page you can find all versions of the php package nexusphp/mcp-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nexusphp/mcp-sdk
More information about nexusphp/mcp-sdk
Files in nexusphp/mcp-sdk
Informations about the package mcp-sdk
Nexus MCP SDK
[!IMPORTANT] Pre-v1.0.0. Through
0.xthe project ships the single umbrella packagenexusphp/mcp-sdk, and minor releases may carry breaking changes until1.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), tracking spec revision 2026-07-28. 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 for direction and the path to the 2026-07-28 spec migration.
Requirements
- PHP 8.4 or newer
- Composer
Installation
The SDK runs on AMPHP and Revolt. Its synchronous-looking API is driven by fibers under the hood.
Quickstart
A minimal stdio server exposing one tool:
Run it through MCP Inspector:
See Getting started for the client side and a full walkthrough.
Documentation
- Getting started: install plus a minimal server and client.
- Server API:
ServerBuilderreference (tools, prompts, resources, completions, handlers). - Attribute discovery: declare features with
#[AsTool],#[AsServer], and friends, registered viaServerBuilder::register(). - Client API:
ClientBuilderandClientreference (handshake, typed requests, streaming progress). - Transports: the stdio transport and the in-memory paired transport.
- Error handling: the exception model and JSON-RPC error codes.
- Best practices: conventions the SDK is shaped to reward.
- Architecture: layering, dispatch kernel, spec-compliance notes.
- Design rationale: why the SDK is shaped this way.
- API reference: the generated class-level reference for the public
Nexus\Mcp\API, published to GitHub Pages. - Examples: runnable demo server and client.
Development
See CONTRIBUTING.md for the full workflow.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md and the SECURITY.md.
License
Released under the MIT License.
All versions of mcp-sdk with dependencies
amphp/amp Version ^3.1
amphp/byte-stream Version ^2.1
amphp/process Version ^2.0
nexusphp/assert Version ^1.1
opis/json-schema Version ^2.6
phpstan/phpdoc-parser Version ^2.3
psr/log Version ^3.0
revolt/event-loop Version ^1.0