Start
Get Started
Install the package, point your assistant at the MCP server, and start from a working example. Catalogs and formulas work without keys or an account. Official game exports are parsed locally; optional integrations may use network access.
1. Install TheTowerSDK
Use the official game export for account imports. See the installation guide.
Add the package to your app or tool repo. Pin a version when you want frozen game numbers.
npm install @beardedunicorn/thetowersdk@3.5.4 --save-exactPackage: npmjs.com/package/@beardedunicorn/thetowersdk · source: GitHub
2. Register The MCP Server
Point Cursor, Claude Code, or Copilot at the package MCP server. Your assistant can then list exports, read catalogs, decode saves, plan Effective Paths, and pull wiki pages while it works.
{
"mcpServers": {
"thetowersdk": {
"command": "node",
"args": ["./node_modules/@beardedunicorn/thetowersdk/mcp/server.mjs"]
}
}
}Put that under your editor’s MCP config (for example Cursor .mcp.json or the IDE MCP settings). Restart the IDE MCP session after saving. Docs: MCP & AI.
3. Explore The Examples
Every example on this site runs against the installed package. Open one, copy it, and change the inputs — the numbers move because they come from the catalogs, not from a fixture.
- Examples — runnable snippets, grouped by task
- What You Can Build — finished tool shapes, each linked to its docs
- Docs — the full reference, one page per area
4. Official Exports From a Device (optional)
First tap your Player ID five times in the game to create your first export and reveal the
export controls. For subsequent exports, use Settings → Toggles → External Tools Export →
Manual Export or enable Auto Export for External Tools. Android path: Android/data/com.TechTreeGames.TheTower/files/tool_export.json. adb-bridge can copy it from a device or emulator. Decode with @beardedunicorn/thetowersdk/node, then extractors in @beardedunicorn/thetowersdk/save.
5. What You Can Add Alongside It
None of these are dependencies. Catalogs and formulas work offline without keys; account imports use the official game JSON export. Each of these adds one capability it deliberately does not carry itself.
TowerAI — an assistant that answers from a knowledge base
npm install towerai. The SDK holds the numbers; TowerAI does retrieval over a
knowledge base you curate and prompts a model with what it found, so answers cite
something instead of being invented. You bring the model key — a free one from console.groq.com is enough to run it.
TowerAI docs → · GitHub · npm
adb-bridge — read a save off a phone or emulator
npx adb-bridge. The SDK decodes save bytes; getting those bytes off an
Android device is a separate job, and this is it. Your users run it on their own machine —
it is not a dependency of your project, and nothing about it ships to them through you.
Save docs → · GitHub · npm
discord.js — every calculator as a slash command
@beardedunicorn/thetowersdk/bot turns the builders into commands and replies
and never touches a Discord client, so it is transport-agnostic. Add discord.js when you want those commands on a server.
google-auth-library — read and write spreadsheets
@beardedunicorn/thetowersdk/sheets takes a transport you supply and imports no
Google library itself, so nothing about your auth is assumed. For an unattended tool, a service
account is the identity to use.
6. Ready To Build
Example Product
The Tower Run Tracker ships calculators and trackers on this package.