PokeMCP Server - Pokémon Server with Model Context Protocol (MCP) について
PokeMCP Serverは、MCPクライアント向けにポケモンの検索と計算機能を提供します。PokeAPIのデータを使い、対戦結果や色違いとの遭遇確率も算出します。
主な機能
- 01名前またはIDによるポケモン情報の取得
- 022匹のポケモンの対戦結果を計算
- 03色違いとの遭遇確率を推定
- 04Clean Architectureに基づく構成
活用シーン
- 01ポケモンの詳細情報を調べる
- 022匹のポケモンの対戦結果を比較
- 03複数回の遭遇で色違いが出る確率を推定
MCP 対応
MCPクライアントにポケモン情報と計算ツールを提供するMCPサーバーです。SSEで通信します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
PokeMCP Server - Model Context Protocol(MCP)対応のポケモンサーバー
説明
PokeMCP Server は、Model Context Protocol(MCP)を使用してポケモン関連の機能を提供するサーバーです。このプロジェクトでは、ポケモンの情報の検索、バトル結果の計算、色違いポケモンとの遭遇確率の推定ができます。
機能
- PokeAPI を通じたポケモン情報の取得
- 2 匹のポケモン間のバトル結果の計算
- 色違いポケモンを見つける確率の推定
- クリーンアーキテクチャの原則に基づく構築
- クライアントとサーバー間の通信に MCP プロトコルを実装
要件
- .NET 9
- インターネット接続(PokeAPI へのアクセスに必要)
インストール
-
リポジトリをクローンします:
git clone https://github.com/GuillermoRuizDev/PokeMCP-Server.git cd PokeMCP -
Restore dependencies:
dotnet restore -
Build the project:
dotnet build
Running the Application
Development Mode
To run the application in development mode:
dotnet run --project PokeMCP
By default, the application will run at:
- HTTP: http://localhost:3002
- HTTPS: https://localhost:7133
You can verify it's working by accessing http://localhost:3002/home in your browser, where you should see the message: "Pokemon MCP Server - Ready for use with SSE".
Integration with MCP Clients
To use this server from an MCP client (such as Semantic Kernel or compatible applications):
- Connect to the MCP server using an MCP client by adding the following json to the
mcp.jsonfile:
{
"servers": {
"pokeapi-mcp-server": {
"type": "sse",
"url": "http://localhost:3002/sse"
}
}
}
- 公開されているツールを使用して、ポケモンの機能を利用します
プロジェクト構成(クリーンアーキテクチャ)
PokeMCP/
├── Core/ # Domain Layer
│ ├── Entities/ # Domain entities
│ ├── Enums/ # Enumerations
│ └── Interfaces/ # Repository and service interfaces
├── Application/ # Application Layer
│ ├── DTOs/ # Data transfer objects
│ └── UseCases/ # Use cases and business logic implementation
├── Infrastructure/ # Infrastructure Layer
│ ├── Clients/ # External service clients (PokeAPI)
│ └── Repositories/ # Repository implementations
└── Tools/ # MCP tools for exposing functionality
MCP サーバーの使用方法
サーバーは、MCP プロトコルを通じて次の機能を提供します:
PokeApiTool
GetPokemonInfo(pokemonName): 名前または ID でポケモンを指定し、詳細情報を取得します。
PokeFunctionsTool
GetBattleResult(attacker, defender): 2 匹のポケモン間のバトル結果を計算します。ProbabilityFindingShiny(encounters, hasShinyCharm): 色違いポケモンを見つける確率を計算します。
ライセンス
このプロジェクトは MIT License の下でライセンスされています。
お問い合わせ
質問や提案がある場合は、お気軽に issue を作成するか、LinkedIn からご連絡ください。
謝辞
- ポケモンのデータを提供する PokeAPI
- 通信プロトコルを提供する Model Context Protocol
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。