Download the PHP package swisnl/mcp-client without Composer
On this page you can find all versions of the php package swisnl/mcp-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swisnl/mcp-client
More information about swisnl/mcp-client
Files in swisnl/mcp-client
Package mcp-client
Short Description Model Context Protocol client implementation in PHP
License MIT
Homepage https://github.com/swisnl/mcp-client
Informations about the package mcp-client
Model Context Protocol client implementation for PHP
A PHP client library for interacting with Model Context Protocol (MCP) servers.
Installation
You can install the package via composer:
Requirements
- PHP 8.2 or higher
- ReactPHP packages
Features
- Multiple transport mechanisms:
- SSE (Server-Sent Events)
- Stdio (Standard input/output)
- Process (External process communication)
- StreamableHttp (HTTP with session management)
- Promise-based API with ReactPHP
- PSR-3 Logger interface support
- Most of MCP protocol support (2025-03-26)
- Tool annotation support
Basic Usage
SSE Transport
Process Transport
StreamableHttp Transport
Use in combination with Agents SDK
First, install Agents SDK
Advanced Usage
Custom Transporter
You can implement your own transporter by implementing the TransporterInterface
:
Async Operations
The client supports async operations using ReactPHP promises:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Joris Meijer
- All Contributors
License
This package is open-sourced software licensed under the MIT license.
All versions of mcp-client with dependencies
psr/event-dispatcher Version ^1.0
psr/log Version ^3.0.2
react/async Version ^4.3
react/event-loop Version ^1.5
react/http Version ^1.11
react/stream Version ^1.4