MCP Catalogs
Homemcp screenshot

mcp

by xp-forge·0·Score 33

PHP implementation of Model Context Protocol for XP Framework with client and server components.

developer-toolsai-llm
0
Forks
5
Open issues
3 mo ago
Last commit
2d ago
Indexed

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:

you:Building MCP servers in PHP for integration with existing PHP applications
you:Connecting PHP systems to MCP-compatible AI models and tools
you:Creating custom tools and resources for AI workflows using PHP
you:What PHP versions are supported?
you:Can I use this with non-XP Framework PHP applications?

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 README
  • greetfunction 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

py-mcpnode-mcpmcp-go

Installation

Install via Composer:

composer require xp-forge/mcp

To 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.