doom-mcp
{"type": "text"}# MCP 経由のDOOM
DOOMは動くのか? 動きます。あなたのAIコーディングアシスタントはDOOMをプレイできます。
Claude Code、Cursor、またはMCP互換のクライアントでDOOMをプレイできます。AIはゲームを見て、悪魔と戦い、レベルを進み、何が起きているかを報告します。あるいは、あなたが一手ずつ指示を出すこともできます。
> Let's play DOOM!
Starting E1M1 on medium difficulty...
HP:100 Armor:0 | Pistol (key:2) | Ammo: 50b 0s 0r 0c | Kills:0 | E1M1
No enemies in sight. Exploring the corridor ahead.
> Go forward and find some enemies
Sprinting down the hallway... I can see an opening ahead.
HP:100 Armor:0 | Pistol (key:2) | Ammo: 50b 0s 0r 0c | Kills:0 | E1M1
ENEMIES IN SIGHT (aim for angle~0 then fire): Imp (HP:60) to your left (turn_left ~9) nearby
There's an Imp to the left! Turning to face it...
> Shoot it!
Aimed and firing!
HP:100 Armor:0 | Pistol (key:2) | Ammo: 47b 0s 0r 0c | Kills:0 | E1M1
ENEMIES IN SIGHT (aim for angle~0 then fire): Imp (HP:15) AHEAD close
Hit! The Imp is wounded (HP:15). One more burst should finish it.
HP:95 Armor:0 | Pistol (key:2) | Ammo: 44b 0s 0r 0c | Kills:1 | E1M1
ITEMS: Stimpack (+10 HP) slightly to your right (turn_right ~4) point-blank (~3 ticks fwd+run to reach)
1 kill! Want to see a screenshot?詳細はブログ記事をご覧ください。
目次
Related MCP server: local-agent-context
仕組み
Rust製のMCPサーバーが、実際のDOOMエンジン(doomgeneric)をFFI経由で直接組み込んでいます。エミュレーションも子プロセスもありません。各ツール呼び出しは、ゲームを指定したティック数だけ進め、以下を返します:
ゲーム状態 - HP、アーマー、弾薬、キル数、位置、現在の武器
敵情報 - 視認可能な敵と、人間が読める方向・距離・HP
近くのアイテム - 取得範囲内の回復、弾薬、アーマー、武器
ドアとスイッチ - 範囲内で検出された操作可能なlinedef
フレーム画像 - AIの視覚用の小さなPNGサムネイル
AIはこの情報を使って移動、戦闘、探索を行います。あなたが指示することも、自律的にプレイさせることもできます。
graph LR
A[MCP Client] -->|doom_start| B[doom-mcp binary]
A -->|doom_action| B
A -->|doom_screenshot| B
B -->|FFI| C[doomgeneric C engine]
C -->|frame buffer| B
B -->|game state + PNG| Aクイックスタート
1. MCPクライアントに登録する
Claude Code:
claude mcp add doom --scope user -- npx -y doom-mcpCursor、Windsurf、またはその他のMCPクライアント - .mcp.jsonに追加:
{
"mcpServers": {
"doom": {
"type": "stdio",
"command": "npx",
"args": ["-y", "doom-mcp"]
}
}
}2. プレイする
新しいセッションを開いて、次のように言います:
「DOOMをやろう」
AIがプレイモードを尋ね、E1M1でゲームを開始し、プレイを始めます。
プレイモード
モード | 仕組み | 最適な用途 |
あなたが指示 | あなたがコマンドを出します(「前進」「そのドアを開けて」「インプを撃って」)。AIは一度に1つのアクションを実行し、何が起きたかを説明します。 | 没入型ガイドプレイ |
AI自律プレイ | AIがすべての判断を行います(移動、戦闘、探索)。あなたは見守り、必要に応じて介入します。 | AIのプレイを見る |
ツールリファレンス
doom_start
DOOMを開始または再起動します。いつ呼び出しても安全です。ゲームがすでに実行中の場合は、新しいセッションを必要とせずにクリーンに再起動します。
パラメータ | 型 | デフォルト | 説明 |
| int (1-5) | 3 | 難易度:1=ベビー、2=イージー、3=ミディアム、4=ハード、5=ナイトメア |
| int (1-4) | 1 | エピソード番号 |
| int (1-9) | 1 | マップ番号 |
doom_action
ゲームを進めます。リストされたすべてのアクションは、ティック時間の間同時に保持されます。
パラメータ | 型 | 必須 | 説明 |
| string | はい | カンマ区切り: |
| int (1-105) | いいえ | 進めるゲームティック数。デフォルト7。35ティック/秒の場合:7 ~ 0.2秒、35 ~ 1秒 |
ゲームプレイの注意点:
fireは全時間トリガーを引き続けます。ピストルは約10ティックごとに自動発射します。旋回と発射は別々のアクションにすべきです(旋回しながらの発射は弾薬の無駄です)。
useはドアを開け、スイッチを作動させます。武器キー:1=素手、2=ピストル、3=ショットガン、4=チェインガン、5=ロケットランチャー、6=プラズマ、7=BFG。
doom_screenshot
フル解像度の320x200スクリーンショットをシステムの一時ディレクトリに保存し、デフォルトの画像ビューアで開きます。ゲームは進めません(フレームが落ち着くための短い一時停止のみ)。
設定
環境変数 | 説明 |
| カスタムIWADファイルへのパス(例:自分専用の |
|
|
同梱のFreedoom WADはそのまま動作しますが、オリジナルのDOOMシェアウェアWADの方がレベルとスプライトが優れています。これを使用するには:
doomworld.com/classicdoom/info/shareware.phpから
DOOM1.WADをダウンロードします(合法的、無料)MCP設定で
DOOM_WAD_PATHを設定します:
{
"mcpServers": {
"doom": {
"type": "stdio",
"command": "npx",
"args": ["-y", "doom-mcp"],
"env": {
"DOOM_WAD_PATH": "/path/to/DOOM1.WAD"
}
}
}
}DOOMまたはDOOM 2をお持ちの場合は、同じ方法でそれらのWADを使用できます。任意のカスタムWADを使用するには:
{
"mcpServers": {
"doom": {
"type": "stdio",
"command": "npx",
"args": ["-y", "doom-mcp"],
"env": {
"DOOM_WAD_PATH": "/path/to/DOOM.WAD"
}
}
}
}FAQ
Windowsでも動作しますか? はい。npmパッケージにはWindows x64バイナリが含まれています。macOS/Linuxと同じ方法で登録してください。
自分のDOOM WAD(DOOM.WAD、DOOM2.WAD)を使用できますか?
はい。MCP設定でDOOM_WAD_PATHを設定してください。シェアウェアのDOOM1.WADはdoomworld.comから無料でダウンロードでき、同梱のFreedoomよりもはるかに優れたレベルを持っています。詳細は設定セクションを参照してください。
APIトークンはどれくらい消費しますか?
各doom_action呼び出しは、約1〜2KBのテキスト(ゲーム状態+敵情報)と約6KBのPNGサムネイルを返します。アクションあたり約1,500〜2,500トークンです。50アクションの一般的なゲームプレイセッションでは、約75,000〜125,000トークンを使用します。
AIは実際にDOOMをうまくプレイできますか? レベルを移動し、敵を見つけ、照準を合わせ、戦うことができます。E1M1のミディアム難易度で、セッションあたり約5〜10キルを達成します。部分的な遮蔽物の背後にいる敵や、複雑なドアの連続操作には苦労します。あなたが指示すると上達します。
特定のレベルをプレイできますか?
はい。doom_startにepisodeとmapパラメータを渡してください。例えば、エピソード1マップ3の場合はepisode:1, map:3となります。
死んだらどうなりますか? エンジンはHP:0を報告し、デス画面のスクリーンショットを提供します。現在、セッション内での再起動はありません。再度プレイするには新しい会話を開始してください。
マルチプレイヤーはサポートされていますか? まだです。DOOMのマルチプレイヤープロトコルは理論上マルチエージェントプレイをサポートできますが、実装されていません。
AIはズルをしていますか?壁越しに見えたりしませんか?
いいえ。敵の検出にはDOOMのネイティブな視線チェック(P_CheckSight)を使用しています。AIは画面上で見えるはずの敵だけを認識します。アイテムは近接で検出されますが、AIはそれらを拾うために実際にその上を歩く必要があります。
アーキテクチャ
src/main.rs MCP JSON-RPC server over stdio
src/doom.rs Engine FFI wrapper: init, tick, frame capture, state extraction
src/renderer.rs PNG rendering (216-color palette thumbnails for MCP, full RGB for screenshots)
src/paths.rs WAD file discovery across platforms
src/log.rs Debug logging to file
build.rs Compiles doomgeneric C sources via cc crate (whitelist approach)
csrc/platform.c DG_ callbacks, virtual time, key injection, enemy/item/door detectionバイナリはコンパイル時にdoomgeneric Cエンジンをリンクしています。実行時は単一プロセスで、サブプロセスの生成はありません。フレームは共有スクリーンバッファから読み取られ、キー入力はFFIを通じて注入されます。
仮想時間 - エンジンのクロックは実時間から切り離されています。各doomgeneric_Tick()は、実際の経過時間に関係なく、正確に1ゲームティック(1/35秒)進めます。これによりゲームプレイは決定的になり、ティックのスキップが防止されます。
敵とアイテムの検出 - サーバーはエンジンの内部オブジェクトリスト(thinker_tチェーン)を反復処理して、近くの敵と取得可能なアイテムを見つけます。視線チェックにはDoomのネイティブなP_CheckSight()を使用します。視認可能な敵のみが報告され、「壁抜け」チートを防ぎます。
開発
必要なもの:Rustツールチェーン、GCC、Make、Git、curl、unzip。
git clone https://github.com/gunnargrosch/doom-mcp.git
cd doom-mcp
bash scripts/setup.sh # clones engines, downloads Freedoom WAD
cargo build --release # compiles everything into a single binary
cargo test # runs unit + integration testsテスト用にローカルビルドを登録:
claude mcp add doom --scope user -- ./target/release/doom-mcpデバッグログを有効にする:
claude mcp add doom --scope user -e DOOM_MCP_DEBUG=1 -- ./target/release/doom-mcp
tail -f /tmp/doom-mcp.log # Linux/macOS (Windows: %TEMP%\doom-mcp.log)npmパッケージ
npmパッケージをローカルでビルド:
bash scripts/build-npm.sh # copies binary + WAD into npm/
cd npm && npm pack # creates doom-mcp-0.1.2.tgz公開(npmアカウントとCI用のNPM_TOKENが必要):
cd npm && npm publishクレジット
doomgeneric by ozkl - ポータブルDOOMエンジン
Freedoom - オープンソースのIWADファイル
id Software - オリジナルのDOOM(GPL-2.0)
変更履歴
変更の詳細なリストはCHANGELOG.mdを参照してください。
ライセンス
このリポジトリのMCPサーバーコードはMITライセンスです。
doomgenericはGPL-2.0ライセンスで、ビルド時にクローンされます(ベンダリングはされていません)。Freedoom WADはBSDスタイルのライセンスで配布されています。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that empowers AI coding agents to work effectively with Minecraft mod development, providing static analysis of decompiled source code and runtime interaction with a running Minecraft instance.313913MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that gives AI coding agents persistent memory and context across sessions.9MIT
- AlicenseAqualityCmaintenanceAn MCP server that gives AI assistants full control over the Godot game engine, enabling scene building, script writing, game running, and more through natural language.751652MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for the DM3 game engine that enables AI assistants to create, build, and run game projects, generate components, query documentation, and validate code.MIT
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gunnargrosch/doom-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server