STS2-Agent: An MCP Server and Auto-Play Mod for Slay the Spire 2
杀戮尖塔2的MOD,将杀戮尖塔2的游戏状态与操作暴露为本地 HTTP API 包装成 MCP Server,供支持 MCP 的AI客户端直接调用
At a glance
- What is it?
- The mod exposes Slay the Spire 2 game state and actions as a local HTTP API on port 8080, and the overlay can also expose an MCP endpoint at /mcp for AI clients. It is aimed at players who want a model to drive a run, and at developers who want to script against the game. The main caveat is that the licence is NOASSERTION and the README itself warns the mod is still in development.
- Who is it for?
- Adopt it if you want a model to play Slay the Spire 2 runs or if you want to script against a local HTTP API on port 8080, and you accept that the README calls the mod unfinished. Do not adopt it if you need a permissively licensed codebase or a stable interface for production tooling, since the licence field reads NOASSERTION and the mod ships frequent point releases.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly C#, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What STS2-Agent Actually Exposes
Slay the Spire 2 does not ship an interface for external programs. STS2-Agent adds one. The README describes it as an in-game AI companion and autonomous gameplay mod, and the piece that matters for engineers is the developer surface: a built-in local HTTP API on port 8080, plus an optional MCP endpoint at /mcp on the same port, which the overlay Connect tab can switch on for Cursor, Claude, and Codex. The repository topics list agent, game, mcp, mod, slay-the-spire and slay-the-spire-2, so the intent is explicit rather than incidental. The audience splits in two. Players install it from Steam Workshop and press F8 to open an overlay, configure an OpenAI-compatible chat-completions endpoint, and let a model play. Developers skip the overlay and talk to the API, or mount the MCP server in a client that already speaks that protocol. The mod is written in C# and the default branch is main.
State In, Actions Out: The Data Flow
The mechanism the README describes is a loop between a compact text state and a set of dispatched actions. The state engine produces what the README calls actionable text covering cards, energy, enemy intents, relics, HP and potion slots. That text goes to the configured model, and the model returns decisions that the mod applies to the live game: playing cards, taking rewards, choosing routes, handling shops and events. Vision is optional and layered on top. When the bound model accepts images, screenshots are captured on demand as extra context. The README is careful here, stating that offline state and action tests do not prove full-run completion, and that run completion and strategy quality depend on the model and the game conditions. That is an honest boundary and worth taking at face value. The second architecture piece is dual-instance isolation for co-op. Inviting an AI teammate launches a second game window, and the mod propagates force-steam off, increments clientId in offline mode, and clones settings.companion.json so the two instances do not overwrite each other's configuration or save slots. That last detail is the kind of thing that usually breaks first in a two-process setup, and the README names the specific file it clones.
Installing It: Workshop, Zip, And The Three Files
The recommended path is the Steam Workshop page. Subscribe, wait for the download, then start the game from Steam with Play with Mods. If the game warns that the code is untrusted, the README says to accept, quit fully, enable STS2 AI Agent in Mods, and restart. The manual path uses the GitHub release zip named sts2-ai-agent-v*-windows.zip. From the zip's mod/ folder, copy only three files into the game's mods/ folder: STS2AIAgent.dll, STS2AIAgent.pck, and mod_id.json. The README gives this layout example: C:\Program Files (x86)\Steam\steamapps\common\Slay the Spire 2\mods\STS2AIAgent.dll, with the .pck and mod_id.json alongside it. It explicitly warns not to copy the whole zip or the mcp_server/ directory into mods/, and not to double-install: if you subscribed on Workshop and also copied files by hand, delete the manual copies, because two copies can load twice. Configuration happens in the overlay, opened with F8 or the grey AI tab on the right edge. Under Settings you add an endpoint (name plus Base URL, with the API key allowed to be empty for Ollama or LM Studio), add a model and bind it to that endpoint, then pick a chat model and a play model, where an empty play model falls back to the chat model. Test Connection sends a request to the configured service, and the README states plainly that chat success is not play success. Save Settings persists the edits. Thinking intensity, vision support and session budgets live under Show advanced options.
Where It Stops Being The Right Tool
The README does not present this as finished software. It says the mod is still in development and that some things may be unfinished or break. The release cadence supports that reading: v0.10.3, v0.10.4 and v0.10.5 landed within roughly three days of each other in early September 2026. Frequent point releases on a mod that hooks a commercial game mean the interface you script against can move. The budget guards are another place to read carefully. The README says the mod tracks reported token usage and request counts, stops new calls when session limits are reached, and bounds retries. Then it adds that missing usage is shown as unknown and that these guards are not a billing guarantee. If you are running an auto-play loop against a paid endpoint, that sentence is the one that matters: the guard depends on the provider reporting usage, and not every OpenAI-compatible endpoint does. The licence is the third limitation and the sharpest one. The repository metadata reports NOASSERTION, which means no standard licence identifier was detected. That is not the same as having no licence, and it is not the same as being permissive. If you intend to redistribute the mod, bundle it, or build a product on the HTTP API, read the actual licence file in the repository before you plan anything. I cannot tell you from the supplied material what terms apply.
How It Differs From Writing Your Own Screen Scraper
The obvious alternative to a mod like this is an external automation layer: a program that watches the game window, reads pixels or memory, and synthesizes input. That approach has one real advantage, which is that it does not require the game to load anything, so it survives some game updates that would break a mod. The difference in mechanism is where the cost lands. A scraper has to infer state from images or memory offsets, which is fragile in a different way and tends to fail silently when the UI changes. STS2-Agent sits inside the game and reads state directly, which is why the README can describe a compact text state covering cards, energy, intents and relics rather than a vision pipeline. Vision still exists here, but as an optional augmentation for models that accept screenshots, not as the primary channel. The trade-off is the install and the coupling. You must subscribe on Workshop or place three files in the mods/ folder, accept the untrusted-code prompt, and keep the mod in step with the game. In exchange you get a documented HTTP API and an MCP endpoint instead of a pile of pixel coordinates. For anyone whose goal is to put a model in the loop rather than to build a general game bot, the mod's position inside the process is the whole point.
Co-op, Team Chat, And What The Chat Cannot Do
The co-op mode is the most distinctive feature and the one with the clearest safety boundary. From the main menu, the AI Teammate tab's Invite AI Teammate button launches a second game window that joins the lobby. You play your character; the model plays its own. The main window reports whether the teammate is connected, waiting on you, waiting on the game, waiting on the model, or why it stopped. Pause teammate gives immediate feedback, though the README notes that already submitted actions still finish, so pausing is not an instant freeze. Team chat is player-initiated by default and the README describes it as read-only with respect to your side: the chat interface never plays cards for the human and never unpauses a paused companion. There is an optional proactive chat that is off by default, where the teammate speaks one short line at the start and end of a fight, with a selectable tone (the README lists 轻松搭档, 沉稳参谋 and 简短简报). It never plays for you and stays under the session budget. The design choice worth noting is that conversation context feeds back into play decisions, which means chat is not cosmetic. If you tell the teammate to focus a specific enemy, that instruction can shape later actions, and the README gives exactly that example.
Maintenance Cost And Licence Risk
Running this mod is not a set-and-forget operation. Three releases in three days means you should expect to re-download the zip or let Workshop update it, and to re-check the MCP tools guide and API docs when the version moves. The docs the README points at are worth reading before you build anything: docs/api.md for the HTTP surface and mcp_server/README.md for the tool list. The mcp_server/ directory is described as optional for developers, which tells you the mod works without it and that the MCP layer is a separate moving part. On licensing, the metadata says NOASSERTION and I will not speculate beyond that. What I can say is that NOASSERTION is a signal to go read the repository's licence file yourself, and that if your use case involves redistribution or a commercial product, the absence of a recognised identifier is a reason to pause rather than a reason to assume permissive terms. Nothing in the supplied material describes a support commitment, a compatibility matrix, or a deprecation policy for the HTTP API.
Editorial conclusion
Adopt it if you want a model to play Slay the Spire 2 runs or if you want to script against a local HTTP API on port 8080, and you accept that the README calls the mod unfinished. Do not adopt it if you need a permissively licensed codebase or a stable interface for production tooling, since the licence field reads NOASSERTION and the mod ships frequent point releases. Before installing, confirm on the Steam Workshop page and the release notes which game build the current zip targets, and check the repository licence file directly rather than trusting the metadata.
Community notes