mcp

MCP(Model Context Protocol)は、LLM(大規模言語モデル)に文脈とツールを提供するための新しい標準化された方法です。`pronskiy/mcp`は、PHPを使用してMCPサーバーを簡単に構築できるライブラリです。ツールの作成、リソースの公開、プロンプトの定義、コンポーネントの接続をクリーンなPHPコードで行うことができます。初心者でも扱いやすく、迅速な開発が可能です。

GitHubスター

117

ユーザー評価

未評価

お気に入り

0

閲覧数

5

フォーク

4

イシュー

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.

作者情報
Roman Pronskiy
@JetBrains, @ThePHPFAmsterdam, The Netherlands

353

フォロワー

88

リポジトリ

16

Gist

0

貢献数

関連するMCP
mcp-sdk-php logo

mcp-sdk-phpは、PHPでMCP(Managed Cloud Platform)にアクセスするためのSDKです。APIとの統合を容易にし、開発者が迅速にアプリケーションを構築できるように設計されています。豊富な機能を提供し、エラーハンドリングやデータ管理をサポートします。

PHP
minthcm logo

minthcmは、PHPで構築された軽量なCMSで、シンプルなインターフェースとカスタマイズ可能な機能を提供します。ユーザーは簡単にコンテンツを管理でき、プラグインやテーマの追加も容易です。開発者向けにAPIも用意されており、拡張性が高いのが特徴です。

PHP
boost logo
boost
2400

boostはPHPのパフォーマンスを向上させるための強力なライブラリです。特に、データ構造やアルゴリズムの最適化に優れており、開発者が効率的にコードを記述できるようサポートします。多くの機能を提供し、拡張性も高いため、様々なプロジェクトに適用可能です。

PHP