MCP Catalogs
Home

turn-based-game-mcp

by github-samples·31·Score 43

A turn-based games web app with MCP-powered AI opponents featuring Tic-Tac-Toe and Rock Paper Scissors.

ai-llmdeveloper-toolsproductivity
24
Forks
18
Open issues
this month
Last commit
2d ago
Indexed

Overview

This project is a demo showcasing MCP implementation in a turn-based games context. It features a Next.js frontend with a clean UI and a dedicated MCP server that provides AI opponents for games. The server implements specific MCP tools for game creation, AI moves, and game analysis, with multiple difficulty levels. While presented as a demo, it's well-structured with comprehensive documentation, TypeScript throughout, and a clear separation of concerns between web interface and MCP server logic.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Learning MCP implementation by studying the well-documented game server code
you:Building turn-based game applications with AI opponents using MCP
you:Creating educational tools to demonstrate MCP capabilities visually
you:Is this a production-ready application?
you:What MCP tools are available?

When to choose this

Developers looking for a practical MCP example that demonstrates AI interaction with a real application rather than abstract tools.

When NOT to choose this

Production game development needs, as this is explicitly a demo/learning tool, not a scalable gaming platform.

Tools this server exposes

6 tools extracted from the README
  • create_tic_tac_toe_game

    Create new Tic-Tac-Toe game

  • play_tic_tac_toe

    Make AI move in Tic-Tac-Toe

  • create_rock_paper_scissors_game

    Create new Rock Paper Scissors game

  • play_rock_paper_scissors

    Make AI choice in Rock Paper Scissors

  • wait_for_player_move

    Wait for human player to make their move

  • analyze_game

    Analyze current game state and provide insights

Comparable tools

mcp-server-templateai-game-servermcp-web-toolsgame-node-mcp

Installation

Installation

  1. Clone the repository:
git clone https://github.com/github-samples/turn-based-game-mcp.git
cd turn-based-game-mcp
  1. Install dependencies:
npm install
  1. Build the shared package (required first):
npm run build --workspace=shared
  1. Start the development servers:

**Frontend (Next.js):**

npm run dev --workspace=web

**MCP Server:**

npm run dev --workspace=mcp-server

Claude Desktop Configuration

Add the following to your Claude Desktop config.json:

{
  "mcpServers": {
    "turn-based-games": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "./turn-based-game-mcp/mcp-server"
    }
  }
}

FAQ

Is this a production-ready application?
No, this is intended as a demo to showcase MCP implementation visually, not as a production application.
What MCP tools are available?
The server provides tools for creating games (Tic-Tac-Toe and Rock Paper Scissors), making AI moves, waiting for player moves, and analyzing game states.

Compare turn-based-game-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.