doom-mcp
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.
doom-mcp
An MCP server that lets AI agents play Doom. Exposes game control, state observation, and action execution as Model Context Protocol tools. Works best with xAI Grok models and comes pre-installed with AgenC.
Agents receive structured game state (objects, depth, sectors, variables) plus screenshots, then send named actions back - no raw button arrays or pixel parsing required.
Features
Full game state as structured data -object positions with distance/angle-to-aim, depth buffer stats, sector geometry, 39 tracked game variables (health, ammo, position, velocity, kills, etc.)
Screenshots as PNG images -returned alongside structured state for visual grounding
Delta buttons for precise control -continuous turn/move values in degrees, not just binary left/right
Enemy database -70+ entity types with threat level, attack type, typical HP, and descriptions
Campaign mode -play through all 32 Doom II maps (or 36 Doom I maps) with automatic level progression
9 built-in scenarios -ViZDoom's training scenarios for focused skill development
Headless or visible -run without a display for AI training, or open a window to watch
Related MCP server: doom-mcp
Prerequisites
Python 3.10+
A working C++ compiler (ViZDoom builds native code)
On Linux:
libgl1-mesa-devand related OpenGL packages
Installation
git clone https://github.com/your-username/tetsuo-doom.git
cd tetsuo-doom
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Verify the installation:
python -c "import vizdoom; print(vizdoom.__version__)"
python -c "import fastmcp; print(fastmcp.__version__)"Quick Start
With VS Code (Copilot)
Add to .vscode/mcp.json:
{
"servers": {
"doom": {
"command": "${workspaceFolder}/.venv/bin/fastmcp",
"args": ["run", "src/doom_mcp/server.py"]
}
}
}With Claude Code
The repo includes .mcp.json for automatic configuration. Claude Code will detect the server when you open the project.
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"doom": {
"command": "/path/to/tetsuo-doom/.venv/bin/fastmcp",
"args": ["run", "src/doom_mcp/server.py"],
"cwd": "/path/to/tetsuo-doom"
}
}
}Standalone
# stdio transport (for MCP clients)
fastmcp run src/doom_mcp/server.py
# SSE transport (for web clients)
fastmcp run src/doom_mcp/server.py --transport sseTools
start_game
Start a new Doom game. Use scenario for built-in training scenarios, or wad + map_name for full campaign maps.
Parameter | Type | Default | Description |
|
|
| Built-in scenario name (ignored if |
|
|
| WAD file: |
|
|
| Map to load (e.g. |
|
|
| Doom skill level 1-5 |
|
| see below | Action buttons to enable |
|
| see below | Game variables to track |
|
|
| ViZDoom resolution enum |
|
|
| Max tics per episode |
|
|
| Show HUD overlay |
|
|
| Open a game window |
|
|
| Random seed |
get_state
Returns a screenshot image and game state dict:
game_variables-health, armor, position, angle, ammo, weapons, kills, etc.objects-all entities with computeddistance,angle_to_aim, type, threat level, HPsectors-map geometry (wall lines, floor/ceiling heights)depth-min/mean distance per screen region (6 regions + crosshair)episode_finished,tic,total_reward
take_action
Execute an action and return the resulting state (same format as get_state).
Parameter | Type | Default | Description |
|
|
| Button name to value mapping |
|
|
| Game tics to hold the action |
// Example: turn right 15 degrees, move forward, and shoot
{"actions": {"TURN_LEFT_RIGHT_DELTA": 15, "MOVE_FORWARD_BACKWARD_DELTA": 10, "ATTACK": 1}, "tics": 1}get_objects
Get all objects in the game world with enriched info: distance, angle to aim, type/threat/HP from the enemy database, visibility, and screen bounding box.
get_map
Get the automap (top-down view) as a PNG image.
new_episode
Start a new episode. In campaign mode, automatically advances to the next map on level completion, or restarts the same map on death.
get_available_actions
Returns configured buttons with types (delta or binary), sign conventions, and usage examples.
stop_game
Stop the current game and release resources.
Action System
Actions use a dict mapping button names to values:
Button | Type | Convention |
| delta | positive = right, negative = left (degrees) |
| delta | positive = down, negative = up (degrees) |
| delta | positive = forward, negative = backward |
| delta | positive = right, negative = left |
| binary | 1 = fire |
| binary | 1 = open doors / activate switches |
| binary | 1 = run |
| binary | 1 = cycle weapon forward |
| binary | 1 = cycle weapon backward |
| binary | 1 = jump |
| binary | 1 = crouch |
Each object in the game state includes an angle_to_aim field -pass it directly to TURN_LEFT_RIGHT_DELTA to face that object.
Game Modes
Training Scenarios
9 built-in ViZDoom scenarios for focused practice:
Scenario | Description |
| Single room, single enemy -learn to shoot |
| Navigate a corridor with enemies on both sides |
| Survive waves of enemies approaching from all directions |
| Hold a defensive line against approaching enemies |
| Collect health packs to survive in a toxic environment |
| Harder version of health gathering |
| Navigate a maze to find the goal |
| Track and shoot a moving target |
| Free-for-all deathmatch |
Campaign Mode
Play through the full Doom game using the bundled Freedoom WADs:
// Doom II campaign (32 maps)
{"wad": "freedoom2", "map_name": "MAP01"}
// Doom I campaign (36 maps)
{"wad": "freedoom1", "map_name": "E1M1"}When a level is completed, new_episode() automatically advances to the next map. On death, it restarts the current map. The state includes level_completed, player_dead, and next_map hints to guide the agent.
Architecture
AI Agent <──MCP──> FastMCP Server <──Python API──> ViZDoom Engine
│
┌─────────┼─────────┐
│ │ │
server.py game_manager state.py
(tools) (lifecycle) (extraction)
│ │ │
actions.py scenarios.py objects.py
(buttons) (configs) (enemy DB)server.py-8 MCP tool definitions (thin wrappers)game_manager.py-game lifecycle, action execution, state managementstate.py-screenshot conversion, object enrichment, depth/sector extractionactions.py-button name-to-enum mappingscenarios.py-scenario registryobjects.py-database of 70+ Doom entity types
Development
Running Tests
# Unit tests (no ViZDoom runtime needed)
pytest tests/ -k "not integration"
# Integration tests (requires ViZDoom)
pytest tests/ -m integration
# All tests
pytest tests/Project Structure
tetsuo-doom/
├── src/doom_mcp/
│ ├── __init__.py
│ ├── server.py # MCP tool definitions
│ ├── game_manager.py # Core game lifecycle
│ ├── actions.py # Button mapping
│ ├── scenarios.py # Scenario registry
│ ├── state.py # State extraction
│ └── objects.py # Enemy database
├── tests/
│ ├── test_actions.py
│ ├── test_state.py
│ ├── test_scenarios.py
│ ├── test_objects.py
│ ├── test_game_manager.py # Integration
│ └── test_server_integration.py
├── pyproject.toml
└── .mcp.json # MCP client configKnown Limitations
Single client -one game instance at a time (no multiplayer MCP sessions this will be added very soon)
Delta values scale with tics -use
tics=1for precise aimingFreedoom assets -bundled WADs use Freedoom (free replacement art/levels), not original id Software assets
Headless rendering -requires OpenGL libraries even without a visible window
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
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Stateless agentic tools over MCP: concept extraction, long-context, knowledge graph, planning.
Calibrated world model for AI agents. 40 tools: world state, markets, trading. Kalshi + Polymarket.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with a GameBoy emulator, providing tools for controlling the GameBoy, loading ROMs, and retrieving screen frames.1338MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that lets AI coding assistants play DOOM in compatible clients by embedding the real DOOM engine, providing game state, enemy intel, and screenshots.13MIT
- AlicenseNot gradedqualityBmaintenanceLets agents play Doom-engine games (Freedoom, Doom, Doom II, Heretic) one turn at a time over network MCPL, taking actions like move, turn, goto, attack and use while receiving frames, events, bearings and map clearance. Enables people to watch each turn on the web, chat with the player, and replay or resume games that survive server restarts.MIT
- AlicenseAqualityBmaintenanceEnables LLMs and agents to play Yu-Gi-Oh! through 14 MCP tools that translate semantic duel actions into HTTP calls to an instrumented YGOPro client, avoiding binary protocol frames and pixel-based screen interaction.14MIT