Skip to content

About

A full-stack Pokemon interface for querying data, comparing stats, analyzing types, generating strategies, and building teams through natural language.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

The MCP Pokemon Interface is a full-stack natural language interface for exploring Pokemon data. Built with a Flask backend and a React frontend, it enables users to get Pokemon info, compare stats, analyze types, generate strategies, and build teams using conversational input.


Requirements:

  • Python 3.9+
  • pip

Steps:

cd mcp_server
pip install -r requirements.txt
python app.py

This starts the Flask API on http://localhost:5000.

Frontend Setup

Requirements:

  • Node.js
  • npm

Steps:

cd frontend
npm install
npm run dev

This runs the React frontend on http://localhost:5173.


🗂 Backend Structure Overview

mcp_server/
│
├── api/                  # Module endpoints
│   ├── compare.py        # Pokémon comparison
│   ├── pokemon.py        # Pokémon info
│   ├── strategy.py       # Strategy suggestions
│   ├── team.py           # Team builder
|   |-- nlp.py            # natural language
│   ├── type_info.py      # Type matchups
│   └── __init__.py
│
├── services/             # NLP and data fetching
│   ├── parser.py         # Parses natural language
│   ├── fetcher.py        # Fetches data from APIs
│   └── __init__.py
│
├── app.py                # Launch script
├── config.py             # App settings
├── run.py                
├── requirements.txt      # Python dependencies
└── logs/                 # Optional runtime logs

🧠 Available Modules and Usage

The app uses a single NLP endpoint that routes queries to the correct module:

  • Pokémon Info
    Get basic stats and type info.
    Example: Tell me about Pikachu

  • Type Info
    Check type strengths and weaknesses.
    Example: What is Grass weak against?

  • Strategy Suggestion
    Suggest movesets, battle tactics.
    Example: What is the best strategy for Alakazam?

  • Pokémon Comparison
    Compare stats, typing, and effectiveness.
    Example: Compare Gengar and Alakazam

  • Team Builder
    Generate a full team from a goal.
    Example: Make a team.


🌐 Web Interface Walkthrough

  1. Open http://localhost:5173 after starting the frontend.
  2. Select a module from the dropdown:
    • Search Info
    • Type Info
    • Strategy
    • Compare
    • Team Builder
  3. Enter a natural language query (e.g., Info about Charizard).
  4. Click Submit and view the formatted response.

Each module is in a dedicated component and styled for simplicity.


🛠 How the Team Builder Works

  • Accepts freeform input like:
    "Build me a team that counters Dragon-types"
  • The backend parser identifies goals, roles, and types.
  • The team.py module selects 6 synergistic Pokémon.
  • Returns a human-readable explanation with team composition.

🤖 Agent Integration Guide

To integrate this system with an AI agent:

  1. Send Queries to NLP Endpoint:

    • POST JSON with { "query": "your natural language question" } to /nlp.
  2. Receive Structured Response:

    • Backend routes it to the correct module.
    • Returns a readable natural language reply.
  3. Embed into Tools or Apps:

    • Use this API as the backend logic for chatbots, Discord bots, or voice assistants.

Example:

import requests

res = requests.post("http://localhost:5000/nlp", json={"query": "Compare Garchomp and Salamence"})
print(res.json())

🎬 Demo Instructions

  1. Run the backend and frontend.
  2. Visit localhost:5173.
  3. Try natural language queries across all modules.
  4. See responses formatted as paragraphs or explanations.

✅ Summary

  • Modular NLP backend (/nlp) with 5 functional routes.
  • React frontend with dynamic module switching.
  • Team builder based on type synergy and role diversity.
  • Designed to be embedded in tools and expanded easily.

About

A full-stack Pokemon interface for querying data, comparing stats, analyzing types, generating strategies, and building teams through natural language.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages