/ Directory / Playground / STS2MCP
● Community Gennadiyev ⚡ Instant

STS2MCP

by Gennadiyev · Gennadiyev/STS2MCP

Let AI play Slay the Spire 2 — a mod and MCP server exposing real-time game state for autonomous and co-op agentic runs.

STS2MCP is a C# mod for Slay the Spire 2 that exposes game state via a REST API (localhost:15526) and an optional MCP server for AI agent integration. It enables Claude and other AI assistants to read game state, make decisions, and execute actions for autonomous or co-op gameplay. Supports Windows, Linux, and macOS.

Why use it

Key features

Live Demo

What it looks like in practice

sts2mcp-2.replay ▶ ready
0/0

Install

Installation instructions in the author repository

Use Cases

Real-world ways to use STS2MCP

How to have Claude play a run of Slay the Spire 2

👤 STS2 players curious about AI strategy ⏱ ~60 min beginner

When to use: You want to see how an AI approaches deck building and combat decisions.

Prerequisites
  • STS2 with the mod installed — Download STS2_MCP.dll and .json to <game>/mods/, enable mods in settings
  • MCP server running — Server auto-starts on localhost:15526 when mod loads
Flow
  1. Start a run
    Start a new Slay the Spire 2 run. Check the game state — what character are we playing and what's our starting deck?✓ Copied
    → Character info, starting deck, and current map
  2. Make strategic decisions
    We're at a card reward screen. Analyze the options based on our current deck and suggest the best pick.✓ Copied
    → Analysis of each option with recommendation
  3. Handle combat
    We're in combat. Show me our hand, the enemies, and their intents. What's the optimal play order?✓ Copied
    → Combat analysis with recommended card play sequence

Outcome: A complete STS2 run with AI making strategic decisions.

Pitfalls
  • AI makes suboptimal decisions without full game knowledge — Provide context about game mechanics and synergies the AI may not know

Combinations

Pair with other MCPs for X10 leverage

sts2mcp-2 + filesystem

Log game states and decisions for analysis and strategy improvement

Log every decision point and our choice to ~/sts2/run-log.json for later analysis.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
get_game_state none Get the current game state (map, deck, health, combat, etc.) 0
execute_action action: str, params?: obj Execute a game action (play card, end turn, make a choice) 0

Cost & Limits

What this costs to run

API quota
N/A — fully local
Tokens per call
200–1000 tokens per game state query
Monetary
Free mod — requires Slay the Spire 2 ($24.99)
Tip
Query game state only at decision points, not every frame.

Security

Permissions, secrets, blast radius

Credential storage: N/A
Data egress: Local only — REST API on localhost:15526

Troubleshooting

Common errors and fixes

Mod not loading

Ensure STS2_MCP.dll and .json are in the <game>/mods/ directory and mods are enabled in game settings.

Verify: Check the game's mod manager for STS2MCP
Can't connect to API

The server starts on localhost:15526 when the mod loads. Ensure the game is running with the mod enabled.

Verify: curl http://localhost:15526/state
Game state returns empty during loading screens

Wait until the game finishes loading. State is only available during active gameplay.

Verify: Try again after the map or combat screen is visible

Alternatives

STS2MCP vs others

AlternativeWhen to use it insteadTradeoff
Minecraft MCP ServerYou want AI-controlled gameplay in Minecraft rather than a card gameDifferent genre — open world building vs strategic card game

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills

Continue exploring

Related tools and workflows

Choose another guide for your workflow, or explore a collection.

Shared context · runs

pctx

MCP

Browse all topic collections → · See 29 new official additions →