dexMCP
A Model Context Protocol server that wraps pypokedex to provide Pokemon data tools for MCP-compatible applications.
README
dexMCP
<p align='center'> <img src='https://raw.githubusercontent.com/RajeevAtla/dexMCP/main/assets/logo.png'/> </P>
dexMCP is a Model Context Protocol (MCP) server that wraps the community maintained pypokedex client for the PokeAPI. It exposes curated tools so MCP compatible applications can fetch Pokedex data without custom API plumbing.
Key capabilities
- Query any Pokemon by name or national number and receive metric aware base stats.
- Pull localized flavor text so agents can present in universe descriptions for each game version.
- Inspect move learnsets for a chosen game so automation chains pick the right actions.
- Map evolution chains, encounter locations, and breeding requirements without bespoke glue code.
- Run roster analysis with coverage reports and simple moveset tips for battle planning.
Available tools
get_pokemon- Required:
name_or_dex - Optional: none
- Returns:
PokemonSummarywith stats, types, height, weight, and base experience.
- Required:
get_moves- Required:
name_or_dex,game - Optional: none
- Returns: list of
Moveentries with learn method and optional level.
- Required:
get_sprites- Required:
name_or_dex - Optional:
side(frontorback),variant(default,shiny,female,female_shiny) - Returns:
SpriteURLcontaining the resolved image link.
- Required:
get_descriptions- Required:
name_or_dex - Optional:
language(defaults toen) - Returns: mapping of game version to flavor text strings.
- Required:
analyze_type_coverage- Required:
names_or_dexeslist - Optional: none
- Returns:
TypeCoverageReportsummarizing defensive matchups.
- Required:
explore_abilities- Required:
name_or_dex - Optional: none
- Returns:
AbilityExplorerResultwith effect text and hidden ability flag.
- Required:
plan_evolutions- Required:
name_or_dex - Optional: none
- Returns:
EvolutionReportthat enumerates triggers and branching paths.
- Required:
find_encounters- Required:
name_or_dex - Optional: none
- Returns:
EncounterReportgrouped by location and game version.
- Required:
get_breeding_info- Required:
name_or_dex - Optional:
gameto scope egg moves - Returns:
BreedingInfowith egg groups, hatch steps, gender split, and egg moves.
- Required:
suggest_moveset- Required:
name_or_dex,game - Optional:
limit(default 4),include_tm(defaultfalse) - Returns:
MovesetRecommendationordered by heuristic score.
- Required:
Getting started
Prerequisites
- Python 3.10 or newer.
uvfor dependency management and running scripts.- An MCP aware client (or the Python
mcppackage) that can launch stdio servers. - Internet access so
pypokedexcan query PokeAPI the first time a Pokemon is requested.
Clone and install dependencies
git clone https://github.com/RajeevAtla/dexMCP.git
cd dexMCP
uv venv
uv sync
The runtime requirements are mcp (for FastMCP), pypokedex, requests,
dspy-ai, langchain, langchain-openai, gradio, and the transitive
pydantic dependency.
Run the MCP server
uv run python -m dexmcp.server
The server speaks MCP over stdio. Configure an MCP client to launch the command above and it will auto discover the tools listed earlier.
Example: run the DSPy demo agent
The repository ships dspy_client.py, a minimal DSPy client that connects to
this server and calls the appropriate tools to satisfy natural language
requests. Activate your virtual environment and run the curated demo suite:
uv run python dspy_client.py --demo
The agent chains several tools to:
-
Retrieve Garchomp stats and ORAS level up moves.
-
Audit defensive coverage for Pikachu, Garchomp, and Gyarados.
-
Surface Gengar abilities and Eevee evolution branches.
-
List Dratini encounter methods in FireRed and LeafGreen.
-
Summarize Sylveon breeding info and egg moves in Sword and Shield.
-
Recommend a Greninja moveset for Sun and Moon.
Provide your own prompt with:
uv run python dspy_client.py \
"Compare Charizard and Tyranitar defensive coverage in scarlet-violet."
Add --demo alongside the prompt to run the canned sequence afterward.
Example: run the LangChain demo agent
Ensure OPENAI_API_KEY (or another provider key supported by your LangChain
LLM) is present in the environment. Then launch the demo:
uv run python langchain_client.py --demo
The LangChain agent mirrors the DSPy scenarios, exercising the coverage, ability, evolution, encounter, breeding, and moveset tools.
Supply a custom prompt with:
uv run python langchain_client.py \
"Plan a battle ready moveset for gardevoir in scarlet-violet."
Use --demo with a prompt to run it first before the guided walkthrough.
Example: run the Gradio demo
The Gradio UI wraps the LangChain agent and calls DexMCP tools over stdio.
Ensure OPENAI_API_KEY (or another provider key supported by your LangChain
LLM) is set.
uv run python gradio_demo.py
Optionally select a different model or share a public link:
uv run python gradio_demo.py --model gpt-4o-mini --share
Gradio hot reload
Use Gradio's reload mode to auto-restart on changes. On Windows, set
GRADIO_SERVER_NAME and GRADIO_SERVER_PORT for the host/port:
set PYTHONPATH=C:\dexMCP
set GRADIO_SERVER_NAME=127.0.0.1
set GRADIO_SERVER_PORT=7860
uv run gradio gradio_demo.py
Testing
uv sync --group dev
uv run pytest
Pytest configuration (including coverage flags) lives in pyproject.toml.
Project structure
.
|-- dexmcp/
| |-- abilities.py # Ability lookup helper
| |-- api.py # PokeAPI + pypokedex helpers and caching
| |-- breeding.py # Egg group and breeding helpers
| |-- coverage.py # Type coverage analysis
| |-- encounters.py # Wild encounter lookups
| |-- evolution.py # Evolution chain traversal
| |-- models.py # Pydantic schemas
| |-- moveset.py # Moveset recommendation logic
| |-- pokemon.py # Core Pokemon lookup helpers
| `-- server.py # FastMCP server and tool wrappers
|-- assets/
| `-- logo.png # Logo used in the README banner
|-- dspy_client.py # DSPy demo agent that consumes the server
|-- gradio_demo.py # Gradio + LangChain demo UI
|-- langchain_client.py # LangChain demo agent for the same tools
|-- LICENSE.md # MIT License
|-- README.md
Data source and caching
pypokedex wraps PokeAPI and caches responses on disk under the user cache
folder. The first lookup for a Pokemon may take a second while data is fetched;
subsequent calls are served from the local cache.
License
DexMCP is distributed under the MIT License. See LICENSE.md for full terms.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。