Token导航 LogoToken导航TokenDH.com
Pokemon Battle Server logo
运维云端stdio官方级别未说明来源级核验

Pokemon Battle Server

MCP Server

一个为AI模型提供宝可梦数据和战斗模拟功能的模型上下文协议服务器,包含基于Streamlit的MCP检查器用于可视化测试。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
游戏开发PythonClaudeClaude DesktopClaude

安装说明

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

作者 / 组织

ARYA-5012

提供方

ARYA-5012

最后核验

2026/5/17 20:23

运行时

Python

快速接入

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

命令预览

python -m venv .venv

详细介绍

宝可梦MCP服务器

一种模型上下文协议(MCP)服务器,为AI模型提供对口袋妖怪数据和战斗模拟功能的访问。包括一个基于Streamlit的MCP检查器,用于视觉测试。

Python MCP License

✨ 特性

  • 🎮 交互式作战系统 -有详细日志的回合制战斗
  • 📊 完整的口袋妖怪数据 -通过PokeAPI获取统计数据、类型、能力和动作
  • ⚔️ 战斗模拟 -类型有效性、损伤计算、状态效应
  • 🤖 MCP集成 -LLM访问的资源和工具
  • 🌐 流线型检查员 -用于测试MCP功能的可视化界面

🚀 快速开始

先决条件

  • Python 3.10+
  • 互联网连接(适用于PokeAPI)

安装

# Clone the repository
git clone https://github.com/yourusername/pokemon-mcp-server.git
cd pokemon-mcp-server

# Create virtual environment
python -m venv .venv

# Activate (Windows PowerShell)
.\.venv\Scripts\Activate.ps1

# Activate (macOS/Linux)
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

运行服务器

选项1:流线型MCP检查器(推荐)

cd pokemon-mcp-server
streamlit run app.py

在以下位置打开可视化界面 http://localhost:8501

选项2:交互式作战系统

python interactive_battle.py

选项3:MCP开发模式

mcp dev main.py

📋 项目结构

pokemon-mcp-server/              # Streamlit Interface
├── app.py                       # MCP Inspector UI
├── server_logic.py              # MCP resources & tools
└── requirements.txt             # Dependencies

pokemon-mcp-server-improved/     # Full MCP Server
├── src/pokemon_mcp/
│   ├── server.py               # MCP server implementation
│   ├── pokemon_data.py         # PokeAPI integration
│   ├── battle_mechanics.py     # Battle simulation engine
│   └── models.py               # Pydantic data models
├── main.py                     # Server entry point
├── interactive_battle.py       # Interactive battle CLI
├── test_server.py              # Basic tests
└── test_assignment_requirements.py  # Compliance tests

🔧 MCP资源和工具

资源

资源URI描述
pokemon://{name}获取全面的口袋妖怪数据
pokemon://search/{query}按名称搜索宝可梦
pokemon://types/{type}获取类型有效性信息

工具

工具说明
simulate_battle(pokemon1, pokemon2)模拟两个宝可梦之间的战斗
get_evolution_chain(pokemon)获取进化信息

⚔️ 战斗力学

  • 类型有效性:完整的18型矩阵(2x、0.5x、0x乘数)
  • 伤害公式:基于攻击/防御统计数据和移动能力
  • 翻转顺序:由速度统计决定
  • 状态效果:瘫痪、烧伤、中毒、睡眠、冰冻

🧪 测试

# Basic functionality test
python test_server.py

# Assignment requirements compliance
python test_assignment_requirements.py

# Quick demo
python quick_demo.py

🌐 Streamlit云部署

  1. 推一下 pokemon-mcp-server/ 文件夹到GitHub
  2. 首选 share.streamlit.io
  3. 点击 新应用程序 → 选择存储库→ 部署

🔌 Claude桌面集成

添加到您的Claude Desktop配置中:

{
  "mcpServers": {
    "pokemon": {
      "command": "python",
      "args": ["path/to/main.py"]
    }
  }
}

📖 示例用法

LLM资源查询

Resource: pokemon://pikachu

Returns:
- Base stats (HP, Attack, Defense, Sp.Atk, Sp.Def, Speed)
- Types, abilities, moves
- Evolution information

战斗模拟

{
  "tool": "simulate_battle",
  "arguments": {
    "pokemon1_name": "charizard",
    "pokemon2_name": "blastoise"
  }
}

🛠️ 故障排除

问题解决方案
未找到模块pip install -r requirements.txt
PokeAPI错误检查互联网连接
服务器挂起正常-MCP等待stdin。改用测试脚本

📝 许可证

MIT许可证-可以自由使用和修改。

______________________________________________________________________

准备好战斗了吗? 从...开始 python interactive_battle.pystreamlit run app.py 🏆

👨‍💻 作者

Arya Yadav

Bennett University

📧 Email | 🐙 GitHub

______________________________________________________________________

目录标签

目录标签

游戏开发PythonClaude宝可梦数据本地部署战斗模拟AI模型集成Streamlit界面

支持客户端

Claude DesktopClaude

接入字段

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

stdio

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

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdionone部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP