PokeAPI工具服务

一个将PokeAPI v2作为AI代理工具暴露的MCP服务器,适用于多种IDE和MCP兼容客户端。

  • by rsilvagit
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 rsilvagit/poke-mcp

使用说明

戳mcp

暴露的MCP服务器 PokeAPI 版本 2 作为人工智能代理的工具。 适用于Claude Desktop、Cursor、Windsurf、Claude Code CLI和任何兼容MCP的客户端。

文档 · 发布

快速入门(Windows.exe)

  1. 下载 install.exe 从 发布 页
  2. 跑 install.exe --选择IDE并自动配置它们
  3. 重新启动IDE——工具将出现在工具菜单中

支持的IDE: 克劳德桌面版, 光标, 帆板运动, Claude 代码命令行工具

无需安装Python。要卸载,请运行 install.exe 再次选择“卸载”。

手动设置

添加到IDE的MCP配置文件中:

{
  "mcpServers": {
    "pokeapi": {
      "command": "C:\\path\\to\\poke-mcp.exe"
    }
  }
}
IDE 配置路径
克劳德桌面 %APPDATA%\Claude\claude_desktop_config.json
光标 %APPDATA%\Cursor\User\globalStorage\cursor.mcp\mcp.json
风帆冲浪 %APPDATA%\Codeium\windsurf\mcp_config.json
克劳德代码CLI %USERPROFILE%\.claude.json

可用工具

工具 说明
get_pokemon 统计数据、类型、能力、精灵
get_pokemon_species 风味文本、栖息地、进化链、蛋群
list_pokemon 分页口袋妖怪列表
get_evolution_chain 带有触发器详细信息的完整进化树
get_type 类型损伤关系(2x、0.5x、0x)
get_move 移动功率、精度、PP、效果
get_ability 能力描述和口袋妖怪列表
get_item 项目成本、类别、效果
get_pokemon_encounters 野生邂逅地点
get_berry 浆果生长、风味、天然礼物

项目结构

src/poke_mcp/
  __init__.py        # Package version
  __main__.py        # Entry point (python -m poke_mcp)
  server.py          # FastMCP instance, lifespan, shared httpx client
  tools.py           # 10 PokeAPI tools
tests/
  test_tools.py      # Unit tests with mocked API
build.py             # PyInstaller build (server + installer)
install.py           # Windows installer with visual UI

发展

需求

  • Python 3.11+

设置

python -m venv .venv
.venv/Scripts/activate        # Windows
# source .venv/bin/activate   # Linux/Mac
pip install -e ".[dev]"

从源代码运行

python -m poke_mcp

测试和棉绒

pytest
ruff check src/ tests/
ruff format src/ tests/

生成可执行文件

python build.py
# Output: dist/poke-mcp.exe  (MCP server)
#         dist/install.exe    (self-contained installer)

许可证

麻省理工学院