xp-forge / mcp
Model Context Protocol
v0.1.0
2025-06-14 17:12 UTC
Requires
- php: >=7.4.0
- xp-forge/rest-client: ^6.0 | ^5.0
- xp-framework/core: ^12.0 | ^11.0 | ^10.2
Requires (Dev)
- xp-framework/test: ^2.0
README
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());