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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.