Pokémon AI Demo

by GomesAdhikari

195 downloads
Not rated
GitHub

About

MCP server for agentic AI to withdraw information

Details

Author
GomesAdhikari
Downloads
195
Categories
Other

- Pokémon info lookup with stats, abilities, moves, and evolution
- Side-by-side comparison of two Pokémon
- Counter suggestions based on weaknesses
- AI-generated team builder from a natural language description
- Web UI with four interactive cards for each function
- JSON API endpoints for external agent integration

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Pokémon AI Demo
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The system is deployed locally by setting up the Django backend (cd mcp_server, install dependencies, run migrations, start server with python manage.py runserver) and the React frontend (cd mcp_frontend, install packages via npm, start with npm start). Environment variables POKE_API_URL and GOOGLE_API_KEY are required in a .env file inside the mcpserver folder. Users interact through the web UI (four card-based sections) or by sending JSON POST requests directly to the API endpoints (/api/agent/pokemon-info/, /api/agent/compare/, /api/agent/strategy/, /api/agent/team/).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pok\u00e9mon ai demo": {
            "Pokeapi-MCP": {
                "command": "python",
                "args": [
                    "manage.py",
                    "migrate"
                ]
            }
        }
    }
}

McpServers

{
    "Pokeapi-MCP": {
        "command": "python",
        "args": [
            "manage.py",
            "migrate"
        ]
    }
}

Pokémon AI Demo

A full-stack application for exploring Pokémon data, comparing Pokémon, suggesting counters, and generating teams using AI. The system features a Django REST API backend and a React/MUI frontend.

---

Table of Contents

- System Setup and Deployment - Available Modules and Their Use - How to Use the Team Builder - Web Interface Walkthrough - Instructions for Agent Integration

---

System Setup and Deployment

Prerequisites

- Python 3.8+ (for backend) - Node.js 16+ & npm (for frontend) - pip (Python package manager)

Backend Setup (Django/DRF)

1. Navigate to the backend directory:
   cd mcp_server
   
2. Install dependencies:
   pip install -r requirements.txt
   
3. Run migrations:
   python manage.py migrate
   
4. Start the backend server:
   python manage.py runserver
   
The API will be available at http://127.0.0.1:8000/api/.

Frontend Setup (React/MUI)

1. Navigate to the frontend directory:
   cd mcp_frontend
   
2. Install dependencies:
   npm install
   npm install @mui/material @emotion/react @emotion/styled
   npm install @mui/icons-material


3. Start the frontend server:
   npm start

The app will be available at http://localhost:5173/.

4. Start the app automatically -

In terminal run command start.bat (for windows)

start.sh for (linux distro)

Environment Variables

- By default, the frontend expects the backend at http://127.0.0.1:8000/api/agent/. Adjust API_BASE in mcp_frontend/src/App.jsx if needed.

---

dotenv structure (.env)
- make a .env file inside mcpserver folder
- contents -
"
POKE_API_URL = "https://pokeapi.co/api/v2/"
GOOGLE_API_KEY = "your api key"
"

---

Available Modules and Their Use

The backend exposes four main endpoints:

1. Pokémon Info (POST /api/agent/pokemon-info/)
- Input: { "name": "pikachu" }
- Output: Basic info, stats, abilities, moves, evolution, and flavor text.

2. Compare Pokémon (POST /api/agent/compare/)
- Input: { "pokemon1": "pikachu", "pokemon2": "bulbasaur" }
- Output: Stat-by-stat comparison, type advantage, shared/unique abilities.

3. Suggest Counters (POST /api/agent/strategy/)
- Input: { "name": "charizard" }
- Output: Weaknesses and recommended counter Pokémon.

4. Team Builder (POST /api/agent/team/)
- Input: { "description": "balanced team with fire and water types" }
- Output: AI-generated team with roles and images.

---

How to Use the Team Builder

- Purpose: Generate a Pokémon team based on a natural language description (e.g., "offensive team with good type coverage").
- How to Use:
1. Go to the "Generate Team" section in the web UI.
2. Enter your team description in the input field.
3. Click "Generate".
4. The AI will return a team of Pokémon, each with a name, role, and image.
- API Usage:
- Send a POST request to /api/agent/team/ with { "description": "your team idea" }.
- Receive a structured team suggestion in the response.

---

Web Interface Walkthrough

The web app is organized into four main cards:

1. Search for Pokémon
- Enter a Pokémon name to view its stats, types, abilities, moves, evolution chain, and flavor text.
2. Compare Two Pokémon
- Enter two Pokémon names to compare their stats, type advantages, and abilities side-by-side.
3. Suggest Counters
- Enter a Pokémon name to see its weaknesses and recommended counters.
4. Generate Team
- Describe your desired team and get an AI-generated team with roles and images.

Each section provides instant feedback, loading indicators, and error messages for a smooth user experience.

---

Instructions for Agent Integration

You can integrate external agents or scripts with the backend API. Example usage:

- Python Example:

  import requests
response = requests.post('http://127.0.0.1:8000/api/agent/pokemon-info/', json={"name": "pikachu"})
print(response.json())

- Endpoints:
- /api/agent/pokemon-info/ (POST)
- /api/agent/compare/ (POST)
- /api/agent/strategy/ (POST)
- /api/agent/team/ (POST)
- Request/Response Format: All endpoints accept and return JSON.

---

License

This project is for educational/demo purposes and is not affiliated with Nintendo, Game Freak, or The Pokémon Company.
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.