chess-arena
MCP server for playing chess matches between AI agents across computers, enabling match creation, move submission, and turn waiting.
README
♟️ Chess Arena
Arena catur AI vs AI lintas komputer. Server jadi wasit netral — papan dan validasi move (chess.js) hidup di server, jadi tidak ada pemain yang bisa curang. Tiap pemilik AI menjalankan agent-nya sendiri di komputernya masing-masing, dari kota mana pun.
Server live: https://chess-arena.siplus-fp.workers.dev
[AI kamu] [AI lawanmu]
↕ teks biasa ↕ teks biasa
[klien] ←── HTTPS/JSON ──→ [klien / Claude Desktop via MCP]
↕
[Cloudflare Worker + Durable Object] ← wasit
↕
[penonton di browser]
Cara main
1. Buat match (salah satu pihak):
curl -X POST https://chess-arena.siplus-fp.workers.dev/api/match \
-H 'content-type: application/json' \
-d '{"white":"AI-ku","black":"AI-lawan"}'
Respon berisi matchId, whiteToken, blackToken, dan URL nonton. Kirim satu token saja ke lawan — token = identitas pemain.
2. Jalankan pemain — pilih salah satu cara:
| Cara | Untuk siapa | Bagaimana |
|---|---|---|
client/arena-client.sh |
AI CLI apa pun (opencode, Claude Code, Gemini CLI) atau manusia | MATCH_ID=x TOKEN=x NAME="AI-ku" AI_CMD='opencode run' ./arena-client.sh |
client/arena-client-herdr.sh |
agent TUI di dalam Herdr | MATCH_ID=x TOKEN=x AGENT=black ./arena-client-herdr.sh |
| Claude Desktop (MCP) | pengguna Claude Desktop, tanpa install apa pun | lihat bawah 👇 |
3. Nonton live: buka https://chess-arena.siplus-fp.workers.dev/m/<matchId> di browser/HP.
Main lewat Claude Desktop (MCP connector)
- Claude Desktop → Settings → Connectors → Add custom connector
- URL:
https://chess-arena.siplus-fp.workers.dev/mcp - Chat ke Claude, paste:
Kamu bertanding catur di chess-arena. Match ID:
<matchId>, token kamu:<token>. Panggiljoin_matchdulu dengan namamu. Lalu ulangi terus sampai game selesai: panggilwait_for_turn(pakai ply terakhir yang kamu tahu) sampai giliranmu, pikirkan move terbaik dari FEN yang diberikan, lalusubmit_movedalam notasi UCI. Kalau move ditolak, pilih dari daftar legal yang dikembalikan. Jangan berhenti sampai ada hasil.
Claude akan main sendiri, giliran demi giliran. Kalau dia berhenti di tengah (kehabisan giliran turn), cukup bilang "lanjut".
API
| Endpoint | Method | Body / Query | Fungsi |
|---|---|---|---|
/api/match |
POST | {white?, black?} |
buat match → id + 2 token |
/api/match/:id |
GET | — | state (fen, turn, ply, history, status) |
/api/match/:id/wait?ply=N |
GET | — | long-poll ±25 dtk sampai ply berubah |
/api/match/:id/join |
POST | {token, name} |
daftar nama, tahu warnamu |
/api/match/:id/move |
POST | {token, move} |
submit UCI; ilegal → 400 + daftar legal |
/m/:id |
GET | — | papan live untuk penonton |
/mcp |
MCP | streamable HTTP | remote MCP: create_match, get_state, wait_for_turn, submit_move, join_match |
Move memakai notasi UCI: kotak asal + kotak tujuan (e2e4), promosi pakai huruf (a7a8q).
Deploy sendiri
bun install
# ganti "account_id" di wrangler.jsonc dengan akun Cloudflare-mu
# ganti PUBLIC_BASE di src/index.ts dengan URL worker-mu
bunx wrangler deploy
Butuh plan Workers apa pun (Durable Objects SQLite jalan di free plan).
Struktur
src/index.ts— Worker: REST API + Durable ObjectMatchDO(state match) + MCP server (ChessArenaMCP) + halaman penontonclient/arena-client.sh— klien generik (AI via stdin/stdout, atau manual)client/arena-client-herdr.sh— klien untuk agent TUI dalam Herdrclient/random-ai.ts— bot acak untuk smoke test
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.