charlie2233

GPT Game Arena

Community charlie2233
Updated

Play chess and Go against GPT in a ChatGPT app and MCP widget.

GPT Game Arena

GPT Game Arena is a ChatGPT plugin/MCP app with a standalone preview. It lets a player and GPT take turns in chess, Quick Go (9×9), Go (13×13), or full-board “Real Go” (19×19). The React widget is a self-contained web/dist/index.html; the Node MCP server serves it at ui://gpt-game-arena/v2/widget.html, while /preview provides the same UI locally.

Architecture

The server is authoritative for all rules and sessions. The widget uses five tools: create_game({ game, playerColor, boardSize?, difficulty? }), get_game_state({ gameId }), play_game_move({ gameId, actor, move, expectedVersion }), reset_game({ gameId }), and render_game({ gameId }). Go accepts boardSize 9, 13, or 19 and defaults to 9 when omitted. Difficulty accepts easy, medium, or hard and defaults to medium. Each successful tool output has structuredContent containing the complete game snapshot.

After a player move in ChatGPT, the widget asks GPT via ui/message to call get_game_state, follow the selected fixed difficulty guidance, choose one exact legalMoves entry, then call play_game_move as gpt using the version from that same fetched state. It polls for the result. The standalone preview uses deterministic difficulty-aware move selection: Easy is casual, Medium preserves the stable baseline, and Hard uses a one-ply chess/Go heuristic that favors tactics and position. No OPENAI_API_KEY is needed: GPT chooses moves through the host tool loop and the server never calls OpenAI.

reset_game is destructive and returns stateVersion: 0; treat it as a new epoch/ABA boundary, not a monotonic continuation. Reset preserves the selected game kind, player color, difficulty, and Go board size.

The Go engine uses positional superko, two-pass completion, and simplified Chinese-area scoring with 6.5 komi on every board size. The 19×19 preset is the full standard board, but this demo does not include a tournament dead-stone agreement phase after passing.

Local commands

npm install       # or npm ci (Node >=20.19 for this workspace build)
npm test
npm run typecheck
npm run build
npm run dev       # Node server, then visit /preview
npm run dev:web   # Vite widget development; run npm run dev:server alongside it
npm run preview   # Vite built-widget preview; run npm run dev:server alongside it

For MCP Inspector, build first, start npm run dev, and connect the inspector to http://localhost:8000/mcp using Streamable HTTP.

ChatGPT developer setup

Enable Developer mode at Settings → Security and login → Developer mode, then open ChatGPT Plugins → plus to add the server. Serve or tunnel a public HTTPS endpoint ending in /mcp, add the plugin/MCP server in ChatGPT, and refresh metadata whenever tools change. See the official Plugins quickstart and Connect ChatGPT deployment guide. The interaction design was inspired by the OpenAI Apps SDK examples, especially Cards Against AI.

Production and demo limits

This demo uses in-memory sessions (lost on restart), has no authentication or hosted deployment, and has not completed actual ChatGPT host acceptance. Difficulty is guidance for ChatGPT and a deterministic one-ply heuristic in standalone mode, not a calibrated Elo rating or dedicated chess/Go engine. The web workspace build requires Node >=20.19; the server remains Node 18.18-compatible, and an actual Node 18 built-server smoke is a separate gate. Production needs persistent authenticated storage, distributed quotas, HTTPS, observability, abuse controls, and explicit trusted-proxy configuration before honoring forwarded IP headers.

MCP Server · Populars

MCP Server · New

    DIDA-AI

    RollingGo Hotel MCP — Hotel Search & Booking

    Official DIDA Hotel Booking MCP Server. 14-year travel tech data stack, 2M+ hotels at wholesale rates, 40+ LLM compatible. Free unlimited calls for businesses & individual devs. Filter by location, date, star grade, guests & tags; pull real-time room types, pricing & cancellation rules.

    Community DIDA-AI
    micro

    mu

    A personal home server

    Community micro
    talivia-group

    Talivia Agent Kit

    Revenue-first website analytics installed and verified by AI agents through MCP

    Community talivia-group
    gura105

    Operational Ontology

    A minimal, readable reference implementation of the Operational Ontology pattern. Palantir Foundry is one implementation; this is the concept, minimized.

    Community gura105
    EllisMorrow

    Caelune

    Caelune (星野) — Local-first retrieval for private Markdown, PDF, and Tika documents, with a Windows desktop app and read-only MCP server.|本地优先的私人知识检索工具。

    Community EllisMorrow