Token导航 LogoToken导航TokenDH.com
Pokemon Battle MCP Server logo
数据服务stdio官方级别未说明来源级核验

Pokemon Battle MCP Server

MCP Server

一个基于FastAPI的宝可梦对战模拟服务器,提供宝可梦数据查询和战斗模拟功能,适用于游戏开发和AI训练场景。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
游戏开发FastAPIClaude数据分析Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

DimpleKundu

提供方

DimpleKundu

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

神奇宝贝战斗模拟-MCP服务器

快速开始

git clone https://github.com/your-username/pokeaiagent.git
cd pokeaiagent
pip install -r requirements.txt
python -m server.mcp_server
服务器将启动并等待MCP兼容客户端(如Claude Desktop)连接。

______________________________________________________________________

需求

  • python 3.10+ (3.13测试)
  • 互联网连接(使用 PokéAPI)

______________________________________________________________________

安装

git clone https://github.com/your-username/pokeaiagent.git
cd pokeaiagent

python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate

pip install -r requirements.txt

______________________________________________________________________

运行MCP服务器

直接运行:

python -m server.mcp_server

或通过FastAPI进行API测试:

uvicorn server.main:app --reload

访问 http://127.0.0.1:8000.

______________________________________________________________________

FastAPI端点

端点方法描述
/GET返回欢迎消息: {"message": "MCP Pokemon Server"}
/pokemon/{name}获取按名称获取Pokémon数据(使用PokéAPI)
/battle/{p1}/{p2}GET模拟两个神奇宝贝之间的战斗

示例用法:

GET /pokemon/pikachu
# Returns Pikachu's data

GET /battle/pikachu/bulbasaur
# Returns simulated battle results

代码片段(server/main.py):

from fastapi import FastAPI
from server.data import fetch_pokemon
from server.battle import simulate_battle

app = FastAPI()

@app.get("/")
def root():
    return {"message": "MCP Pokemon Server"}

@app.get("/pokemon/{name}")
def get_pokemon(name: str):
    return fetch_pokemon(name)

@app.get("/battle/{p1}/{p2}")
def battle(p1: str, p2: str):
    return simulate_battle(p1, p2)

______________________________________________________________________

项目结构

pokeaiagent/
│
├── server/
│   ├── __init__.py
│   ├── battle.py         # Battle mechanics
│   ├── data.py           # Pokémon data fetcher
│   ├── main.py           # FastAPI app with endpoints
│   └── mcp_server.py     # MCP server entrypoint
│
├── requirements.txt
└── README.md

______________________________________________________________________

连接到克劳德桌面(MCP)

  1. 查找Claude MCP配置文件夹:

- macOS: ~/Library/Application Support/Claude/ - 窗户: %AppData%\Claude\ - Linux: ~/.config/Claude/

  1. 编辑(或创建) claude_desktop_config.json 并添加:
{
  "mcpServers": {
    "pokemon": {
      "command": "python",
      "args": [
        "/absolute/path/to/project/server/mcp_server.py"
      ],
      "env": {
        "PYTHONPATH": "/absolute/path/to/project"
      }
    }
  }
}

笔记:

  • 替换 /absolute/path/to/project 使用您实际的本地项目路径。
  • 保持正斜杠 / 为了兼容性。
  • PYTHONPATH 确保从Claude启动时导入工作正常。
  1. 重新启动克劳德桌面 加载MCP服务器。

______________________________________________________________________

Claude中的示例用法

1. list tools
2. simulate a battle between pikachu and bulbasaur

提示: simulate a battle between pikachu and bulbasaur

答复:

battle_simulator

What a quick and decisive battle!

Pikachu vs Bulbasaur Battle Summary:

This battle featured two of the most iconic starter Pokémon, but it was surprisingly one-sided. Both Pokémon started with nasty status conditions - Pikachu was burned while Bulbasaur was poisoned.

Turn 1:
- Pikachu struck first but only managed 5 damage against Bulbasaur
- Bulbasaur retaliated with a devastating 23 damage attack, nearly KO'ing Pikachu in one hit!
- Both Pokémon then took damage from their status conditions

Turn 2:
- Pikachu tried again with another weak 5-damage attack
- Bulbasaur finished the job with another 23-damage blow, knocking out Pikachu completely

Result: Bulbasaur wins!

Despite being poisoned and losing HP each turn, Bulbasaur completely dominated with attacks over 4× stronger than Pikachu's moves. Bulbasaur finished with 27 HP remaining, having taken minimal damage. This matchup heavily favored Bulbasaur.

______________________________________________________________________

交付物

该项目通过提供以下内容满足MCP技术评估:

  • 宝可梦数据资源(MCP资源)
  • 作战模拟工具(MCP工具)
  • 完整的设置说明
  • 可选FastAPI测试

______________________________________________________________________

鸣谢

由开发 Dimple Kundu 多亏了 斯科佩利 为了机会。

______________________________________________________________________

目录标签

目录标签

游戏开发FastAPIClaude数据分析Python本地部署AI训练对战模拟数据查询

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP