UnrealMCP
FreeNot checkedControl Unreal Engine 5.7 through a C++ plugin and Python bridge.
About
Control Unreal Engine 5.7 through a C++ plugin and Python bridge.
README
Built for Unreal Engine 5.7. Other UE versions may require API adjustments.
MCP plugin that lets AI agents (Claude Code, etc.) control the Unreal Editor — spawn actors, edit blueprints, create materials, manage assets, and more.
Quick Start
# 1. Clone into your project's Plugins folder
git clone https://github.com/DandyDay/UnrealMCP.git YourProject/Plugins/N1UnrealMCP
# 2. Install Python dependencies
cd YourProject/Plugins/N1UnrealMCP/Bridge
uv sync
# 3. Build the project (or open in UE Editor — it builds automatically)
Then add to your Claude Code config (~/.claude.json or .mcp.json):
{
"mcpServers": {
"n1-unreal-mcp": {
"command": "uv",
"args": ["run", "--directory", "/path/to/N1UnrealMCP/Bridge", "python", "-m", "src"]
}
}
}
Open UE Editor → Start Claude Code → Done. Try ping to verify.
Architecture
Claude Code ──── MCP (stdio) ────► Python Bridge ──── TCP :55558 ────► UE Plugin
(MCP Client) (MCP Server) (EditorSubsystem)
- UE Plugin (C++): TCP socket server, command registry, 11 handler categories
- Python Bridge: MCP SDK (
FastMCP), TCP client, tool definitions - Claude Code:
mcpServersconfig for auto-launch
Features
100+ commands across 11 categories (104 total):
| Category | Commands | Description |
|---|---|---|
| Editor | 19 | Actor spawn/delete/transform, open level, viewport, screenshot |
| Blueprint | 12 | Create BP, add components/variables, compile |
| Blueprint Node | 15 | Event/function/branch nodes, pin connections |
| Material | 11 | Create materials, add expressions, connect nodes |
| UMG | 7 | Widget blueprints, add/remove widgets, layout |
| Project | 5 | Enhanced Input mappings, project settings, plugins |
| Asset | 8 | Find/import/rename/move/delete/duplicate assets |
| Landscape | 8 | Create landscape, assign material, layers |
| PIE | 5 | Play/stop, console commands (with blocklist) |
| Data | 10 | DataTable CRUD, CurveFloat/CurveLinearColor, DataAsset |
| Meta | 4 | ping, list_commands, describe_command, list_categories |
Key Design
- TMap-based Command Registry — add new commands with one function + one registration line
- Request ID correlation — concurrent MCP tool calls matched by UUID
- Handshake protocol — version check + capabilities exchange on connect
- Undo/Redo — all mutating commands wrapped in
FScopedTransaction - Perforce integration — auto checkout,
MarkPackageDirty, optional save - Parameter validation — JSON Schema subset for required fields + type checks
- Pagination —
limit/offsetfor large result sets - Console command security — blocklist for dangerous commands in PIE
Requirements
- Unreal Engine 5.7+
- Python 3.11+
- uv (Python package manager)
- Claude Code (or any MCP-compatible client)
Setup
1. Install the Plugin
Copy N1UnrealMCP/ into your project's Plugins/ directory. Rebuild.
2. Install Python Dependencies
cd N1UnrealMCP/Bridge
uv sync
3. Configure Claude Code
Add to ~/.claude.json (under your project's mcpServers):
{
"n1-unreal-mcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/N1UnrealMCP/Bridge",
"python",
"-m",
"src"
]
}
}
4. Launch
- Open UE Editor (plugin auto-starts TCP server on port 55558)
- Start Claude Code (auto-launches Python bridge via MCP)
- Use
pingto verify connection
Usage Examples
# Spawn a point light
spawn_actor(class_path="PointLight", location=[0, 0, 500])
# Create a blueprint with components
create_blueprint(name="BP_MyActor", parent_class="Actor")
add_component(blueprint_path="/Game/Blueprints/BP_MyActor.BP_MyActor", component_class="StaticMeshComponent")
compile_blueprint(blueprint_path="/Game/Blueprints/BP_MyActor.BP_MyActor")
# Search assets
find_assets(name_pattern="Sky", limit=10)
# Read and clone a curve
get_curve_keys(curve_path="/Game/Data/Sky/MC_SunIntensity.MC_SunIntensity")
create_curve(name="MC_SunIntensity_New", curve_type="CurveFloat", path="/Game/Data/Sky")
set_curve_keys(curve_path="/Game/Data/Sky/MC_SunIntensity_New.MC_SunIntensity_New", keys=[...])
Extending
Add a new command to an existing handler
// In your handler's RegisterCommands():
RegisterCommand("my_command", "Description for AI",
nullptr, // ParameterSchema (optional)
true, // bMutatesEditorState
false, // bRequiresPIE
false, // bLongRunning
10000, // DefaultTimeoutMs
[this](const TSharedPtr<FJsonObject>& P) { return HandleMyCommand(P); });
Add a new handler category
- Create
N1MCPMyHandler.h/cppinheritingFN1MCPHandlerBase - Register in
N1MCPBridge.cpp'sRegisterAllHandlers() - Create
Bridge/src/tools/my_handler.pywith@mcp.tool()functions - Add import in
Bridge/src/server.py
Protocol
TCP messages are newline-delimited JSON:
// Request
{"type":"request", "id":"<uuid>", "command":"ping", "params":{}, "timeout_ms":10000}
// Response
{"type":"response", "id":"<uuid>", "status":"success", "result":{"pong":"N1UnrealMCP"}}
// Handshake
{"type":"hello", "protocol_version":"1.0", "client":"n1-unreal-mcp-bridge"}
{"type":"hello_ack", "protocol_version":"1.0", "server":"N1UnrealMCP", "capabilities":["pagination","meta_commands"]}
License
MIT
Installing UnrealMCP
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/dandyday/unrealmcpFAQ
Is UnrealMCP MCP free?
Yes, UnrealMCP MCP is free — one-click install via Unyly at no cost.
Does UnrealMCP need an API key?
No, UnrealMCP runs without API keys or environment variables.
Is UnrealMCP hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install UnrealMCP in Claude Desktop, Claude Code or Cursor?
Open UnrealMCP on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare UnrealMCP with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
