Poke-MCP
A Model Context Protocol server that provides comprehensive Pokemon data and battle simulation capabilities to AI assistants. It enables users to access detailed stats, types, and moves while simulating battles with realistic mechanics like type effectiveness and status effects.
README
Pokemon MCP Project 🎮
A Model Context Protocol (MCP) server that provides Pokemon data and battle simulation capabilities to AI assistants like Claude Desktop.
Features ✨
- Pokemon Data Resource: Access comprehensive Pokemon information including stats, types, abilities, and moves
- Battle Simulation Tool: Simulate battles between any two Pokemon with type effectiveness and status effects
- Type Effectiveness System: Accurate damage calculations based on Pokemon type matchups
- Status Effects: Burn, Poison, and Paralysis effects implemented
- Data Caching: Efficient caching system to minimize API calls
Project Structure 📁
Poke-MCP/
├── src/
│ ├── server.py # Main MCP server with the tool and the resource
│ ├── pokemon_types.py # Data classes for Pokemon, Moves, etc.
│ ├── datastore.py # Pokemon data fetching and caching
│ ├── battle.py # Battle simulation logic
│ ├── mechanics.py # Battle mechanics (damage, STAB, etc.)
│ ├── type_chart.py # Type effectiveness chart
│ └── utils.py # Utility functions and logging
├── data/ # Cache storage (created automatically)
├── .venv/ # Virtual environment
├── pyproject.toml # Project configuration and dependencies
└── README.md # This file
Prerequisites 📋
- Python 3.10 or higher
- pip (Python package manager)
- Internet connection (for fetching Pokemon data from PokeAPI)
Installation 🚀
Step 1: Clone/Download the Project
# If you have the zip file, extract it first
# Then navigate to the project directory
cd Poke-MCP
Step 2: Create Virtual Environment (Recommended)
# Windows
python -m venv .venv
.venv\Scripts\activate
# Mac/Linux
python -m venv .venv
source .venv/bin/activate
Step 3: Install Dependencies
# Using pyproject.toml (recommended)
pip install -e .
# Or using pip directly
pip install mcp[cli]>=1.2.0 httpx>=0.26.0
Running the Server 🎯
Basic Server Start
# Make sure virtual environment is activated
python -m src.server
Note: The server will run silently (no output) when working correctly. This is intentional - it's waiting for MCP client connections via STDIO.
Verify Server is Running
- The terminal will appear to "hang" - this means it's working!
- Press
Ctrl+Cto stop the server - Check that
data/andsrc/__pycache__/folders are created
Using with Claude Desktop 🤖
Step 1: Locate Claude Desktop Config
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
Step 2: Add Server Configuration
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"pokemon": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "C:/full/path/to/your/Poke-MCP"
}
}
}
--------------
If the above didn't work use the following:
--------------
{
"mcpServers": {
"pokemon": {
"command": "cmd",
"args": ["/c", "cd /d C:/full/path/to/your/Poke-MCP && .venv\\Scripts\\python.exe -m src.server"]
}
}
}
Important: Replace C:/full/path/to/your/Poke-MCP with your actual project path including the Poke-MCP in the end of the path!
Step 3: Restart Claude Desktop
If Claude Desktop is already running close it and reopen it to load the new configuration.
Step 4: Activate Tools and Include Resources if not
Usually if Claude Desktop detectes the server it activates the tools automatically, but the resources need to be included in the chat messages (new chat -> press the + button -> click on Add from pokemon -> click on pokemon_list) and then it will be added to this only specific message.
Step 5: Test in Claude
Ask Claude:
- "Can you list available Pokemon?"
- "Show me details about Pikachu"
- "Simulate a battle between Charizard and Blastoise"
Available MCP Resources 📚
List Pokemon
- Parameters: No parameters needed. Also either way Claude Desktop dosen't accept parameters in the resources.
- Returns: List of 20 Pokemons with mostly all of the information of each one of them!
Available MCP Tools 🛠️
Battle Simulation
-
Parameters:
pokemonA_name: Name or ID of first PokemonpokemonB_name: Name or ID of second PokemonpokemonA_level: Level of first Pokemon (1-100, default: 50)pokemonB_level: Level of second Pokemon (1-100, default: 50)pokemonA_moves: Optional list of moves for first PokemonpokemonB_moves: Optional list of moves for second Pokemonseed: Optional seed for reproducible battlesmax_turns: Maximum battle turns (default: 200)
-
Returns: JSON string with these fields:
winner — the winning Pokémon’s name (or a draw indicator)
turns — how many turns the battle took
log — an ordered list of turn-by-turn messages
summary — a short human-readable wrap-up
Troubleshooting 🔧
Server appears to hang with no output
This is normal! The server runs silently when using STDIO transport. It's waiting for client connections.
ImportError: No module named 'mcp'
Install dependencies:
pip install mcp[cli]>=1.2.0
Port already in use (when using inspector)
# Find and kill the process
netstat -ano | findstr :6277
taskkill /PID [PID_NUMBER] /F
KeyboardInterrupt traceback when stopping server
This is normal! It's Python's way of confirming the server stopped when you pressed Ctrl+C.
Implementation Details 🔍
Battle Mechanics
- Damage Formula: Uses simplified version of the official Pokemon damage formula.
- Type Effectiveness: Fire > Grass, Water > Fire, etc.
- STAB Bonus: 1.5x damage for moves matching Pokemon type.
- Critical Hits: 6.25% chance for 1.5x damage.
- Speed: Determines turn order.
- Status Effects:
- Burn: 1/16 HP loss per turn, halves physical damage
- Poison: 1/8 HP loss per turn
- Paralysis: 25% speed reduction, 25% chance to skip turn
Data Source
- Pokemon data fetched from PokeAPI
- Cached locally in
data/cache.jsonto reduce API calls
Project Requirements Met ✅
- ✅ MCP server implementation using FastMCP
- ✅ Pokemon data resource with comprehensive information
- ✅ Battle simulation tool with game mechanics
- ✅ Type effectiveness calculations
- ✅ Status effects (Burn, Poison, Paralysis)
- ✅ Turn order based on Speed stats
- ✅ Detailed battle logs
- ✅ Evolution information
- ✅ Move and ability data
If you encounter any issues:
- Check the Troubleshooting section above
- Ensure all dependencies are installed
- Verify Python version is 3.10+
- Check that the virtual environment is activated
Thank you.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。