stronghold-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DRIVER_HOST | No | Resident driver listen address (do not expose to the public internet). | 127.0.0.1 |
| DRIVER_PORT | No | Resident driver listen port. | 8899 |
| MCP_HTTP_HOST | No | HTTP transport listen address. | 127.0.0.1 |
| MCP_HTTP_PORT | No | HTTP transport listen port. | 8787 |
| MCP_HTTP_USER | No | Basic Auth username for the HTTP transport; falls back to STRONGHOLD_AUTH_* then SP_AUTH_* if unset. | |
| MCP_TRANSPORT | No | Transport mode: stdio or http (Streamable HTTP). | stdio |
| DRIVER_TIMEOUT | No | Default per-request timeout in seconds (driver and Python SDK share this unit). | 180 |
| STRONGHOLD_NAME | No | The name shown for this seat. | MCP Player |
| MCP_HTTP_PASSWORD | No | Basic Auth password for the HTTP transport; falls back to STRONGHOLD_AUTH_* then SP_AUTH_* if unset. | |
| STRONGHOLD_WS_URL | No | The game WebSocket address. | ws://127.0.0.1:3000/ws |
| STRONGHOLD_DATA_DIR | No | Local game data/ directory used for observation; if unset, data is fetched from the server's /data/. | |
| STRONGHOLD_HTTP_URL | No | HTTP base for login/cookie and for fetching the simulation source. Derived from the WS address if unset. | |
| STRONGHOLD_SIM_ROOT | No | Path to a local game installation (repo root or server/) — optional fast path for the simulation. | |
| STRONGHOLD_SIM_SPEC | No | Direct path to spec.js for the simulation. | |
| STRONGHOLD_AUTH_USER | No | Site login username (used when the site has a login gate). Only exchanged for a session cookie in memory; falls back to the game server's SP_AUTH_USER if unset. | |
| STRONGHOLD_MCP_TOOLS | No | Tool registration mode: compact (9 generic tools) or full (adds per-action convenience tools, 62 total). | compact |
| STRONGHOLD_SIM_CACHE | No | Simulation cache directory. | ~/.cache/stronghold-mcp |
| MCP_HTTP_IDLE_SECONDS | No | Close an HTTP session (and its game seat) after this many seconds without requests; 0 = close only on DELETE. | 1800 |
| STRONGHOLD_AUTH_COOKIE | No | A pre-obtained session cookie to use directly. | |
| STRONGHOLD_BATTLE_MODE | No | Battle pacing: auto / fast / realtime. | auto |
| STRONGHOLD_FIELD_REGION | No | This seat's half-field region as r0,r1,c0,c1 (default matches the game's GEO.FIELD). | 9,12,2,10 |
| STRONGHOLD_LOCAL_BATTLE | No | Set to 1 to attach the battle runner. Defaults to 1 under the driver. | |
| STRONGHOLD_AUTH_PASSWORD | No | Site login password. Only exchanged for a session cookie in memory; falls back to the game server's SP_AUTH_PASSWORD if unset. | |
| STRONGHOLD_SIM_AUTODISCOVER | No | Set to 1 to allow discovering the game installation by walking up from the working directory (default off). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| stronghold_connectB | Open or resume a real Stronghold player WebSocket session. The adapter handles the private-site login cookie and the game reconnect token. |
| stronghold_observeA | Read the match. Check connected and has_frames first. detail="compact" (default) puts static stats once per kind:id in catalog and leaves out default values (an absent flag is false); "full" joins stats onto every instance. Pass the rev of your last observe as since to receive only what changed: sections listed in unchanged are as in that response, removed keys are gone, catalog holds only new entries. resync:true means since was unknown and this is the whole observation. includeField/includeReport=false omit those sections. |
| stronghold_lookupA | The full game-data record behind one id: a chess piece (chess_…), an item (item_…), a strategy band (band_…), an enemy key, a token, or a bond (kind: "bond" — thresholds, description and members). |
| stronghold_guideA | Read the game tutorial and this match's reference pages on demand. ids returns those sections: tutorial chapters (tutorial.flow, tutorial.board, tutorial.shop, tutorial.pieces, tutorial.bonds, tutorial.battle, tutorial.lp, tutorial.draft) with this server's numbers, bonds.overview, bond. (thresholds, description, params, the operators whose traits stack it, the operators whose stats grow with it), bonds.generic and band.. Without ids it returns a table of contents (id and title, read:true once fetched): topic "auto" (default) lists the pages for the current phase, "tutorial", "bonds" and "bands" list a whole area. |
| stronghold_stateA | Read the raw server frames received by this real player session, including room.state, m.public, m.private, m.field, battle frames, and queued events. stronghold_observe renders the same frames for deciding a turn. |
| stronghold_wait_eventB | Wait for the next live server event. Use this after an action to observe room/match/battle updates. |
| stronghold_protocolA | Read game action fields. Filter by type (e.g. g.move) or prefix (e.g. room.) to avoid loading the entire catalog. |
| stronghold_actionB | Send any normal Stronghold client action. The game server validates the message exactly as it validates a browser player. Use stronghold_protocol for the complete action and field list. |
| stronghold_disconnectA | Close this MCP session’s Stronghold player connection. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Most tools target clearly distinct operations, but stronghold_observe and stronghold_state intentionally overlap by reading the same match frames at different rendering levels. stronghold_lookup and stronghold_guide also both expose bond/band details, though the guide's tutorial and reference-page framing helps distinguish them.
All tools consistently use the stronghold_ prefix and snake_case, making the namespace predictable. The only minor deviation is a mix of verbal names (connect, observe, lookup, wait_event) and noun names (guide, state, protocol, action).
Nine tools is well-scoped for a game-session adapter, covering connection lifecycle, observation, waiting, reference lookup, protocol inspection, and action dispatch without obvious bloat.
The surface covers the core player-session lifecycle: connect/disconnect, observe/state, wait for events, read references, inspect protocol fields, and send actions. Minor gaps may exist around lobby/matchmaking or explicit error retrieval, but the generic stronghold_action tool can likely address remaining game operations.