gpt-game-arena

gpt-game-arena

This MCP server enables playing chess, Quick Go (9x9), Go (13x13), and Real Go (19x19) against GPT, with a React widget UI, deterministic difficulty-aware move selection, and authoritative rules/session handling for both ChatGPT plugin and standalone preview modes.

Category
访问服务器

README

GPT Game Arena

GPT Game Arena is a ChatGPT plugin/MCP app with a standalone preview. It offers seven presets: Chess, Tic-Tac-Toe, Connect Four, Reversi, and Go on 9×9, 13×13, or 19×19 boards. The React widget is a self-contained web/dist/index.html; the Node MCP server serves it at ui://gpt-game-arena/v6/widget.html, while /preview provides the same UI locally.

Architecture

The server is authoritative for all rules and sessions through five MCP 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.

Moves must be exact legalMoves entries: Chess uses long algebraic coordinates such as e2e4; Tic-Tac-Toe and Reversi use uppercase squares such as A1; Connect Four uses an uppercase column AG; and Go uses uppercase coordinates such as D4 (skipping I) or pass. Tic-Tac-Toe ends at three in a row; Connect Four applies gravity and ends at four in a row. Reversi flips bracketed discs, automatically skips a side with no legal move, and finishes with the higher disc score. Go uses positional superko and ends after two consecutive passes.

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 game-aware heuristics for chess, Tic-Tac-Toe, Connect Four, Reversi, and Go. Hard favors tactical or positional moves without claiming calibrated engine strength; Reversi can make consecutive GPT turns when an automatic skip leaves GPT to move again. 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 deterministic heuristics in standalone mode, not calibrated engines or Elo ratings. 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选