Model Context Protocol

v0.1.0 2025-06-14 17:12 UTC

This package is auto-updated.

Last update: 2025-06-14 17:12:50 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->first());

See also