Pokemon MCP Server

Pokemon MCP Server

Simulates a Pokemon battle system by providing tools for managing Pokemon, executing turn-based combat, and analyzing type effectiveness. It enables AI models to facilitate interactive battles, generate random creatures, and implement complex battle strategies.

Category
访问服务器

README

Pokemon MCP Server - Interview Demo

Overview

This is a Model Context Protocol (MCP) server that simulates a Pokemon battle system. Your task is to integrate this server with Claude or a ChatGPT-compatible client to enable AI-powered Pokemon battles.

The server provides tools for:

  • Generating and retrieving Pokemon
  • Starting battles between Pokemon
  • Executing attacks with type effectiveness
  • Checking battle status and type matchups

Technical Requirements

  • Node.js 18+
  • npm or yarn
  • Claude Desktop app OR a ChatGPT-compatible MCP client
  • Basic understanding of TypeScript and MCP

Installation

  1. Clone this repository:
git clone https://github.com/thesidshah/pokemon-mcp.git
cd pokemon-mcp-server
  1. Install dependencies:
npm install
  1. Build the TypeScript code:
npm run build

Server Architecture

The server implements the MCP protocol with the following tools:

Available Tools

  1. get_random_pokemon - Generate a random Pokemon with stats and moves

    • Optional: level (1-100)
  2. get_pokemon_by_name - Retrieve a specific Pokemon

    • Required: name (string)
    • Optional: level (1-100)
  3. list_all_pokemon - List all available Pokemon in the database

  4. start_battle - Initialize a battle between two Pokemon

    • Required: pokemon1_name, pokemon2_name (strings)
    • Optional: pokemon1_level, pokemon2_level (1-100)
  5. attack - Execute an attack in the current battle

    • Required: attacker_name, move_name (strings)
  6. get_battle_status - Check the current battle state

  7. get_type_effectiveness - Query type effectiveness chart

    • Required: attacking_type (string)
    • Optional: defending_type (string)

Interview Task

Part 1: Basic Integration (30 minutes)

  1. Configure the MCP server in your chosen client (Claude Desktop or ChatGPT-compatible)
  2. Test basic functionality:
    • List all available Pokemon
    • Generate a random Pokemon
    • Get a specific Pokemon by name

Part 2: Battle Implementation (45 minutes)

  1. Start a battle between two Pokemon

  2. Implement a full battle sequence:

    • Check initial battle status
    • Execute attacks from both Pokemon
    • Handle type effectiveness
    • Determine the winner
  3. Document any issues or limitations you encounter

Part 3: Advanced Features (45 minutes)

Choose ONE of the following tasks:

Option A: Battle Strategy Assistant

  • Create prompts that make the AI analyze type matchups
  • Have the AI suggest optimal moves based on type effectiveness
  • Implement a "battle advisor" that predicts battle outcomes

Option B: Pokemon Team Builder

  • Design a system to create balanced teams
  • Consider type coverage and stat distributions
  • Generate team recommendations based on user preferences

Option C: Tournament System

  • Implement a bracket-style tournament
  • Track wins/losses across multiple battles
  • Generate tournament summaries and statistics

Integration Guide

For Claude Desktop

  1. Locate your Claude Desktop configuration:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the server configuration:

{
  "mcpServers": {
    "pokemon-server": {
      "command": "node",
      "args": ["path/to/built/index.js"],
      "cwd": "path/to/pokemon-mcp-server"
    }
  }
}
  1. Restart Claude Desktop

For ChatGPT/Other Clients

Consult your client's documentation for MCP server integration. The server uses stdio transport on standard input/output.

Evaluation Criteria

Your submission will be evaluated on:

  1. Successful Integration (25%)

    • Server properly configured and running
    • All tools accessible from the AI client
  2. Feature Implementation (35%)

    • Core battle mechanics working correctly
    • Proper error handling
    • Creative use of available tools
  3. Code Quality (20%)

    • Clear, well-documented prompts
    • Logical conversation flow
    • Effective use of AI capabilities
  4. Problem Solving (20%)

    • How you handle limitations or issues
    • Creative solutions to challenges
    • Understanding of the MCP protocol

Submission Requirements

Please provide:

  1. Configuration files - Your client configuration

  2. Conversation logs - Export of your AI conversations demonstrating functionality

  3. Documentation - A brief write-up (300-500 words) covering:

    • Integration process and any challenges
    • Your approach to the advanced feature
    • Suggestions for server improvements
    • Any bugs or limitations discovered
  4. Optional bonus: Any code modifications or extensions to the server

Tips and Hints

  • The server maintains a single battle state - only one battle can be active at a time
  • Type effectiveness follows standard Pokemon rules (2x, 0.5x, 0x damage)
  • STAB (Same Type Attack Bonus) is implemented (1.5x damage)
  • Speed determines turn order
  • The AI should handle move selection intelligently based on type matchups

Troubleshooting

Common issues:

  1. Server not connecting: Check file paths in configuration
  2. Tools not appearing: Ensure server is built and path points to compiled JS
  3. Battle state issues: Remember only one battle can be active
  4. Type effectiveness: Reference the built-in type chart with get_type_effectiveness

Time Limit

Total time: 2 hours

  • Setup and basic integration: 30 minutes
  • Battle implementation: 45 minutes
  • Advanced feature: 45 minutes

Good luck, and may the best trainer win!

Appendix: Pokemon Database

Available Pokemon:

  • Bulbasaur (Grass/Poison)
  • Charmander (Fire)
  • Squirtle (Water)
  • Pikachu (Electric)
  • Snorlax (Normal)
  • Mewtwo (Psychic)
  • Gengar (Ghost/Poison)
  • Dragonite (Dragon/Flying)
  • Lucario (Fighting/Steel)
  • Garchomp (Dragon/Ground)

Move types available: Normal, Fire, Water, Electric, Grass, Ice, Ground, Psychic, Ghost, Dragon

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选