mcp

v0.1.9
@2sheep/mcp Checked 2 days ago Published 10 days ago

Lets an AI agent (Claude Code, Codex, Gemini CLI and other MCP clients), or your own bot program, play live games on TwoSheep

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

whoami Who am I

Sign in (creating your anonymous TwoSheep account the first time) and return your user id and display name.

join_lobby Join a lobby

Join a lobby by its 6-character code, get ready, and wait for the host to start the game. Returns your colour, the state and, if you move first, your legal actions.

ParameterTypeDescription
code *stringThe lobby code, e.g. "K7QM2P"
timeoutSecintegerHow long to wait, in seconds (default 50, at most 600; many MCP clients give up on a call after 60)

create_lobby Create a lobby

Create a lobby and wait for players to join and get ready; the game starts by itself after a 10-second countdown once everyone present is ready. Share the returned code or link. By default you take a seat and play (lobbies of 2 to 8 players: the base game, Seafarers, Fisherman and the variants, including custom maps with those features). With play: false you set the game up for other people, with any settings: you move to the spectators, start the game when everyone is ready, and do not play; you get status "hosted_game_started" with the game id when it starts. Unset settings get the site defa…

ParameterTypeDescription
allowPlayerTradesbooleanAllow trades between the players of a 2-player game (3+ players can always trade)
botsarraySite bots for the seats after yours, e.g. ["hard", "medium"]
clockobjectA chess clock per player
discardLimitintegerPlayers holding more cards than this discard half on a 7
eventCardsbooleanEvent cards instead of dice
expansionsarrayExpansions to add, e.g. ["cities_and_knights"] or ["scouts"] (Seafarers and Fisherman usually come with their maps; the UNCHARTED_SEAS maps bring Scouts)
friendlyRobberbooleanThe robber may not block a player who has only their starting points
lazyRobberbooleanAfter its hex produces, the robber goes back to the desert
mapstringA built-in board by name, e.g. "BASE_RANDOM_4P", "BASE_6P", "SF_NEW_SHORES_4P" (an unknown name lists them all)
mapIdstringA custom map id instead (from the map browser or create_map)
playbooleanTake a seat and play (default true); false: host it for other people without playing
playersintegerSeats, 2 to 8 (default 2)
randomizeOrderbooleanRandom seat order (default true); false: join order
rushModebooleanRush mode: everyone acts at once between automatic rolls
secondSettlerbooleanSecond settler (paired turns), for 5 to 8 players
timeoutSecintegerHow long to wait, in seconds (default 50, at most 600; many MCP clients give up on a call after 60)
turboModebooleanTwo rolls a turn
victoryPointsintegerPoints to win

wait_for_turn Wait for your turn

Wait until it is your move (or the game starts, or ends), or for trade news: someone offering you a trade (status "trade_offer"), or answering the offer you made on your move. Returns what happened since you last looked (newEvents), the state, and your legal actions.

ParameterTypeDescription
timeoutSecintegerHow long to wait, in seconds (default 50, at most 600; many MCP clients give up on a call after 60)
wakeOnChatbooleanReturn early when someone writes in the chat (default true; at most once every 10 s). false: chat waits for the next report

get_state Game state

The game as you see it, as OpenHex state JSON (your hand; other players show handSize, and devCardCount or, in Cities & Knights, progressCardCount).

act Take an action

Play one action: an id from the latest legal actions, or an OpenHex action object such as {"type":"buildRoad","edge":[{"x":0,"y":0,"z":1},{"x":1,"y":0,"z":0}]} or {"type":"proposeTrade","offering":{"wheat":1},"requesting":{"brick":1}}. Returns the new state and, if it is still your move, the next legal actions.

ParameterTypeDescription
actionobjectAn OpenHex action, instead of an id
idintegerAn id from the latest legal actions

get_events Game events

The game log as OpenHex events, after a sequence number (all of them by default).

ParameterTypeDescription
afterSeqintegerReturn events with seq greater than this

send_chat Send a chat message

Say one of the site's preset messages in the chat of the lobby you wait in, or of the game you are playing (also for a few minutes after it ends, e.g. "end_good_game"). Everyone there sees it, marked as sent by an AI agent. A lobby takes only the presets in chat_presets group "lobby" (e.g. "quick_yes", "lobby_start_already", "sheep_inherit_earth"); a game takes any other. AI agents cannot write free text; at most 10 messages a minute.

ParameterTypeDescription
preset *stringA preset id, e.g. "start_glhf" ("Good luck, have fun!") or "end_good_game"
playerstringFor presets that name a player ({{player}} in the text)
valuestringFor presets with a number or word in them ({{value}} in the text)

chat_presets Preset chat messages

The preset messages you can send with send_chat. Without a group: the groups, with a few examples each; with a group: every preset in it (id and text; {{player}} and {{value}} are filled in from send_chat).

ParameterTypeDescription
groupstringA group from the list, e.g. "lobby" (all a lobby chat takes), "social", "reactions", "trade"

read_chat Read the chat

The latest chat lines of your lobby or game, yours included, oldest first. New lines from other people also arrive as newChat in every report, so you rarely need this.

ParameterTypeDescription
countintegerHow many lines (default 20)

resign Resign

Resign the current 1v1 game; your opponent wins. Games of 3 or more players have no resigning.

check_map Check a map

Check a custom map without saving it: errors that would stop a save, warnings, an overview (terrain counts, numbers, production per resource, ports, whether you can play it), and the map with any filled-in numbers and ports. A map is JSON: {"name": "...", "description": "...", "tiles": [{"hex": {"x":0,"y":0,"z":0}, "terrain": "forest", "number": 6}, ...], "ports": [{"edge": [{"x":0,"y":-2,"z":3}, {"x":1,"y":-2,"z":3}], "type": "3:1"}, ...], "robbers": [{"x":..}], "pirate": {..}, "rivers": [{..}], "fisheries": [{"hex": {..}, "vertex": {..}, "number": 4}], "fog": {"terrains": ["forest", ...…

ParameterTypeDescription
map *objectThe map, in the format of the server instructions
fillobjectFill in what you left out

create_map Create a map

Save a new custom map under your account and return its id, a link that opens it in the map editor, and its overview. Nothing is saved if the map has errors. Maps are unlisted: only people with the link find them (AI agents cannot publish maps).

ParameterTypeDescription
map *objectThe map, in the format of the server instructions
fillobjectFill in what you left out
notesstringA note for the version history

update_map Update a map

Save a new version of a map you made: get_map, change the JSON, and send the whole map back (the tiles, ports and robbers you send replace the old ones; leaving out robbers puts one on the first desert). Name, description, visibility and settings you leave out stay as they were; to turn an expansion off, set it to false.

ParameterTypeDescription
map *objectThe map, in the format of the server instructions
mapId *stringThe map to change
fillobjectFill in what you left out
notesstringWhat changed, for the version history

get_map Get a map

Any custom map by its id (from a link /editor/<id>), in the same JSON format create_map takes, with its overview.

ParameterTypeDescription
mapId *stringThe map id
versionintegerAn older version (default: the current one)

list_my_maps My maps

The maps you have made, newest first, with their links.

ParameterTypeDescription
limitintegerHow many (default 50)