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. 02计算两只宝可梦的对战结果
  3. 03估算闪光宝可梦遭遇概率
  4. 04采用 Clean Architecture 架构

适用场景

  1. 01查询宝可梦详细资料
  2. 02比较两只宝可梦的对战结果
  3. 03估算多次遭遇中的闪光概率

MCP 相关

这是一个 MCP 服务,向 MCP 客户端提供宝可梦信息与计算工具,并通过 SSE 通信。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

暂未收录安装方式

我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。

代码仓库

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

PokeMCP Server - 使用 Model Context Protocol(MCP)的 Pokémon 服务

描述

PokeMCP Server 是一项使用 Model Context Protocol(MCP)提供 Pokémon 相关功能的服务。该项目支持查询 Pokémon 信息、计算对战结果,以及估算遇见异色 Pokémon 的概率。

功能

  • 通过 PokeAPI 获取 Pokémon 信息
  • 计算两只 Pokémon 之间的对战结果
  • 估算遇见异色 Pokémon 的概率
  • 基于 Clean Architecture 原则构建
  • 实现 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. 使用提供的工具与 Pokémon 功能交互

项目结构(Clean Architecture)

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):根据 Pokémon 名称或 ID 获取详细信息。
PokeFunctionsTool
  • GetBattleResult(attacker, defender):计算两只 Pokémon 之间的对战结果。
  • ProbabilityFindingShiny(encounters, hasShinyCharm):计算遇见异色 Pokémon 的概率。

许可证

本项目采用 MIT License 许可。

联系方式

如果你有问题或建议,欢迎提出 issue,或通过 LinkedIn 联系我。

致谢

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。