Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Pente

БесплатноНе проверен

Enables AI to play Pente live against a human via MCP, using ChanBlake's browser game as a shared board. Provides create, join, move, and view tools for real-ti

GitHubEmbed

Описание

Enables AI to play Pente live against a human via MCP, using ChanBlake's browser game as a shared board. Provides create, join, move, and view tools for real-time multiplayer matches.

README

An MCP server that lets any MCP-capable AI play Pente. It supports two transports with the same four tools:

  • Local (default) — two agents on the same machine play each other with a self-contained game engine and a local TCP socket. No website, no PeerJS, no WebRTC, no public cloud, no internet.
  • Web — play against the ChanBlake browser game / a human over the public PeerJS cloud (a human opens an invite URL in their browser).

This is an add-on / integration layer, not a fork of the game. The web mode joins ChanBlake's own multiplayer rooms as a second player, exactly like a human in another browser tab. None of ChanBlake's game code is included here — it stays in his repository. In local mode the rules are reimplemented from scratch (deterministic game math, not his AI).

Tool Role What it does
create(transport?) host Open a table as BLACK (local: embedded engine + local socket; web: browser invite)
join(target, transport?) guest Join a table as WHITE (local: target = local port; web: target = room code)
move(row, col) either Play one stone, wait for the opponent reply
view either Dump the synchronized board + game state

Two transports

Local (agent-vs-agent, same machine) — transport="local"

Two agents (e.g. Gopher and Zephyr) on the same host play each other with a self-contained Python game engine (pente_engine.py) and a plain JSON-line TCP socket (pente_local.py). The hosting MCP process owns the authoritative rules and validates every move: legal moves, straddle captures, 5-in-row win, and win-by-5-captures all resolve locally. No internet required.

# Agent A hosts (BLACK)
create(transport="local")
# -> { "transport": "local", "port": 9333, "i_am": "BLACK", ... }

# Agent B joins (WHITE) — same machine
join(target=9333, transport="local")
# -> { "transport": "local", "port": 9333, "i_am": "WHITE", "connected": true }

Web (browser / remote) — transport="web"

Connect to ChanBlake's browser game over the public PeerJS cloud, so a human (or another agent) playing in the browser is the opponent.

create(transport="web")          # -> { "join_url": "https://chanblake.github.io/pente/?room=ABC234", ... }
join(target="ABC234", transport="web")

What's in here

  • pente_mcp.py — the stdio MCP server (create / join / move / view, both transports).
  • pente_engine.py — pure-Python Pente rules (legal moves, captures, wins, pro-opening). Zero dependencies.
  • pente_local.py — local TCP transport: LocalHost (embedded engine + server) and LocalGuest (client).
  • pente_local_host_cli.py — run the local host engine as a JSON-lines subprocess.
  • pente_scan.py — board threat scanner (open fours, capture frames, refillable gaps, winning squares).
  • pente-bot.js / pente-host.js / webrtc-polyfill.js — Node adapters for the web transport (PeerJS/WebRTC).
  • test/ — headless tests (fake host + the local transport tests).
  • docs/ — the original design spec.

Requirements

  • Local mode: Python ≥ 3.11 with mcp (pip install mcp). No Node, no internet.
  • Web mode: Node.js + @roamhq/wrtc shim + internet to the public PeerJS cloud (0.peerjs.com:443).

Quickstart

pip install mcp
python pente_mcp.py          # stdio MCP server (local transport is the default)

Register the server in your MCP client, then:

create(transport="local")   # host a local game, BLACK
view()                      # full 19x19 board, whose_turn, captures, game_over
move(row=9, col=9)          # your_move (+ their move if the opponent replied)

Tests

python pente_engine.py                  # rules self-test
python test_local_rules.py              # win + capture via the local host engine
python test_local_two_process.py        # cross-process host + guest over TCP
python test_mcp_agent_vs_agent.py       # two full MCP processes playing each other

All four must pass. They exercise moves, straddle captures, 5-in-row wins, and win-by-captures over the local transport — with no website and no PeerJS cloud.

Credit

The web mode connects to ChanBlake's Pente: https://github.com/ChanBlake/pente — an unofficial, non-affiliated integration layer. Only network moves are sent; this project cannot modify the game's files or memory.

Known limits

  • Local mode supports one active table per MCP server process (single _active handle).
  • Web room codes: the app strips I, O and 0. create only emits codes from its alphabet.
  • Web transport is public-cloud only (a local PeerServer + Node host doesn't register its peer due to WebRTC-in-Node); local mode exists precisely to avoid this.

License

MIT — this integration layer. ChanBlake's game has its own license (see his repo).

from github.com/uudruid74/pente-mcp

Установка Pente

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/uudruid74/pente-mcp

FAQ

Pente MCP бесплатный?

Да, Pente MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Pente?

Нет, Pente работает без API-ключей и переменных окружения.

Pente — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить Pente в Claude Desktop, Claude Code или Cursor?

Открой Pente на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Playwright

Browser automation, scraping, screenshots

Microsoftавтор: Microsoft

Puppeteer

Browser automation and web scraping.

modelcontextprotocolавтор: modelcontextprotocol

opentabs-dev/opentabs

Plugin-based MCP server + Chrome extension that gives AI agents access to web applications through the user's authenticated browser session. 100+ plugins with a

opentabs-devавтор: opentabs-dev

robhunter/agentdeals

1,500+ developer infrastructure deals, free tiers, and startup programs across 54 categories. Search deals, compare vendors, plan stacks, and track pricing chan

robhunterавтор: robhunter

hlydecker/ucsc-genome-mcp

MCP server to interact with the UCSC Genome Browser API, letting you find genomes, chromosomes, and more.

hlydeckerавтор: hlydecker

34892002/bilibili-mcp-js

A MCP server that supports searching for Bilibili content. Provides LangChain integration examples and test scripts.

34892002автор: 34892002

achiya-automation/safari-mcp

Native Safari browser automation for AI agents with 80+ tools. No Chrome dependency, optimized for Apple Silicon with 60% less CPU overhead.

achiya-automationавтор: achiya-automation

agent-infra/mcp-server-browser

Browser automation capabilities using Puppeteer, both support local and remote browser connection.

bytedanceавтор: bytedance

aparajithn/agent-scraper-mcp

Web scraping MCP server for AI agents. 6 tools: clean content extraction, structured scraping with CSS selectors, full-page screenshots via Playwright, link ext

aparajithnавтор: aparajithn

apireno/DOMShell

Browse the web using filesystem commands (ls, cd, grep, click). 38 MCP tools map Chrome's Accessibility Tree to a virtual filesystem via a Chrome Extension.

apirenoавтор: apireno

Compare Pente with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории browse