pronskiy/mcp
Composer 安装命令:
composer require pronskiy/mcp
包简介
🐉 The fast, PHP way to build MCP servers
关键字:
README 文档
README
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.
统计信息
- 总下载量: 451
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 124
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-20