
mcp
by xp-forge·★ 0·Score 33
PHP implementation of Model Context Protocol for XP Framework with client and server components.
Overview
This is a PHP implementation of the Model Context Protocol for the XP Framework. It provides both client and server components, allowing developers to create MCP servers in PHP and connect to existing MCP services. The implementation supports tools, resources, and prompts, with authentication through OAuth2. The server can be integrated with XP Framework web applications and exposes tools via HTTP or standard I/O.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this implementation if you're working within the XP Framework ecosystem or need to build MCP servers in PHP.
When NOT to choose this
Avoid if you're not using PHP or the XP Framework, as there are more established implementations in other languages.
Tools this server exposes
2 tools extracted from the READMEgreetfunction greet($name = null)Sends a greeting to a specified user or returns a default greeting if no name is provided.
sendfunction send($recipient, $greeting)Sends a given greeting by email to a recipient.
Comparable tools
Installation
Install via Composer:
composer require xp-forge/mcpTo use as a server in XP Framework:
class Test extends Application {
public function routes() {
return new McpServer('com.example.api');
}
}To connect to an MCP server:
use io\modelcontextprotocol\McpClient;
$client = new McpClient('http://localhost:3001');
$response = $client->call('tools/list');FAQ
- What PHP versions are supported?
- This implementation requires PHP 7.4+ and supports PHP 8.0+.
- Can I use this with non-XP Framework PHP applications?
- Yes, the client component can be used with any PHP application, while the server component requires the XP Framework.
Compare mcp with
Last updated · Auto-generated from public README + GitHub signals.