Model Context Protocol

v0.2.0 2025-07-29 16:16 UTC

This package is auto-updated.

Last update: 2025-07-29 16:18:59 UTC


README

Build status on GitHub XP Framework Module BSD Licence Requires PHP 7.4+ Supports PHP 8.0+ Latest Stable Version

Implements the Model Context Protocol for the XP Framework.

Example

Connecting to an MCP server:

use io\modelcontextprotocol\McpClient;
use util\cmd\Console;

// Use streamable HTTP
$client= new McpClient('http://localhost:3001');

// Use standard I/O
$client= new McpClient(['docker', 'run', '--rm', '-i', 'mcp/time']);

$response= $client->call('tools/list');
Console::writeLine($response->value());

See also