/ 目錄 / 演練場 / STS2MCP
● 社群 Gennadiyev ⚡ 即開即用

STS2MCP

作者 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.

為什麼要用

核心特性

即時演示

實際使用效果

sts2mcp-2.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "sts2mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Gennadiyev/STS2MCP"
      ]
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "sts2mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Gennadiyev/STS2MCP"
      ]
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "sts2mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Gennadiyev/STS2MCP"
      ]
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "sts2mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/Gennadiyev/STS2MCP"
      ]
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "sts2mcp-2",
      "command": "TODO",
      "args": [
        "See README: https://github.com/Gennadiyev/STS2MCP"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "sts2mcp-2": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/Gennadiyev/STS2MCP"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add sts2mcp-2 -- TODO 'See README: https://github.com/Gennadiyev/STS2MCP'

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: STS2MCP

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

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

何時使用: You want to see how an AI approaches deck building and combat decisions.

前置條件
  • 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
步驟
  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?✓ 已複製
    → 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.✓ 已複製
    → 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?✓ 已複製
    → Combat analysis with recommended card play sequence

結果: A complete STS2 run with AI making strategic decisions.

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

組合

與其他 MCP 搭配,撬動十倍槓桿

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.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
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

成本與限制

運行它的成本

API 配額
N/A — fully local
每次呼叫 Token 數
200–1000 tokens per game state query
費用
Free mod — requires Slay the Spire 2 ($24.99)
提示
Query game state only at decision points, not every frame.

安全

權限、密鑰、影響範圍

憑證儲存: N/A
資料出站: Local only — REST API on localhost:15526

故障排查

常見錯誤與修復

Mod not loading

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

驗證: 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.

驗證: 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.

驗證: Try again after the map or combat screen is visible

替代方案

STS2MCP 對比其他方案

替代方案何時用它替代權衡
Minecraft MCP ServerYou want AI-controlled gameplay in Minecraft rather than a card gameDifferent genre — open world building vs strategic card game

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills