🚀 Unreal Engine MCP
Unreal Engine 5.6+を自然言語で制御できるMCPツールです。専用のBlueprintワークフローをサポートした大規模プロジェクト向けに設計されています。MCPクライアントを通じてノードグラフの構築、GameplayAbilitiesの作成、エディタータスクの自動化が可能です。Unreal Python APIドキュメントを利用したRAG機能付きPythonスクリプトも含まれています。

🎬 デモ

Homing Cluster Grenade - Lyra grenade + MCPで生成されたBlueprints (GA, スキルシステム)
✨ 主な機能
| カテゴリ |
説明 |
| Blueprintツール |
ブループリントの作成、コンポーネントの追加、ノードグラフの構築、変数の管理、ピンの接続 |
| GAS (Gameplay Ability System) |
GameplayAbilities、GameplayEffects、AbilityTasksの作成と完全なグラフ構築 |
| エディターツール |
アクターの生成、マテリアルの作成、トランスフォームの操作、アセットの検索 |
| RAG検索 |
BM25を使用してUnreal Python APIドキュメントを検索 |
| Python実行 |
RAG機能付きのドキュメント検索を伴うUnreal内でのPythonコードの実行 |
| PCGツール |
PCGグラフの作成、ノードの追加、エッジの接続 (初期段階 - 開発中) |
📐 アーキテクチャ
┌─────────────────────────────────────────────────────────────┐
│ Claude Desktop / Cursor (クライアント) │
│ LLMの推論とツールの呼び出し │
└──────────────────────────┬──────────────────────────────────┘
│ MCPプロトコル (stdio)
┌──────────────────────────┴──────────────────────────────────┐
│ Python MCPサーバー │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ ツール │ │
│ │ • editor_tool - アクター/アセットの操作 │ │
│ │ • blueprint_tool - ブループリント/GASノードグラフ │ │
│ │ • pcg_tool - PCGグラフの構築 │ │
│ │ • rag_tool - API検索とPython実行 │ │
│ └────────────────────────────────────────────────────────┘ │
└──────────────────────────┬──────────────────────────────────┘
│ TCP
┌──────────────────────────┴──────────────────────────────────┐
│ Unreal Engine C++プラグイン │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ コマンドハンドラー │ │
│ │ • EditorCommands - レベルアクターの操作 │ │
│ │ • BlueprintCommands - BPアセットとノードグラフの編集 │ │
│ │ • PCGCommands - PCGグラフの操作 │ │
│ │ • PythonExecutor - Pythonスクリプトの実行 │ │
│ └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
RAGシステム (BM25):
• Unreal Python APIドキュメントの検索を提供
• エラー回復のためにexecute_unreal_pythonで失敗した場合に使用
• 外部APIキーは不要
🚀 クイックスタート
必要条件
| コンポーネント |
バージョン |
| Unreal Engine |
5.6+ |
| Python |
3.11 |
| Claude Desktop または Cursor |
最新版 |
⚠️ 重要提示
uvパッケージマネージャーが推奨されますが、存在しない場合は自動的にインストールされます。
1. リポジトリのクローン
git clone https://github.com/gimmeDG/UnrealEngine5-mcp.git
cd UnrealEngine5-mcp
2. Unreal Engineプラグインのセットアップ
Plugins/UnrealEngineMCPフォルダをあなたのUnrealプロジェクトのPlugins/ディレクトリにコピーします。
- Unrealエディターでプロジェクトを開きます。
- プラグインを有効にします:Edit → Plugins → "UnrealEngineMCP"を検索 → 有効にする
- Unrealエディターを再起動します。
3. MCPクライアントの設定
Claude Desktop
Windows - %APPDATA%\Claude\claude_desktop_config.jsonを編集します:
{
"mcpServers": {
"UnrealEngineMCP": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\unreal-engine-mcp",
"run",
"main.py"
]
}
}
}
macOS - ~/Library/Application Support/Claude/claude_desktop_config.jsonを編集します:
{
"mcpServers": {
"UnrealEngineMCP": {
"command": "uv",
"args": [
"--directory",
"/path/to/unreal-engine-mcp",
"run",
"main.py"
]
}
}
}
Cursor
Settings → MCP → Add Serverに同じ設定を追加します:
{
"UnrealEngineMCP": {
"command": "uv",
"args": [
"--directory",
"/path/to/unreal-engine-mcp",
"run",
"main.py"
]
}
}
4. (オプション) 環境設定
cp .env.example .env
デフォルトの設定ですぐに使用できます。サーバーは以下のことを自動的に行います:
- 仮想環境を自動的に作成します。
- すべての依存関係をインストールします。
- 初回実行時にBM25インデックスを生成します。
🛠️ 利用可能なツール
エディターツール (21個のツール)
| カテゴリ |
ツール |
| アクター |
spawn_actor, spawn_blueprint_actor, delete_actor, list_level_actors, set_actor_transform, get_actor_properties, set_actor_property |
| マテリアル |
create_material, apply_material_to_actor, get_actor_material_info |
| 検索 |
search_actors, search_assets, list_folder_assets, list_gameplay_tags |
| ワールドパーティション |
get_world_partition_info, search_actors_in_region, load_actor_by_guid, set_region_loaded, list_level_instances, get_level_instance_actors |
| ユーティリティ |
get_connection_status |
Blueprintツール (47個のツール)
| カテゴリ |
ツール |
| コア |
create_blueprint, compile_blueprint, analyze_blueprint, create_child_blueprint, list_graphs |
| コンポーネント |
add_component_to_blueprint, set_component_property, set_physics_properties, delete_component_from_blueprint, apply_material_to_blueprint, get_blueprint_material_info, set_mesh_material_color |
| 変数 |
add_blueprint_variable, add_blueprint_variable_node, get_blueprint_variables, delete_blueprint_variable |
| ノードグラフ |
add_blueprint_event_node, add_custom_event_node, add_blueprint_function_node, add_blueprint_flow_control_node, add_function_override, add_blueprint_input_action_node, add_component_getter_node, add_property_get_set_node, add_blueprint_self_reference, add_blueprint_generic_node, list_blueprint_nodes, connect_blueprint_nodes, connect_nodes, set_pin_default_value, get_pin_value, set_node_property, disconnect_blueprint_nodes, delete_blueprint_node, add_pin, delete_pin, add_comment_box |
| GAS |
create_gameplay_effect, create_gameplay_ability, add_ability_task_node, explore_gas_context, list_attribute_sets, get_attribute_set_info, build_ability_graph |
| リフレクション |
search_functions, get_class_functions, get_class_properties |
RAGツール (2個のツール)
| ツール |
説明 |
search_unreal_api |
BM25を使用してUnreal Python APIドキュメントを検索 |
execute_unreal_python |
安全検証付きでUnreal Engine内でPythonコードを実行 |
PCGツール (13個のツール) - 初期段階
⚠️ 重要提示
PCGツールは機能していますが、まだ改良中です。
| カテゴリ |
ツール |
| グラフ |
create_pcg_graph, analyze_pcg_graph, set_pcg_graph_to_component |
| ノード |
add_pcg_sampler_node, add_pcg_filter_node, add_pcg_transform_node, add_pcg_spawner_node, add_pcg_attribute_node, add_pcg_flow_control_node, add_pcg_generic_node, list_pcg_nodes, connect_pcg_nodes, disconnect_pcg_nodes, delete_pcg_node |
📄 ライセンス
MIT License
💬 フィードバック
バグを見つけたり、提案がある場合は、issueを開いてください。