About Poké-Battle
Poké-Battle is a FastAPI and Python Pokémon game with turn-based battles and Anthropic Claude-generated commentary, move suggestions, and Pokémon personalities. It is for players seeking AI-generated elements alongside catching and battling.
Key features
- 01Catch random Pokémon
- 02Fight turn-based battles
- 03Generate AI battle commentary
- 04Get AI move recommendations
- 05Create Pokémon personalities
- 06Update game state with WebSocket
Use cases
- 01Build a team by catching Pokémon
- 02Battle a randomly selected opponent
- 03Get move suggestions during battles
- 04View generated stories for caught Pokémon
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEPoké-Battle
This is a Pokemon game built with FastAPI and Python, leveraging Anthropic's Claude AI for creative battle descriptions, attack recommendations, and generating unique personalities for caught Pokemon.
Tech Stack
- Backend: FastAPI, Uvicorn (ASGI server)
- AI Integration: Anthropic's Claude API, custom AI server (
ai_server.py) and client (ai_client.py) - External API: PokeAPI
- Frontend: HTML, CSS, JavaScript (served by FastAPI)
- Dependencies: python-dotenv, httpx, websockets, Jinja2
Setup Instructions
-
Clone the repository:
git clone <repository_url> cd <repository_directory> -
Create a virtual environment:
python -m venv .venv -
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate - On macOS and Linux:
source .venv/bin/activate
- On Windows:
-
Install dependencies:
pip install -r requirements.txt -
Set up your Anthropic API Key:
- Create a file named
.envin the root directory. - Add your Anthropic API key in the following format:
ANTHROPIC_API_KEY=your_api_key_here
Note: For security, it's recommended to manage API keys using environment variables provided by your hosting environment rather than storing them in a
.envfile, especially in production. - Create a file named
-
Run the AI Server: Open your terminal in the project root and run:
uvicorn ai_server:app --reload --port 8000 -
Run the Main Game Server: Open a new terminal in the project root (and activate the virtual environment if necessary) and run:
uvicorn server:app --reload --port 8080 -
Open the game in your browser: Go to
http://localhost:8080
Project Structure
server.py: Main FastAPI application handling game logic and serving the frontend.ai_server.py: FastAPI application handling communication with the Anthropic API.ai_client.py: Python client library used byserver.pyto communicate withai_server.py.index.html: The main frontend HTML file.static/: Directory for static assets (CSS, JavaScript, images - although currently only the directory is present).requirements.txt: Lists the Python dependencies.api.env: Environment file to load the API key (should be added to.gitignore)..gitignore: Specifies intentionally untracked files that Git should ignore.
Features
- Pokemon Catching: Catch random Pokemon to build your team.
- Pokemon Battles: Turn-based battles against a random opponent Pokemon.
- AI Battle Descriptions: Creative commentary for battle actions generated by Anthropic's Claude.
- AI Attack Recommendations: Get AI suggestions for the best move to use in battle.
- AI Pokemon Personalities: Each caught Pokemon gets a unique, AI-generated personality trait or backstory.
- Real-time Updates: Game state and messages updated via WebSocket.
- Responsive UI: Basic UI adjustments for better display of caught Pokemon.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.