game-mcp
Allows AI to send commands to a Godot game instance for testing, debugging, and verification, including capturing screenshots and querying game state.
Allows AI to send commands to a Unity game instance for testing, debugging, and verification, including capturing screenshots and querying game state.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Game MCP Server
A thin MCP (Model Context Protocol) server that bridges AI assistants to running game instances for testing, debugging, and verification.
Overview
This server acts as a proxy between Claude (or any MCP-compatible AI) and your game. It:
Launches your game process if not already running
Maintains a TCP connection for bidirectional communication
Forwards commands from the AI to your game
Returns responses, including screenshots, back to the AI
Engine-agnostic: Works with any game engine (Godot, Unity, Unreal, custom) as long as your game implements the simple TCP protocol.
Related MCP server: openrct2-mcp
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ AI Assistant (Claude) │
└─────────────────────────────────────┬───────────────────────────────┘
│ MCP Protocol (stdio)
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Game MCP Server │
│ │
│ - Launches game process if needed │
│ - TCP connection to game (default port 6789) │
│ - Forwards commands, returns responses │
│ - Handles screenshots as MCP ImageContent │
└─────────────────────────────────────┬───────────────────────────────┘
│ TCP + JSON (newline-delimited)
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Your Game (with DevServer) │
│ │
│ - Listens on TCP port │
│ - Executes commands, returns results │
│ - You implement the command handlers │
└─────────────────────────────────────────────────────────────────────┘Installation
bun installConfiguration
Configure via environment variables:
Variable | Default | Description |
| (none) | Path to your game/project directory |
|
| TCP port for game communication |
|
| Command to launch your game |
|
| Connection timeout |
|
| Command response timeout |
Claude Code Integration
Add to your Claude Code MCP config (~/.config/claude-code/settings.json):
{
"mcpServers": {
"game": {
"command": "bun",
"args": ["run", "/path/to/game-mcp/src/index.ts"],
"env": {
"GAME_PROJECT_PATH": "/path/to/your/game",
"GODOT_PATH": "godot"
}
}
}
}For non-Godot engines, set GODOT_PATH to whatever command launches your game.
MCP Tools
game_connect
Connects to the game, launching it if necessary.
Parameters:
project_path(string, optional): Override the game project pathrestart(boolean, optional): Kill and relaunch the gameport(integer, optional): TCP port (default: 6789)timeout_ms(integer, optional): Connection timeout
Returns: List of available commands from the game.
game_command
Sends a command to the game.
Parameters:
command(string, required): Command nameargs(object, optional): Command argumentstimeout_ms(integer, optional): Response timeout
Returns: Command result, potentially including image data.
Game-Side Protocol
Your game needs to implement a TCP server that:
Listens on the configured port (default 6789)
Accepts newline-delimited JSON messages
Responds with newline-delimited JSON
Request Format
{"id": "uuid", "command": "command_name", "args": {"key": "value"}}Response Format
{"id": "uuid", "success": true, "data": {...}}With image:
{"id": "uuid", "success": true, "data": {}, "image": "base64-encoded-png"}Error:
{"id": "uuid", "success": false, "error": "Error message"}Required Command: list_commands
Your game should implement list_commands to tell the AI what's available:
// Request
{"id": "1", "command": "list_commands", "args": {}}
// Response
{
"id": "1",
"success": true,
"data": {
"commands": [
{
"name": "screenshot",
"description": "Capture the game viewport",
"args": {
"scale": {"type": "number", "optional": true}
}
},
{
"name": "get_player_state",
"description": "Get player position and health",
"args": {}
}
]
}
}Example Commands
Common commands you might implement in your game:
Command | Description |
| Capture viewport as PNG |
| Get player position, health, etc. |
| Move player to coordinates |
| Spawn entities for testing |
| Retrieve recent error logs |
| Get FPS and performance metrics |
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, test and play AI-native games through server-authoritative contracts.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
The game engine built for AI. Any agent makes a multiplayer game and publishes it.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceA bridge between Unity and AI assistants that enables AI to interact with Unity game environments through a standardized interface for code execution, scene analysis, and runtime debugging.342 npm7MIT
- AlicenseNot gradedqualityDmaintenanceBridges a running OpenRCT2 game to AI agents, enabling them to read park state, optimize parks, and build roller coasters.1MIT
- AlicenseAqualityCmaintenanceAn MCP server connecting Claude AI with game engine runtimes (Unity & Godot) for automated testing, log filtering, and scene hierarchy inspection.4MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with running games in real time — introspecting game state, simulating keyboard and mouse input to actually play, capturing screenshots, executing Lua code, hot-reloading files, and receiving push notifications when state changes.8MIT