/ ディレクトリ / プレイグラウンド / Godot MCP
● コミュニティ Coding-Solo ⚡ 即起動

Godot MCP

作者 Coding-Solo · Coding-Solo/godot-mcp

ClaudeからGodot 4を操作 — プロジェクトの起動、ヘッドレスでのシーン実行、stdout/stderrのキャプチャが可能なので、ウィンドウを切り替えずにGDScriptを反復できる。

Godot MCPはGodot 4バイナリをラップし、エディタ+ランタイムツールを公開します。Claudeはエディタの起動、プロジェクトのヘッドレス実行、単一シーンの実行、stdout/stderrのテキストとしての取得が可能です。filesystem MCPと組み合わせると、ループが完成します:Claudeが .gd ファイルを編集 → シーンを実行 → エラーを読む → 修正 — すべてチャットから。

なぜ使うのか

主な機能

ライブデモ

実際の動作

godot-mcp-coding-solo.replay ▶ 準備完了
0/0

インストール

クライアントを選択

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "godot-mcp-coding-solo": {
      "command": "npx",
      "args": [
        "-y",
        "godot-mcp"
      ],
      "env": {
        "GODOT_PATH": "/Applications/Godot.app/Contents/MacOS/Godot"
      }
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "godot-mcp-coding-solo": {
      "command": "npx",
      "args": [
        "-y",
        "godot-mcp"
      ],
      "env": {
        "GODOT_PATH": "/Applications/Godot.app/Contents/MacOS/Godot"
      }
    }
  }
}

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "godot-mcp-coding-solo": {
      "command": "npx",
      "args": [
        "-y",
        "godot-mcp"
      ],
      "env": {
        "GODOT_PATH": "/Applications/Godot.app/Contents/MacOS/Godot"
      }
    }
  }
}

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "godot-mcp-coding-solo": {
      "command": "npx",
      "args": [
        "-y",
        "godot-mcp"
      ],
      "env": {
        "GODOT_PATH": "/Applications/Godot.app/Contents/MacOS/Godot"
      }
    }
  }
}

Claude Desktop と同じ形式。Windsurf を再起動して反映。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "godot-mcp-coding-solo",
      "command": "npx",
      "args": [
        "-y",
        "godot-mcp"
      ]
    }
  ]
}

Continue はマップではなくサーバーオブジェクトの配列を使用。

~/.config/zed/settings.json
{
  "context_servers": {
    "godot-mcp-coding-solo": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "godot-mcp"
        ]
      }
    }
  }
}

context_servers に追加。保存時に Zed がホットリロード。

claude mcp add godot-mcp-coding-solo -- npx -y godot-mcp

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: Godot MCP

GDScriptバグの高速反復ループ

👤 ソロ/インディー開発者 ⏱ ~20 min intermediate

使うタイミング: リファクタ後にプレイヤーの移動が壊れた;毎分Godotに切り替えずにClaudeに修正させたい場合。

前提条件
  • Godot 4のインストール — godotengine.orgからダウンロード
  • GODOT_PATH環境変数 — Godotバイナリを指定(macOSでは.appではなくバイナリ本体)
フロー
  1. プロジェクトのコンテキスト確認
    Godot: get project info for /Users/me/games/Platformer. List autoloads + main scene.✓ コピーしました
    → プロジェクト名・バージョン・Autoloadリストが返される
  2. 失敗するシーンを実行
    Run scene scenes/Level1.tscn headlessly with a 10-second timeout. Show stderr.✓ コピーしました
    → stderrがキャプチャされる;エラー行とトレースバックが確認できる
  3. 修正して再実行
    The error is 'Invalid call to method move_and_slide on null'. Read scripts/Player.gd, find the cause, fix it, then re-run the scene.✓ コピーしました
    → ファイルが編集され、シーンが再実行される;nullエラーが消える

結果: チャットを離れずに5分でバグを発見して修正。

注意点
  • ヘッドレス実行がモーダルダイアログでハングする — タイムアウトを使用;stderrでダイアログタイトルを確認
  • GODOT_PATHが間違ったアーキテクチャを指している(Intel vs ARM Mac)file $GODOT_PATH で確認
組み合わせ: filesystem · github

プレイヤーのステートマシンをゼロからスキャフォールドする

