MCP.so
登录

Poké-Battle

@shreyahhh

关于 Poké-Battle

暂无概览

基本信息

分类

AI 与智能体

运行时

html

传输方式

stdio

发布者

shreyahhh

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "Pokemon-Battle-using-MCP-Server-connected-to-Claude": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        ".venv"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Poké-Battle?

Poké-Battle is a Pokemon game built with FastAPI and Python, leveraging Anthropic’s Claude AI through a custom Model Context Protocol (MCP) server and client. It features real-time battles and uses AI for creative battle descriptions, attack recommendations, and generating unique personalities for caught Pokemon.

How to use Poké-Battle?

Clone the repository, create and activate a Python virtual environment, then install dependencies. Set your Anthropic API key in a .env file, run the MCP server on port 8000 (uvicorn mcp_server:app --reload --port 8000), then run the main game server on port 8080 (uvicorn server:app --reload --port 8080). Open http://localhost:8080 in your browser to play.

Key features of Poké-Battle

  • Catch random Pokemon to build your team.
  • Turn-based battles against a random opponent Pokemon.
  • AI‑generated battle descriptions via Claude.
  • AI‑suggested attack moves during battle.
  • Each caught Pokemon gets a unique, AI‑generated personality.
  • Real‑time game state and message updates via WebSocket.
  • Demonstrates a Model Context Protocol for AI model interaction.

Use cases of Poké-Battle

  • Play a Pokemon battle game with AI‑driven narratives.
  • Learn how to integrate Anthropic’s Claude into a web game using MCP.
  • Experiment with real‑time WebSocket updates in a FastAPI application.
  • Showcase creative AI text generation for game commentary.

FAQ from Poké-Battle

What dependencies does Poké-Battle require?

The project requires Python, FastAPI, Uvicorn, Anthropic’s Claude API (via API key), PokeAPI, and libraries such as python-dotenv, httpx, websockets, and Jinja2.

How do I set up the Anthropic API key?

Create a .env file in the root directory and add ANTHROPIC_API_KEY=your_api_key_here. For production, it’s recommended to use environment variables from your hosting environment instead of a .env file.

Do I need to run two servers?

Yes. The MCP server runs on port 8000 (the AI backend), and the main game server runs on port 8080 (handles game logic and serves the frontend). Both must be running simultaneously.

How does Poké-Battle use the MCP?

The MCP server (mcp_server.py) handles communication with the Anthropic API. The main server (server.py) uses an MCP client (mcp_client.py) to send requests to the MCP server, enabling AI features like battle descriptions, attack suggestions, and Pokemon personalities.

What transport does Poké-Battle use?

Game state and messages are updated in real time via WebSocket. The MCP communication between servers uses HTTP (FastAPI endpoints).

评论

AI 与智能体 分类下的更多 MCP 服务器