STS2 AI Agent
Enables AI agents to play Slay the Spire 2 by exposing game state and actions through an MCP server, supporting combat, rewards, and run management.
README
STS2 AI Agent
https://github.com/user-attachments/assets/89353468-a299-4315-9516-e520bcbfbd4b
中文版说明请见 README.zh-CN.md.
STS2 AI Agent is a Slay the Spire 2 mod + MCP server bundle:
STS2AIAgent: exposes game state and actions through a local HTTP APImcp_server: wraps that local API as an MCP server for AI clients
Detailed MCP tool documentation lives in mcp_server/README.md. If you want an agent workflow on top of it, start with skills/sts2-mcp-player/SKILL.md.
Quick Start
1. Install The Mod
After downloading and extracting the release package, copy these files into your game's mods/ directory:
STS2AIAgent.dll
STS2AIAgent.pck
mod_id.json
The default Steam install path is usually:
C:\Program Files (x86)\Steam\steamapps\common\Slay the Spire 2
Your final layout should look like this:
Slay the Spire 2/
mods/
STS2AIAgent.dll
STS2AIAgent.pck
mod_id.json
2. Start The Game And Confirm The Mod Is Loaded
Launch the game normally so the mod can load with it.
Then open:
http://127.0.0.1:8080/health
If the endpoint responds, the mod is running.
3. Start The MCP Server
Prepare the environment first:
- Install
Python 3.11+ - Install
uv
Install uv on Windows:
powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/install.ps1 | iex"
On macOS:
brew install uv
Then start the default stdio MCP server.
Windows:
powershell -ExecutionPolicy Bypass -File ".\scripts\start-mcp-stdio.ps1"
macOS / Linux:
./scripts/start-mcp-stdio.sh
This is the recommended default. Most desktop AI clients prefer stdio MCP integration.
4. Connect Your MCP Client
If your client supports command-based MCP startup, point its working directory at mcp_server/ and use:
uv run sts2-mcp-server
If your client works better over HTTP, start the network server instead.
Windows:
powershell -ExecutionPolicy Bypass -File ".\scripts\start-mcp-network.ps1"
macOS / Linux:
./scripts/start-mcp-network.sh
Default MCP endpoint:
http://127.0.0.1:8765/mcp
What The Project Can Do
The current main branch provides a playable MCP integration for STS2, including:
- reading live game state
- listing currently legal actions
- driving combat, rewards, shops, map routing, events, rest sites, chests, capstone selection, and bundle selection
- enriched combat and run payloads (Ascension, act/boss ID, enemy/move ID) for AlphaZero training
resolve_rewardsatomic action for controlled reward resolution- reducing polling through SSE events
- exposing MCP over
stdioor HTTP - serving live game metadata for cards, relics, monsters, potions, and events via the Mod API
- supporting layered planner / combat agent handoff flows
increase_ascension/decrease_ascensioncontrols in character select
See mcp_server/README.md for the detailed tool surface.
FAQ
http://127.0.0.1:8080/health Does Not Open
Check these first:
- The game is actually running
STS2AIAgent.dll,STS2AIAgent.pck, andmod_id.jsonare all inside the game'smods/directory- The files were not duplicated or renamed by the OS
- You copied them into the Steam game directory, not the repository directory
The MCP Server Starts But Cannot Read Game State
That usually means mcp_server is running, but the in-game mod is not connected. Confirm:
- The game is running
http://127.0.0.1:8080/healthis reachable- The MCP server is still pointing at
http://127.0.0.1:8080
Should I Enable Debug Actions?
Usually no.
Developer-only actions such as run_console_command are disabled by default and should stay disabled in normal use and releases.
Building From Source
If you are building from source instead of using a release package:
Windows:
powershell -ExecutionPolicy Bypass -File ".\scripts\build-mod.ps1" -Configuration Release
macOS / Linux:
./scripts/build-mod.sh --configuration Release
More complete environment, path-discovery, and validation notes are in build-and-env.md.
Repository Layout
STS2AIAgent/: game mod sourcemcp_server/: MCP server sourcescripts/: startup, build, and validation scriptsdocs/: supporting documentationskills/: companion skills
License
This project is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0-only).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。