Build an MCP with Claude Code to let AI play PC games autonomously in the background
The author built an MCP service that allows Claude to independently play PC games in the background, handling driving, flying, walking, and in-game decision-making to autonomously create, test, and improve game mods. The tool is Windows-based, fully open-source, supports running multiple games simultaneously without disrupting normal computer use.
Reddit r/ClaudeAI/u/Wonderful-Ad-8579
Claude CodeTypeScriptCodexMCP server
Added 2026-11-09 · originally published 2026-11-08
Steps
- 1Use Claude Code to set up the project and plan/write the code, including an in-game DLL for input and capture, and a TypeScript MCP server with about 100 tools.
- 2Configure a small profile for each game (minimap position, camera turning, waypoint appearance, etc.), supporting new games primarily through data rather than code.
- 3Assign a game as a testbed and a specific problem (such as a vehicle stalling at a specific intersection) to each AI agent, letting the agent play the game via MCP and identify tool issues.
- 4Have the agent fix the code and measure the effects before and after the fix on the same route, then have Claude Code review the changes and run tests before release.
Copy-ready prompt
Please help me write a project plan and code framework for creating an MCP service that allows an AI agent to independently operate specific software (such as [software name]) in the background. The service needs to include an internal module handling input and screen capture, along with a [TypeScript] MCP server containing about 100 tools so the AI can read the interface and execute [specified actions].
#Claude Code#MCP#Game Automation#AI Agent
Related use cases
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.