Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp

MCP.Pizza Chef: pronskiy

mcp is a PHP library designed to simplify building Model Context Protocol (MCP) servers. It enables developers to create tools, expose resources, and define prompts for LLMs using clean, straightforward PHP code. With easy installation via Composer and intuitive APIs, it accelerates MCP server development, making it accessible for PHP developers to integrate real-time context and tool interactions for LLMs efficiently.

Use This MCP server To

Build custom MCP servers using PHP Create and expose tools for LLM interaction Define prompts and connect MCP components Integrate MCP servers into PHP applications Rapidly prototype MCP server functionality Handle real-time context feeding to LLMs

README

πŸ‰ The fast, PHP way to build MCP servers

The Model Context Protocol (MCP) is a new, standardized way to provide context and tools to your LLMs, and pronskiy/mcp makes building MCP servers simple and intuitive.

Create tools, expose resources, define prompts, and connect components with clean PHP code.

Installation

With composer:

composer require pronskiy/mcp

Usage

require 'vendor/autoload.php';

$server = new \Pronskiy\Mcp\Server('simple-mcp-server');

$server
    ->tool(
        'add-numbers',
        'Adds two numbers together',
        fn(float $num1, float $num2) => "The sum of {$num1} and {$num2} is " . ($num1 + $num2)
    )
    ->tool(
        'multiply-numbers',
        'Multiplies two numbers',
        fn(float $num1, float $num2) => "The product of {$num1} and {$num2} is " . ($num1 * $num2)
    )
;

$server->run();

Credits

License

The MIT License (MIT). Please see License File for more information.

mcp FAQ

How do I install the mcp PHP library?
Install it easily using Composer with the command `composer require pronskiy/mcp`.
Can I define custom tools with mcp?
Yes, you can define custom tools with descriptive names and callback functions in PHP.
Is mcp limited to any specific PHP version?
mcp requires a modern PHP environment compatible with Composer; check the GitHub repo for exact version requirements.
How do I run an MCP server using mcp?
Instantiate the Server class, add tools, then call the `run()` method to start the server.
Does mcp support asynchronous tool execution?
The current version focuses on synchronous PHP callbacks; asynchronous support depends on your PHP environment.
Can mcp integrate with other MCP components?
Yes, it is designed to connect MCP components and expose resources for LLMs.
What license does mcp use?
mcp is licensed under the MIT License, allowing flexible use and modification.
Where can I find example usage?
The GitHub repository README includes example code snippets for quick start.