Content
# 🐉 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:
```bash
composer require pronskiy/mcp
```
## Usage
```php
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
- https://github.com/logiscape/mcp-sdk-php
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
You Might Also Like
Ollama
Ollama enables easy access to large language models on various platforms.

n8n
n8n is a secure workflow automation platform for technical teams with 400+...
OpenWebUI
Open WebUI is an extensible web interface for customizable applications.

Dify
Dify is a platform for AI workflows, enabling file uploads and self-hosting.

Zed
Zed is a high-performance multiplayer code editor from the creators of Atom.
MarkItDown MCP
markitdown-mcp is a lightweight MCP server for converting various URIs to Markdown.