Pokédex MCP Server

Pokédex MCP Server

Enables AI agents to access comprehensive Pokémon data through PokeAPI, including detailed Pokémon information, type effectiveness charts, encounter locations, and search capabilities. Provides a complete toolkit for retrieving stats, abilities, sprites, battle mechanics, and wild encounter data for all Pokémon.

Category
访问服务器

README

Pokédex MCP Server

A Model Context Protocol (MCP) server that provides comprehensive Pokémon data access through the PokeAPI. This server enables AI agents to fetch detailed Pokémon information, type effectiveness charts, encounter locations, and search capabilities.

Features

  • Detailed Pokémon Information: Get comprehensive data including stats, abilities, types, sprites, and artwork
  • Type Effectiveness: Complete damage relationship charts for all Pokémon types
  • Encounter Locations: Wild encounter data with locations, levels, and capture methods
  • Search Functionality: Find Pokémon by partial name matching
  • REST API Client: Full TypeScript client for PokeAPI v2 with type safety
  • Zod Validation: Runtime schema validation for all tool inputs
  • Clean Architecture: Modular design with separated concerns

Architecture

The server is built with a clean, modular architecture:

src/
├── index.ts       # MCP server entry point and transport setup
├── tools.ts       # MCP tool definitions and registration
├── client.ts      # PokeAPI REST client with TypeScript types
├── formatters.ts  # Response formatting utilities
└── fetcher.ts     # GraphQL client (legacy, replaced by REST client)

Core Components

  • MCP Server: Uses @modelcontextprotocol/sdk for protocol compliance
  • REST API Client: Comprehensive PokeAPI v2 client with full TypeScript support
  • Zod Validation: Runtime type checking and schema validation
  • Response Formatters: Centralized formatting for consistent output

Available Tools

fetch_pokemon

Fetch detailed information about a Pokémon by name or ID.

Parameters:

  • name (string): The name or ID of the Pokémon

Example Response:

**pikachu** (ID: 25)
Height: 4 decimetres (0.4m)
Weight: 60 hectograms (6.0kg)
Base Experience: 112
Order: 35

**Types:** electric
**Abilities:** static, lightning-rod (hidden)
**Base Stats:** hp: 35, attack: 55, defense: 40, special-attack: 50, special-defense: 50, speed: 90

**Sprites:**
- Default: https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/25.png
- Shiny: https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/25.png
- Artwork: https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/25.png

get_type_effectiveness

Get type effectiveness information including strengths, weaknesses, and resistances.

Parameters:

  • name (string): The name or ID of the type

Example Response:

**FIRE Type Effectiveness**

**Strong Against (2x damage to):** grass, ice, bug, steel
**Weak Against (0.5x damage to):** fire, water, rock, dragon
**No Effect Against (0x damage to):** None

**Resistant To (0.5x damage from):** fire, grass, ice, bug, steel, fairy
**Vulnerable To (2x damage from):** water, ground, rock

**Pokémon with this type:** charmander, charmeleon, charizard, vulpix, ninetales, growlithe and 58 more...

get_pokemon_encounters

Get location encounter information for a Pokémon.

Parameters:

  • name (string): The name or ID of the Pokémon

Example Response:

**pikachu Encounter Locations:**

**viridian forest:**
  red: walk (Lv.3-5, 5% chance)
  blue: walk (Lv.3-5, 5% chance)
  yellow: walk (Lv.4-6, 100% chance)

**power plant:**
  red: walk (Lv.20-24, 25% chance)
  blue: walk (Lv.20-24, 25% chance)

search_pokemon

Search for Pokémon by partial name match.

Parameters:

  • query (string): Partial name to search for

Example Response:

**Search results for "char":**

1. charmander (ID: 4)
2. charmeleon (ID: 5)
3. charizard (ID: 6)

*Use fetch_pokemon with any of these names to get detailed information.*

Installation

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm

Setup

  1. Clone and install dependencies:

    git clone <repository>
    cd pokedex
    pnpm install
    
  2. Build the project:

    pnpm build
    
  3. Run the server:

    node dist/index.js
    

Development

Project Structure

pokedex/
├── src/
│   ├── index.ts       # Server entry point
│   ├── tools.ts       # MCP tool definitions  
│   ├── client.ts      # PokeAPI REST client
│   ├── formatters.ts  # Response formatting
│   └── fetcher.ts     # GraphQL client (legacy)
├── dist/              # Compiled JavaScript
├── package.json       # Dependencies and scripts
├── tsconfig.json      # TypeScript configuration
├── CLAUDE.md          # Development guidelines
└── README.md          # This file

Available Scripts

# Build TypeScript to JavaScript
pnpm build

# Run tests
pnpm test

# Build and run server
pnpm build && node dist/index.js

Development Guidelines

  • ES Modules: Project uses "type": "module" for modern JavaScript
  • TypeScript: Strict mode enabled with ES2022 target
  • Code Style: Formatted with consistent patterns
  • Validation: All inputs validated with Zod schemas
  • Error Handling: Comprehensive error catching and user-friendly messages

MCP Integration

Claude Desktop Integration

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "pokedex": {
      "command": "node",
      "args": ["/path/to/pokedex/dist/index.js"],
      "env": {}
    }
  }
}

Other MCP Clients

The server implements the standard MCP protocol and works with any compliant client:

  • Transport: stdio (standard input/output)
  • Protocol Version: 2025-06-18
  • Capabilities: tools (with listChanged support)

API Coverage

This server provides access to major PokeAPI v2 endpoints:

  • Pokémon Data: /pokemon/{id or name} - Complete Pokémon information
  • Type Information: /type/{id or name} - Type effectiveness and relationships
  • Encounter Data: /pokemon/{id}/encounters - Wild encounter locations
  • Search: /pokemon list endpoint for name-based searching

Dependencies

Runtime Dependencies

  • @modelcontextprotocol/sdk: MCP protocol implementation
  • zod: Runtime type validation and schema definition

Development Dependencies

  • typescript: TypeScript compiler and language support
  • @types/node: Node.js type definitions

Contributing

  1. Follow existing code patterns and architecture
  2. Maintain TypeScript strict mode compliance
  3. Add appropriate error handling for new features
  4. Update formatters for consistent response formatting
  5. Test with MCP clients before submitting changes

API References

  • PokeAPI: https://pokeapi.co/docs/v2
  • MCP Protocol: https://modelcontextprotocol.io
  • MCP TypeScript SDK: https://github.com/modelcontextprotocol/typescript-sdk

License

This project provides educational access to Pokémon data through the public PokeAPI service. All Pokémon data is owned by The Pokémon Company.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选