👤 新プロジェクトを始める開発者 ⏱ ~25 min intermediate

使うタイミング: コピー&ペーストなしにステートマシンのボイラープレート(Idle/Run/Jump/Attack)が欲しい場合。

前提条件
  • 空のGodotプロジェクト — プロジェクトマネージャーから作成
フロー
  1. ファイルを生成
    Create scripts/State.gd (base class) plus IdleState/RunState/JumpState/AttackState that extend it. Use signals for transitions. Save under res://scripts/states/.✓ コピーしました
    → 正しい場所に5つの新しい.gdファイル
  2. Player.gdに組み込む
    Update scripts/Player.gd to instance the state machine and delegate _physics_process to current_state. Keep input handling minimal.✓ コピーしました
    → Player.gdにstate_machine・current_state・transitionsが含まれる
  3. スモークテスト
    Run scenes/Player.tscn for 3 seconds. Look for runtime errors.✓ コピーしました
    → クリーンな実行;ゲームプレイ追加の準備完了

結果: 実際のステートを追加できる動作するステートマシンのボイラープレート。

注意点
  • State.gdに class_name 宣言を忘れる — 子クラスが型を使えるように追加する
組み合わせ: filesystem

CIからGUTテストをヘッドレスで実行する

👤 CIをセットアップする開発者 ⏱ ~30 min advanced

使うタイミング: プッシュのたびにGitHub Actionsでユニットテストを実行したい場合。

前提条件
  • GUTテストアドオン — Asset LibraryまたはGitサブモジュールでインストール
フロー
  1. まずローカルで実行
    Godot: run scene addons/gut/gui/GutRunner.tscn headlessly. Capture exit code.✓ コピーしました
    → テストが実行される;グリーン時はexit code 0
  2. ワークフローを生成
    Now write a .github/workflows/test.yml that does the same on Ubuntu using godot-headless 4.x.✓ コピーしました
    → 適切なGodotセットアップアクションを含むワークフローファイル

結果: Godotテストの再現可能なCI環境。

注意点
  • ヘッドレスモードがdisplay呼び出しでクラッシュする--headless を使用し、テスト内でOS.window_*を避ける
組み合わせ: github

組み合わせ

他のMCPと組み合わせて10倍の力を

godot-mcp-coding-solo + filesystem

GDScriptを編集してシーンを高速ループで再実行する

Filesystem: edit scripts/Player.gd to add jump cooldown. Godot: run scenes/Player.tscn for 3 seconds. Show stderr.✓ コピーしました
godot-mcp-coding-solo + github

Claudeがゲームプレイのバグを修正した後にPRを開く

Godot: confirm the bug is fixed by re-running the scene. GitHub: open a PR with the fix and the relevant log snippet.✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
get_project_info project_path: str 最初の呼び出し・動作確認 free
launch_editor project_path: str Godot UIを開く free
run_project project_path, headless?: bool, timeout?: int プロジェクト全体のスモークテスト free
run_scene project_path, scene_path, headless?, timeout? 単一シーンの反復 free
stop_process pid: int スタックした実行を終了 free

コストと制限

運用コスト

APIクォータ
なし — ローカル
呼び出しあたりのトークン
200〜8000(stdout/stderrが大きくなる場合あり)
金額
OSS無料;Godotは無料
ヒント
run_sceneでは積極的にタイムアウトを設定する;無限ループでtokenを消費させないこと

セキュリティ

権限、シークレット、影響範囲

最小スコープ: execute Godot binary
認証情報の保管: なし
データ送信先: ローカルのみ
絶対に付与しない: arbitrary shell

トラブルシューティング

よくあるエラーと対処法

GODOT_PATH not found

Godotバイナリへの絶対パスを設定する;macではバイナリは.appの中

確認: $GODOT_PATH --version
Headless run hangs

常にタイムアウトを渡す;モーダルダイアログやシェーダーコンパイルのためstderrを確認

Wrong Godot version

MCPはGodot 4.x専用;3.xのシーンは読み込めない

確認: godot --version

代替案

Godot MCP 他との比較

代替案代わりに使う場面トレードオフ
godot.unitynoid (mcp-godot)別のフォークが欲しい場合実績が少ない
Bevy / Rapier MCPsRust/Bevyを使用している場合全く異なるエンジン

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る