mcpField
P
PokeMCP Server - Pokémon Server with Model Context Protocol (MCP)

PokeMCP Server - Pokémon Server with Model Context Protocol (MCP)

ローカル
github.com/GuillermoRuizDevゲーム・エンタメ078 週間前に更新

PokeMCP Server - Pokémon Server with Model Context Protocol (MCP) について

PokeMCP Serverは、MCPクライアント向けにポケモンの検索と計算機能を提供します。PokeAPIのデータを使い、対戦結果や色違いとの遭遇確率も算出します。

主な機能

  1. 01名前またはIDによるポケモン情報の取得
  2. 022匹のポケモンの対戦結果を計算
  3. 03色違いとの遭遇確率を推定
  4. 04Clean Architectureに基づく構成

活用シーン

  1. 01ポケモンの詳細情報を調べる
  2. 022匹のポケモンの対戦結果を比較
  3. 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 へのアクセスに必要)

インストール

  1. リポジトリをクローンします: git clone https://github.com/GuillermoRuizDev/PokeMCP-Server.git cd PokeMCP

  2. Restore dependencies: dotnet restore

  3. 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:

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):

  1. Connect to the MCP server using an MCP client by adding the following json to the mcp.json file:
{
    "servers": {        
        "pokeapi-mcp-server": {
            "type": "sse",
            "url": "http://localhost:3002/sse"
        }
    }
}
  1. 公開されているツールを使用して、ポケモンの機能を利用します

プロジェクト構成(クリーンアーキテクチャ)

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 からご連絡ください。

謝辞

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。