TTSim-MCP
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., "@TTSim-MCProll the white dice and tell me what I got"
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.
Claude-TTSim-MCPServer
Let Claude play board games against you in Tabletop Simulator (TTSim). Claude reads the table, rolls real physics dice and moves its own pieces, and you watch it all happen in the game.

Left: the conversation with Claude. Right: the same game in Tabletop Simulator, where Claude moves the light checkers.
How it works
Two parts work together:
TTSim-MCP is an MCP server that gives Claude generic access to Tabletop Simulator: run Lua in the game, list and inspect objects, move them, measure distances, roll and read dice. It knows nothing about any specific game.
Game skills teach Claude one game on one table: where the pieces are, how the board is laid out, the rules, and how a turn with you works. Skills so far: ttsim-backgammon (the built-in Backgammon table) and ttsim-nine-mens-morris (the Steam Workshop mod "Nine Men's Morris").
flowchart LR
Claude["Claude<br/>(Claude Code)"]
Skill["Claude Skill<br/>ttsim-backgammon<br/>rules · board layout · turn flow"]
MCP["TTSim-MCP<br/>MCP server (Python)<br/>run_lua · objects · moves · dice"]
TTSim["Tabletop Simulator<br/>External Editor API<br/>localhost:39999 / 39998"]
Game["Loaded game<br/>Backgammon board,<br/>checkers, dice"]
Claude -- "loads the skill<br/>for the game" --> Skill
Skill -- "MCP tool calls<br/>(stdio)" --> MCP
MCP -- "Lua as JSON" --> TTSim
TTSim -- "runs Lua,<br/>physics" --> Game
TTSim -. "results, events" .-> MCPYou talk to Claude in Claude Code, e.g. "let's play backgammon". Claude loads the matching skill.
The skill tells Claude how this table works. Claude acts through the TTSim-MCP tools.
TTSim-MCP turns each tool call into Lua and sends it to Tabletop Simulator's External Editor API (the same interface script editors use; TTSim listens on
localhost:39999and replies tolocalhost:39998).TTSim runs the Lua in the loaded game: pieces glide to their new places, dice are thrown by the physics engine, and the results come back to Claude.
Dice are real: every roll is a visible physics roll in TTSim, never a number Claude makes up. A test of 400 rolls came out consistent with fair dice (see docs/requirements.md, Q8).
Related MCP server: Portals MCP
MCP tools
Tool | What it does |
| Is TTSim reachable, which game is loaded, who is seated |
| Run any Lua in the game and get the result back (the universal tool) |
| Read the game's scripts (read-only) and messages TTSim sent on its own |
| Objects on the table with position, rotation, tint, bounds, snap points |
| Move pieces smoothly and wait until they have settled |
| Table size, distances, point out a piece to the player |
| Roll dice (and flip coins) with TTSim's physics and read the results; flags dice that landed tilted |
Requirements
Tabletop Simulator running on the same machine, with a game loaded
Python 3.11 or newer
Developed and tested on macOS
Setup
git clone https://github.com/PeterPeet/Claude-TTSim-MCPServer.git
cd Claude-TTSim-MCPServer
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'.mcp.json registers the server for Claude Code. It contains an absolute path to the Python in .venv.
Change it to your own folder:
{
"mcpServers": {
"ttsim": {
"command": "/path/to/Claude-TTSim-MCPServer/.venv/bin/python",
"args": ["-m", "ttsim_mcp"]
}
}
}The game skills are linked into .claude/skills/, so Claude Code finds them automatically in this folder.
Play
Start Tabletop Simulator and load the built-in Backgammon game.
Open Claude Code in this folder and approve the
ttsimMCP server when asked.Say "let's play backgammon".
Claude plays the light checkers and rolls the white dice beside the board. You play brown with the blue dice: roll, move, and tell Claude when you are done. Claude reads your dice and move from the table, checks the move, and takes its turn.
The skill is written for the built-in Backgammon table that comes with Tabletop Simulator (one board with 120 snap points, light and brown checkers, white and blue dice). A Workshop backgammon mod may need small changes in skills/ttsim-backgammon.
Project layout
Path | Contents |
| Raw External Editor API connection: send Lua, receive results and events |
| Read-only access helpers and the generic 3D controls |
| The MCP server: thin layer exposing those functions as tools |
| All Lua the server sends to TTSim, as template files |
| The Backgammon skill ( |
| The Nine Men's Morris skill ( |
| Requirements, findings about TTSim behaviour, and the changelog |
| Unit, contract (against a fake TTSim) and integration tests (against the real game) |
Development
The project is requirements-driven: every feature has a requirement ID in docs/requirements.md and tests that reference it. See CLAUDE.md for the working method and architecture rules.
.venv/bin/pytest # unit + contract tests, no TTSim needed
.venv/bin/pytest -m ttsim # integration tests against the running game
.venv/bin/ruff check . && .venv/bin/ruff format --check .Only one program can receive TTSim's replies at a time. While a Claude Code session is running the ttsim server,
pytest -m ttsim fails with a "port in use" error; run the integration tests outside such a session.
Some integration tests show messages in the TTSim chat on purpose (a print, and a labelled deliberate syntax error).
Roadmap
Access to TTSim through the External Editor API
MCP server with raw access tools
3D controls and physics dice
Backgammon: Claude plays against you (v0.1.0)
Nine Men's Morris: coin toss, placing, moving, flying, mills (in progress)
Warhammer Age of Sigmar (Spearhead), using the mod's own dice area
License
GNU General Public License v3.0, see LICENSE.
Disclaimer
An independent hobby project, not affiliated with Berserk Games (Tabletop Simulator) or Anthropic.
This server cannot be deployed
Maintenance
Related MCP Connectors
Teamfight Tactics data & AI coaching for Claude and ChatGPT — 19 tools, built-in Riot key.
One workspace of tools for Claude and ChatGPT: connect 600+ apps, generate media, build tools.
Chess MCP for Claude: engine analysis, attack maps, game review. One URL, no install.
- SimSenseOAuthai.simsense
Deploy sims to any screen. Control your displays with Claude.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to directly control Unity Editor, supporting scene manipulation, component operations, asset management, prefab handling, and audio control through natural language commands.5MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to design and build interactive 3D games within the Portals virtual platform through direct API integration. It facilitates automated asset placement, interaction logic configuration, and quest management using natural language commands.4-
- FlicenseNot gradedqualityDmaintenanceEnables controlling a game character, drawing on a canvas, and running chemistry experiments via natural language commands to Claude.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude to drive a live GIANTS Editor 10.x (FS25) session with 59 tools for terrain editing, field creation, asset placement, map audits, and more through natural language.1MIT