STS2MCP  by Gennadiyev

Agentic framework for automating Slay the Spire 2 gameplay

Created 1 month ago
306 stars

Top 87.6% on SourcePulse

GitHubView on GitHub
Project Summary

Gennadiyev/STS2MCP provides a mod for Slay the Spire 2 that enables AI agents to play the game by exposing game state and actions via a localhost REST API. This project targets AI researchers and power users seeking to evaluate or leverage AI decision-making capabilities in complex gaming environments, offering a potential benchmark for language models and enabling automated gameplay.

How It Works

The core of the project is the STS2_MCP.dll mod, which injects into Slay the Spire 2 to expose game data and control mechanisms through a REST API running on localhost:15526. An optional MCP server (server.py) facilitates integration with AI platforms like Claude Desktop and Claude Code, allowing agents to parse game state and issue commands. This approach enables external AI programs to interact with and control the game, facilitating research into AI performance in challenging, out-of-distribution domains.

Quick Start & Requirements

  • Player Installation: Download the latest release, copy STS2_MCP.dll and STS2_MCP.json to the game's mods directory, and enable mods in game settings. The HTTP server starts automatically.
  • AI Integration (MCP Server): Requires Python 3.11+ and uv. Clone the repository and configure .mcp.json or claude_desktop_config.json with the provided server details. The MCP server supports custom host/port settings and a --no-trust-env flag.
  • Developer Build: Requires .NET 9 SDK and the base game. Execute .\build.ps1 (optionally specifying GameDir or setting the STS2_GAME_DIR environment variable). The compiled DLL is found in out/STS2_MCP/.
  • Prerequisites: Slay the Spire 2, .NET 9 SDK (for building), Python 3.11+ and uv (for MCP server).

Highlighted Details

  • Token Consumption: A full run on Ironclad can consume approximately 7.34M to 8M tokens (input, output, tool responses) depending on the AI model and prompt configuration.
  • Research Benchmark: Intended as a platform for evaluating AI reasoning and decision-making, particularly for language models in gaming contexts.
  • Modes: Supports both singleplayer and multiplayer (co-op) gameplay.

Maintenance & Community

The project is in an early stage, with a focus on stabilizing core features and improving documentation. Priorities include solidifying multiplayer functionality, bug fixing, enabling in-game AI communication for co-op, and developing self-reflection capabilities for agents. While specific community links (Discord/Slack) are not provided, the project is open to suggestions and contributions.

Licensing & Compatibility

The project is released under the MIT License, which generally permits commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

This is an experimental research project. The mod allows external programs to read and control the game, and users should proceed with caution, especially with important game runs. Multiplayer support is in beta and may contain bugs, with issues likely attributable to the mod itself. Current AI models are noted as having limitations in gaming performance.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
17
Issues (30d)
17
Star History
121 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.