MCP & AI

The package ships an MCP server. Point Cursor, Claude Code, or Copilot at it after install so the assistant can use real exports, catalogs, saves, planners, and wiki pages.

{
  "mcpServers": {
    "thetowersdk": {
      "command": "node",
      "args": ["./node_modules/thetowersdk/mcp/server.mjs"]
    }
  }
}

What The Server Can Do

  • list_exports / get_export — what exists, one table previewed rather than dumped
  • describe_schema — a table's declared shape, not one guessed from a sample row
  • decode_save / run_extractor — what is in a playerInfo.dat
  • define_term — what an acronym means, and whether it is ambiguous
  • plan_effective_path — a path, with the candidates it excluded and why
  • wiki_search / wiki_page — how a mechanic behaves, from the community wiki
  • sdk_graph_render — the mechanics graph as a Mermaid diagram, not an image

The Tower Oracle

A knowledge graph of game mechanics: nodes are mechanics, edges are the relationships between them, and every claim records its source. It answers how a mechanic behaves, what it interacts with, and the specific ways it has been misread before.

  • oracle_trapscall first. Every known way this mechanic has been got wrong
  • oracle_expand — what an acronym means, from a closed set (GT+, CF, DW)
  • oracle_brief / oracle_get / oracle_search — orientation, one node, or find it by phrasing
  • oracle_map — how a mechanic connects to the rest of the game
  • oracle_footguns / oracle_coverage / oracle_contradictions

Every claim carries a claimType of objective or sentiment, so measured values and community opinion stay distinguishable. oracle_coverage reports how well a compartment is covered, and oracle_contradictions surfaces claims that disagree, ranked by source authority.

The Sheet Oracle

Reads a live Google Sheet through MCP, so an assistant can work from a spreadsheet's own calculations. Point it at any sheet shared with your service account.

  • sheet_info — sheet id, version, writable flag. Call first
  • eval_formula — evaluate a formula in the sheet and return what it computes
  • read_range — values or formulas in A1 notation
  • list_lambdas — named functions and their parameter order
  • inspect_tab_ui — the live label and value control panel for a tab
  • write_cells — set inputs to a known state before reading a result

Registering a Service Account

The sheet tools authenticate as a Google Cloud service account — a robot identity with its own email address, which reaches the sheets you share with it.

  1. In the Google Cloud console, create or pick a project.
  2. Enable the Google Sheets API for it.
  3. IAM & Admin → Service Accounts → Create. Access is granted per-sheet by sharing, so no project roles are needed.
  4. Keys → Add key → Create new key → JSON. It downloads once. Treat it as a password and keep it out of version control.
  5. Copy the account email — something@project-id.iam.gserviceaccount.com.
  6. Share your spreadsheet with that email. Viewer is enough to read; Editor is required for eval_formula and write_cells, which write to a scratch cell.
  7. Point the tools at the key file and sheet id via environment variables.

If a read comes back empty, check the sharing first — an unshared sheet reads as an empty range rather than a permissions error. To revoke a key, delete it in the console; sharing stays intact for its replacement.

Prompts And Example Results → · ACS →