About STS2 Agent
STS2 Agent is an MCP server published by CharTyr in the Gaming category: 杀戮尖塔2的MOD,让AI直接操作游戏游玩。将杀戮尖塔2的游戏状态与操作暴露为本地 HTTP API 包装成 MCP Server,供支持 MCP 的AI客户端直接调用。提供游戏内mod自身的UI. Conduid read 27 tools from its source: act, append_combat_knowledge, append_event_knowledge, complete_combat_handoff, complete_event_handoff, create_combat_handoff and 21 more. No package is published for it, so it installs from a source checkout.
The repository has 372 stars and 58 forks, and its last commit was on 26 Nov 2026. The latest release is v0.20.0 (26 Nov 2026): Steam 正式版 v0.111.1 与 public beta v0.114.0 都可以使用本版。 新增与优化 战斗数学与选路升级:CombatMathPolicy 新增星能(摄政王)、箭矢(愚者)与超额能耗转星能的资源约束,并将冰霜充能球回合末被动格挡计入 combat.threat(新增 end_of_turn_orb_block… It follows v0.19.6 (26 Nov 2026), and the 5 most recent releases go back to v0.19.3 (19 Nov 2026). It passes all 5 static checks Conduid ran on the repository. Its topics include game, mod, slay-the-spire and slay-the-spire-2.
Install
git clone https://github.com/CharTyr/STS2-AgentTools (27)
act| Parameter | Type | Description |
|---|---|---|
| action * | string | Action name from the latest state's available_actions; never guessed from the screen name. |
| card_cid | integer | Stable combat.hand[].cid; wins over card_index. |
| card_index | integer | Hand card index for play_card. |
| mode | string | open_character_select run mode: standard|blitz|dread|custom. |
| option_index | integer | Option index for map, reward, shop, event, rest, selection, and multiplayer-lobby actions. `rest.options` carry `requires_target` / `target_index_space` / `valid_target_indices` themselves. |
| raw_state | boolean | Return the full raw /state payload instead of the compact agent_view. Default false; thousands of tokens, so only for a field the compact view lacks. |
| reason | string | One-sentence rationale; recorded in the decision log and shown to the player as this decision's reason. |
| target_index | integer | Target index into the card/potion's `targets` list when `target` is non-null. `enemy` = `combat.enemies[]`, `player` = the local player; full state spells it `target_index_space` / `valid_target_indices`. |
| then | array | Remaining combat steps (at most 9); play_card uses card_cid. Stops on changes or non-completed results; never retries. |
| tool | any | Crystal Sphere tool. Pass with x/y on crystal_clear_cell to select and clear atomically, or alone on crystal_set_tool. |
| x | integer | Crystal Sphere grid x-coordinate for crystal_clear_cell. |
| y | integer | Crystal Sphere grid y-coordinate for crystal_clear_cell. |
append_combat_knowledgeAppend a note to the active combat knowledge file.| Parameter | Type | Description |
|---|---|---|
| note * | string | |
| section | string |
append_event_knowledgeAppend a note to the active event knowledge file.| Parameter | Type | Description |
|---|---|---|
| note * | string | |
| option_index | integer | |
| section | string |
complete_combat_handoffPersist a combat-agent summary and optional enemy-pattern notes, then return a planner-facing brief.| Parameter | Type | Description |
|---|---|---|
| combat_key * | string | |
| pattern_note | string | |
| planner_message | string | |
| summary * | string | |
| tactical_note | string | |
| trait_note | string |
complete_event_handoffPersist an event outcome summary and optional event notes, then return a planner-facing brief.| Parameter | Type | Description |
|---|---|---|
| event_id * | string | |
| option_index | integer | |
| outcome_note | string | |
| planning_note | string | |
| summary * | string |
create_combat_handoffBuild a clean combat-agent packet with linked combat knowledge and planner guidance.| Parameter | Type | Description |
|---|---|---|
| combat_objective | string | |
| planner_message | string |
create_planner_handoffBuild a clean planner-agent packet for route, reward, event, and shop decisions.| Parameter | Type | Description |
|---|---|---|
| planning_focus | string | |
| previous_combat_summary | string |
decideRead everything one decision needs in a single call.diff_stateReport the paths that differ between two `/state` payloads.| Parameter | Type | Description |
|---|---|---|
| after * | object | |
| before * | object | |
| limit | integer |
get_available_actionsList currently executable actions with `requires_index` and `requires_target` hints.get_combat_contextBuild a combat-focused snapshot and link it to the canonical combat knowledge entry.| Parameter | Type | Description |
|---|---|---|
| include_knowledge | boolean | |
| planner_note | string |
get_decision_logRead recent accepted decisions with the rationale each one carried, oldest first.| Parameter | Type | Description |
|---|---|---|
| limit | integer |
get_game_data_itemLook up one entity by id when a decision-critical mechanic is missing from known facts.| Parameter | Type | Description |
|---|---|---|
| collection * | string | cards, relics, monsters, potions, events, powers, or characters. |
| item_id * | string | Entity id, for example ABRASIVE. |
get_game_data_itemsLook up several entities by id when missing mechanics need comparison.| Parameter | Type | Description |
|---|---|---|
| collection * | string | cards, relics, monsters, potions, events, powers, or characters. |
| item_ids * | string | Comma-separated entity ids. |
get_game_stateRead compact game state (`compact_agent_view` false on raw fallback; `get_raw_game_state` reads raw `/state`).| Parameter | Type | Description |
|---|---|---|
| full_state | boolean | Re-send unchanged deck/relic/ascension/glossary/note blocks. |
get_planner_briefingForward /strategy: live strategy, current run and same-run Jev trend.get_planner_contextBuild a planner-focused snapshot with route branches and linked event knowledge.| Parameter | Type | Description |
|---|---|---|
| planner_note | string |
get_raw_game_stateRead the full raw `/state` snapshot for debugging or schema inspection.get_relevant_game_dataLook up missing decision-critical metadata for the current screen.| Parameter | Type | Description |
|---|---|---|
| collection * | string | cards, relics, monsters, potions, events, powers, or characters. |
| item_ids | string | Comma-separated ids. Omit to use the ids the current screen is about: the hand in a fight, the shop stock, the cards a reward or selection screen offers, the relics a chest offers. |
get_run_summarySummarise the current run in one call: character, floor, act, boss, HP, gold, and theget_scene_guidanceReturn the strategy and the playbook for the screen the game is on right now.health_checkCheck whether the STS2 AI Agent Mod is loaded and reachable.inject_event_churnPublish synthetic /events/stream events to exercise the slow-subscriber contract.| Parameter | Type | Description |
|---|---|---|
| option_index | integer |
run_console_commandRun a game dev-console command for local validation or debugging.| Parameter | Type | Description |
|---|---|---|
| command * | string |
update_play_strategyUpdate the dual-layer strategy; omitted fields keep. option_hints: by action kind, no index.| Parameter | Type | Description |
|---|---|---|
| goal | string | |
| instructions | string | |
| option_hints | object | |
| posture | string |
wait_for_eventWait for one matching game event from `/events/stream`; `matched=false` on timeout.| Parameter | Type | Description |
|---|---|---|
| event_names | string | Comma-separated event names; empty accepts any event. |
| timeout_seconds | number | Maximum wait in seconds. |
wait_until_actionableWait for a new actionable phase, then return the fresh compact state.| Parameter | Type | Description |
|---|---|---|
| raw_state | boolean | Raw /state payload instead of the compact agent_view. |
| timeout_seconds | number |
Security checks
Static checks derived from the repository 2 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 3.6K words.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json and mcp_server/uv.lock.
- ✓No dynamic code executionScanned 455 source files and found no eval, dynamic Function or shell execution.
1 check has not been run yet.
What the source scan found
- Transport
- stdiomcp_server/src/sts2_mcp/server.py:689
- Starts other programs
- 8 calls.codex/hooks/session-start.py:185, .codex/hooks/session-start.py:302, .cursor/hooks/session-start.py:192
- Outbound network calls
- 35 callsmcp_server/src/sts2_mcp/client.py:219, mcp_server/src/sts2_mcp/client.py:452, mcp_server/src/sts2_mcp/client.py:557
- Writes or deletes files
- 134 calls.cursor/hooks/inject-shell-session-context.py:197, .cursor/hooks/inject-shell-session-context.py:246, .cursor/hooks/session-start.py:303
- Lockfile
- package-lock.json and mcp_server/uv.lock
Pattern matches on the source text of 455 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 3.6K words, fetched 2 days ago. The original in the repository is authoritative.
Read full README