HexSet MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HexSet MCP Serverstart a new game with Heximax as my opponent"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HexSet
HexSet implements a hex-tile trading and building game based on the rules of Settlers of Catan: a NumPy rules engine, heuristic bots, ONNX model inference, a browser interface, HTTP and MCP interfaces, Gymnasium and PettingZoo adapters, and batched environments for training and evaluation.
The engine covers resource production, construction, development cards, the robber, victory conditions and player trading. It owns the rules, information sets, encoding, game loops, seating and board pairing, records and replay, and trade evaluation. A training project supplies the model runtime and the learning algorithm through those interfaces; neural-network training and checkpoint export are maintained separately, in the sibling HexN project.
Games are hosted here even when the opponent comes from elsewhere: HexSet owns the rules, the legal actions and the ledger, and Catanatron is an external reference opponent seated at a HexSet table.
Documentation
Start with guide.md; the rest are listed by name.
Document | Contents |
JSON routes, seat tokens, client identity and reclaim | |
Designing a comparison, the intervals the runners report, experiment records | |
Running games, bundled opponents, trade rounds, implementing a bot, records, bench commands | |
The built-in search bot: strength, search, evaluation, endpoint pins | |
MCP tools and their semantics | |
The ONNX model contract, and checking a file against it | |
Running the server: configuration, Docker, saved games | |
Markers, optional extras, what CI covers | |
Trading's three parts: the table's rules, a gate's own | |
Batched collection, model runtimes, PettingZoo and Gymnasium adapters | |
Cached votes over sampled worlds |
Related MCP server: chess-mcp
Heximax
Heximax is HexSet's built-in search bot and the default opponent. It uses a budgeted expectimax/max^n search over the seat's information set, with move weights that adapt to public trading activity.
Matchup | Heximax wins | Win rate (95% CI) |
2 player, variant | 686 / 800 | 85.75% (83.2-88.3%) |
2 player, standard | 627 / 800 | 78.38% (75.6-81.2%) |
4 player, 1 Heximax seat | 451 / 800 | 56.38% (53.1-59.7%) |
All games against Catanatron's depth-two alpha-beta player (AB2), hosted in
the HexSet engine. The duel variant (rules.DUEL_VARIANT_GAME) is
colonist.io's ranked 1v1 format,
and it is a two-seat game type: a GameType carries the seat counts its
ruleset is played at, so the engine will not deal it to a four-seat table.
docs/heximax.md has the search, the evaluation terms, the
measurement conditions and the endpoint pins.
Installation
Requires Python 3.11 or later. From the repository root:
pip install -e .The base installation requires only NumPy. Install extras for the interfaces you use:
Extra | Provides |
| ONNX Runtime for embedded model opponents; Heximax needs only the base install |
| ONNX Runtime for standalone model clients |
| Gymnasium and PettingZoo environments |
| Catanatron integration, pinned to a specific Git commit |
| ONNX and ONNX Runtime libraries; no training or export command is included |
| pytest |
Extras can be combined, for example pip install -e ".[server,gym,test]".
Play in a browser
python -m hexset.server.webThe server opens a browser at http://127.0.0.1:8770. Share a game's URL to
invite other players. Each new game starts with its creator seated and the
remaining seats open. Fill them with people or bots, or close unused seats
with the picker's none option. Play waits until every seat is filled or
closed. Closed seats can be reopened before the first move; the participating
seats are fixed once play starts.
The opponent picker lists heximax, catanatron when its extra is installed,
and the models found in models/. A compatible .onnx file dropped there
appears in the next listing under its filename stem; the requirements are the
ONNX model contract.
The trade modal supports bank and port trades, offers to other players, and responses to their offers. How many cards a player trade moves is each seat's own declared limit — a manual seat is bounded only by the cards it holds. A bot makes as many offers a turn as its own gate asks for and waits for manual seats to answer before continuing. A seat with no resource cards passes automatically.
Games have a public spectator view that reveals all hands, development cards, and victory points. Anyone with the game URL can access it, including players at that table. Seat-specific responses filter hidden information, but the public view means a server game does not enforce secrecy between participants.
Running it anywhere but a local default -- ports, Docker, journals and the recovery rules -- is docs/server.md.
Repository layout
Path | Contents |
| Rules, board topology, state, ledger, encoding, records, search, and arena |
| Heximax, bot protocols, random policy and shared evaluation |
| Duels, throughput measurements, record generation, and weight fitting |
| Seats a Catanatron |
| HTTP and MCP server, sessions, journals, and static browser UI |
| Runtime-independent policy, trade, and search interfaces; ONNX inference; bot clients |
| Lane, PettingZoo, and Gymnasium environments |
| Engine and integration tests |
| Local ONNX opponents |
| The documents indexed above |
Tests
pip install -e ".[test,server,export,catanatron,gym]"
pytest
pytest -m slowThe default run excludes tests marked slow; pytest -m "" runs every
marker. Tests for an optional dependency skip themselves when it is absent, so
which extras are installed decides what a green run covered:
docs/testing.md maps each extra to what it tests, and covers
the browser tests, which need a Chromium download beyond their extra.
License and attribution
HexSet is licensed under GPL-3.0-only. See LICENSE. Development history is in CHANGELOG.md; each release is also one commit here, whose message is that version's entry.
Dependencies are installed from PyPI or from git, never vendored into this
repository, and each carries its own licence; the set and their extras are
declared in pyproject.toml. Catanatron is GPL-3.0, and the
base evaluator in hexset/catanatron/speedups.py is derived from it — that
file names the upstream revisions it reproduces. The browser interface in
hexset/server/static/index.html loads no third-party scripts, stylesheets or
web fonts; its system font stack names fonts on the user's device rather than
bundling them.
CATAN and SETTLERS OF CATAN are trademarks of Catan GmbH and Catan Studio. HexSet is not affiliated with, endorsed by, or sponsored by either company. The names identify the game whose rules this project implements.
This server cannot be deployed
Maintenance
Related MCP Connectors
Boardgames MCP — wraps Board Game Atlas API (public demo client_id, free)
BGG MCP provides access to the BoardGameGeek API through the Model Context Protocol, enabling retr…
Read and update your SekkeiFlow life boards, counters and AI coach from any MCP client.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLM-driven text game state management by exposing MCP tools for managing players, locations, items, entities, and abstract concepts.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to play and analyze chess, validate moves, and view a live synchronized visual board in the browser through MCP tools.11 npmMIT
- AlicenseAqualityCmaintenanceEnables any local AI agent to play turn-based games over MCP by exposing reset, observe, and act verbs with structured observations and validated legal actions.6MIT
- FlicenseAqualityBmaintenanceEnables an AI coach to inspect Civilization VI game state, check game connectivity, and query detailed rules for techs, civics, units, districts, and more through MCP tools.8-