pokemcp
An MCP server that exposes the PokéAPI as tools and resources, allowing AI assistants to look up Pokémon data in real time without configuration.
README
pokemcp
A Model Context Protocol (MCP) server that exposes the PokéAPI as tools and resources, letting any MCP-compatible AI assistant look up Pokémon data in real time.
Features
- 22 tools across Pokémon, moves, items, and types
- 8 MCP resources for direct URI-based data access
- Optional Redis caching with a local in-memory fallback
- Automatic retry with exponential back-off on API errors
- Zero configuration required — works out of the box against the public PokéAPI
Requirements
- Python ≥ 3.11
- uv package manager
Installation
git clone https://github.com/Ragde54/pokemcp.git
cd pokemcp
uv sync
Running the server
PYTHONPATH=src uv run pokemcp
Note: The
PYTHONPATH=srcprefix is required due to a known incompatibility between Homebrew Python's venv and editable-install.pthfile processing.
Claude Desktop integration
Add the following to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"pokemcp": {
"command": "uv",
"args": ["run", "pokemcp"],
"cwd": "/path/to/pokemcp",
"env": {
"PYTHONPATH": "/path/to/pokemcp/src"
}
}
}
}
Replace /path/to/pokemcp with the absolute path to this repository, then restart Claude Desktop.
Configuration
Settings are read from environment variables or a .env file in the project root.
| Variable | Default | Description |
|---|---|---|
POKEAPI_BASE_URL |
https://pokeapi.co/api/v2 |
PokéAPI base URL |
REDIS_URL |
(none) | Redis URL for persistent caching (e.g. redis://localhost:6379). If unset, an in-memory cache is used. |
CACHE_TTL |
3600 |
Cache time-to-live in seconds |
LOG_LEVEL |
INFO |
Python logging level |
Tools
🐾 Pokémon
| Tool | Description |
|---|---|
get_pokemon(name_or_id) |
Full Pokémon details: types, stats, abilities, sprites, forms, held items, and more |
get_pokemon_species(name_or_id) |
Species data: Pokédex flavor text, habitat, generation, legendary/mythical status, gender rate |
get_pokemon_stats(name_or_id) |
Base stats (HP, Attack, Defense, Sp. Atk, Sp. Def, Speed) plus total BST |
get_pokemon_abilities(name_or_id) |
All abilities and whether each is a hidden ability |
get_evolution_chain(name_or_id) |
Full evolution chain with trigger conditions |
list_pokemon(limit, offset) |
Paginated list of all Pokémon (max 100 per page) |
search_pokemon_by_type(type_name) |
All Pokémon belonging to a given type |
⚔️ Moves
| Tool | Description |
|---|---|
get_move(name_or_id) |
Full move details: type, power, accuracy, PP, damage class, effect, and more |
get_move_summary(name_or_id) |
Concise move summary with effect description |
get_moves_learned_by_pokemon(name_or_id) |
All moves a Pokémon can learn, grouped by learn method (level-up, TM/HM, egg, tutor) |
list_moves(limit, offset) |
Paginated list of all moves (max 100 per page) |
get_moves_by_type(type_name) |
All moves that belong to a specific type |
🎒 Items
| Tool | Description |
|---|---|
get_item(name_or_id) |
Full item details: category, cost, effect, attributes, and held-by Pokémon |
get_item_summary(name_or_id) |
Concise item summary with short effect and Pokédex flavor text |
list_items(limit, offset) |
Paginated list of all items (max 100 per page) |
get_items_by_category(category) |
All items in a category (e.g. pokeballs, healing, held-items, berries, evolution) |
get_item_held_by_pokemon(item_name) |
All Pokémon that hold an item in the wild, with per-version rarity |
🔥 Types
| Tool | Description |
|---|---|
get_type(name_or_id) |
Full type details including damage relations, resident Pokémon, and moves |
get_type_matchups(attacking_type) |
Offensive chart: super effective / not very effective / no effect / normal |
get_type_defenses(defending_type) |
Defensive chart: weak to / resists / immune to |
get_dual_type_matchups(type_one, type_two) |
Combined defensive multipliers for a dual-type Pokémon (4×, 2×, 1×, 0.5×, 0.25×, 0×) |
list_types() |
List all 18 Pokémon types |
Resources
Resources are accessible via URI and return raw JSON.
| URI pattern | Description |
|---|---|
pokedex://pokemon/{name_or_id} |
Full Pokémon data |
pokedex://species/{name_or_id} |
Species data including Pokédex entries |
pokedex://move/{name_or_id} |
Full move data |
pokedex://item/{name_or_id} |
Full item data |
pokedex://type/{name_or_id} |
Full type data with damage relations |
pokedex://ability/{name_or_id} |
Ability data with effect descriptions |
pokedex://generation/{name_or_id} |
Generation data with Pokémon species and version groups |
pokedex://pokedex/{name_or_id} |
Regional Pokédex entries (e.g. national, kanto) |
Project structure
src/pokemcp/
├── app.py # Shared FastMCP instance
├── server.py # Entry point — imports all tools/resources
├── config.py # Settings via pydantic-settings
├── api/
│ ├── client.py # Async HTTP client with retry logic
│ └── cache.py # Redis / in-memory cache layer
├── models/
│ └── pokemon.py # Pydantic models (Pokemon, PokemonSummary, EvolutionChain)
├── tools/
│ ├── pokemon.py # Pokémon tools
│ ├── moves.py # Move tools
│ ├── items.py # Item tools
│ └── types.py # Type tools
└── resources/
└── pokedex.py # MCP resources
Data source
All data is fetched from the PokéAPI — a free, open REST API for Pokémon data. No API key required.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。