Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DRIVER_HOSTNoResident driver listen address (do not expose to the public internet).127.0.0.1
DRIVER_PORTNoResident driver listen port.8899
MCP_HTTP_HOSTNoHTTP transport listen address.127.0.0.1
MCP_HTTP_PORTNoHTTP transport listen port.8787
MCP_HTTP_USERNoBasic Auth username for the HTTP transport; falls back to STRONGHOLD_AUTH_* then SP_AUTH_* if unset.
MCP_TRANSPORTNoTransport mode: stdio or http (Streamable HTTP).stdio
DRIVER_TIMEOUTNoDefault per-request timeout in seconds (driver and Python SDK share this unit).180
STRONGHOLD_NAMENoThe name shown for this seat.MCP Player
MCP_HTTP_PASSWORDNoBasic Auth password for the HTTP transport; falls back to STRONGHOLD_AUTH_* then SP_AUTH_* if unset.
STRONGHOLD_WS_URLNoThe game WebSocket address.ws://127.0.0.1:3000/ws
STRONGHOLD_DATA_DIRNoLocal game data/ directory used for observation; if unset, data is fetched from the server's /data/.
STRONGHOLD_HTTP_URLNoHTTP base for login/cookie and for fetching the simulation source. Derived from the WS address if unset.
STRONGHOLD_SIM_ROOTNoPath to a local game installation (repo root or server/) — optional fast path for the simulation.
STRONGHOLD_SIM_SPECNoDirect path to spec.js for the simulation.
STRONGHOLD_AUTH_USERNoSite 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_TOOLSNoTool registration mode: compact (9 generic tools) or full (adds per-action convenience tools, 62 total).compact
STRONGHOLD_SIM_CACHENoSimulation cache directory.~/.cache/stronghold-mcp
MCP_HTTP_IDLE_SECONDSNoClose an HTTP session (and its game seat) after this many seconds without requests; 0 = close only on DELETE.1800
STRONGHOLD_AUTH_COOKIENoA pre-obtained session cookie to use directly.
STRONGHOLD_BATTLE_MODENoBattle pacing: auto / fast / realtime.auto
STRONGHOLD_FIELD_REGIONNoThis seat's half-field region as r0,r1,c0,c1 (default matches the game's GEO.FIELD).9,12,2,10
STRONGHOLD_LOCAL_BATTLENoSet to 1 to attach the battle runner. Defaults to 1 under the driver.
STRONGHOLD_AUTH_PASSWORDNoSite login password. Only exchanged for a session cookie in memory; falls back to the game server's SP_AUTH_PASSWORD if unset.
STRONGHOLD_SIM_AUTODISCOVERNoSet 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 9 tools

Disambiguation4/5

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.

Naming Consistency4/5

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).

Tool Count5/5

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.

Completeness4/5

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.