mcp

🐉 The fast, PHP way to build MCP servers

GitHub Stars

117

User Rating

Not Rated

Favorites

0

Views

4

Forks

4

Issues

2

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.

Author Information
Roman Pronskiy
@JetBrains, @ThePHPFAmsterdam, The Netherlands

353

Followers

88

Repositories

16

Gists

0

Total Contributions

Related MCPs
mcp-sdk-php logo

Model Context Protocol SDK for PHP

PHP
minthcm logo

First AI‑enabled open-source Human Capital Management system that you can start using today.

PHP
boost logo
boost
2400

Laravel-focused MCP server for augmenting your AI powered local development experience.

PHP