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.
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:
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 READMEcreate_tic_tac_toe_gameCreate new Tic-Tac-Toe game
play_tic_tac_toeMake AI move in Tic-Tac-Toe
create_rock_paper_scissors_gameCreate new Rock Paper Scissors game
play_rock_paper_scissorsMake AI choice in Rock Paper Scissors
wait_for_player_moveWait for human player to make their move
analyze_gameAnalyze current game state and provide insights
Comparable tools
Installation
Installation
- Clone the repository:
git clone https://github.com/github-samples/turn-based-game-mcp.git
cd turn-based-game-mcp- Install dependencies:
npm install- Build the shared package (required first):
npm run build --workspace=shared- Start the development servers:
**Frontend (Next.js):**
npm run dev --workspace=web**MCP Server:**
npm run dev --workspace=mcp-serverClaude 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
Last updated · Auto-generated from public README + GitHub signals.