This guide walks you through installing and configuring the Unreal Master Agent MCP server and UE plugin to enable Claude Code to control Unreal Engine development tasks.
Before starting, ensure you have the following installed:
- Node.js 20 or later
- npm 10 or later
- TypeScript 5.5+ (installed automatically via devDependencies)
- Unreal Engine 5.4, 5.5, 5.6, or 5.7
- Claude Code (latest version) with MCP support enabled
Check your Node.js and npm versions:
node --version
npm --versionNavigate to the MCP server directory and install all required packages:
cd mcp-server
npm installThis installs:
@modelcontextprotocol/sdk— MCP protocol supportws— WebSocket server for UE plugin communicationzod— Schema validationtypescript,vitest— development tools
Compile TypeScript to JavaScript:
npm run buildThis generates the compiled server in mcp-server/dist/index.js.
For active development with automatic recompilation on file changes:
npm run devThis runs TypeScript in watch mode and recompiles whenever you edit source files.
Configure Claude Code to load the Unreal Master Agent MCP server. You can use either .claude/mcp.json (project-local) or ~/.claude/settings.json (global).
Create or update .claude/mcp.json at the project root:
{
"mcpServers": {
"unreal-master-agent": {
"command": "node",
"args": ["C:/Workspace/UnrealMasterAI/mcp-server/dist/index.js"],
"env": {
"UE_WS_PORT": "9877"
}
}
}
}Replace the args path with your actual project path. Use forward slashes (/) even on Windows.
Alternatively, add the server to your global Claude Code settings:
{
"mcpServers": {
"unreal-master-agent": {
"command": "node",
"args": ["/full/path/to/mcp-server/dist/index.js"],
"env": {
"UE_WS_PORT": "9877"
}
}
}
}- UE_WS_PORT (default: 9877) — WebSocket port the UE plugin will connect to. Change this if port 9877 is already in use on your system.
The Unreal Master Agent's Python automation layer requires the Python Editor Script Plugin, which is not enabled by default in all Unreal Engine distributions.
- Open your UE project in the editor
- Go to Edit → Plugins
- Search for "Python Editor Script Plugin" under the Scripting category
- Check the Enabled checkbox
- Restart the editor when prompted
After enabling, verify Python is available:
- Open Window → Developer Tools → Output Log
- Switch the command bar dropdown to Python
- Type
print("Python works!")and press Enter
If PythonScriptPlugin is not available, the MCP server will:
- Return a descriptive error:
"Python script execution requires PythonScriptPlugin. Enable it in Edit → Plugins → Scripting." - Continue operating with all non-Python tools functional
- Log a warning at startup when the plugin is not detected
| Symptom | Cause | Fix |
|---|---|---|
| "PythonScriptPlugin not found" | Plugin not enabled | Enable in Edit → Plugins → Scripting |
| Python commands not available | Editor restart needed | Restart UE Editor after enabling plugin |
| Import errors in Python scripts | Wrong Python version | UE5 requires Python 3.9+. Check with python --version in UE console |
The UE plugin implements the Layer 3 (C++) components that execute operations in Unreal Engine.
Copy or symlink the UnrealMasterAgent/ directory to your Unreal Engine project's Plugins/ directory:
# Option A: Copy
cp -r UnrealMasterAgent /path/to/YourProject/Plugins/UnrealMasterAgent
# Option B: Symlink (Unix/Linux/macOS)
ln -s /path/to/UnrealMasterAI/UnrealMasterAgent /path/to/YourProject/Plugins/UnrealMasterAgent
# Option C: Symlink (Windows, requires admin)
mklink /D "C:\YourProject\Plugins\UnrealMasterAgent" "C:\Workspace\UnrealMasterAI\UnrealMasterAgent"Edit your project's .uproject file and add the plugin to the Plugins array:
{
"FileVersion": 3,
"EngineAssociation": "5.4",
"Category": "Development",
"Description": "Your project description",
"Modules": [...],
"Plugins": [
{
"Name": "UnrealMasterAgent",
"Enabled": true
}
]
}Open your project in the Unreal Engine editor. You will be prompted to rebuild the plugin. Click Yes to compile the C++ code.
Alternatively, rebuild from the command line:
UnrealAutomationTool BuildPlugin -Plugin=Plugins/UnrealMasterAgent -Package=Binaries/Win64 -CreateNew -TargetPlatforms=Win64Once the UE editor has loaded with the plugin enabled, verify the connection is working.
In Claude Code, run the editor.ping tool:
> editor.ping
Expected response:
{
"status": "ok",
"ueVersion": "5.4.0"
}Replace 5.4.0 with your actual UE version.
Confirm that the WebSocket server is listening on the configured port (default 9877). On Windows:
netstat -ano | findstr :9877On macOS/Linux:
lsof -i :9877You should see the Node.js process listening.
Monitor the MCP server output for connection messages. If you're running the server in development mode, you'll see:
WebSocket client connected from [UE Plugin]
Or in the UE Editor console:
LogUnrealMasterAgent: WebSocket connected to MCP server at localhost:9877
Problem: The plugin fails to connect to the MCP server.
Solutions:
- Verify the Node.js server is running:
npm startinmcp-server/ - Confirm the correct port is configured in both
.claude/mcp.jsonand the UE plugin settings - Ensure the firewall is not blocking localhost connections on the port
- Check that the plugin path in
.uprojectis correct
Problem: The server exits immediately after starting.
Solutions:
- Run
npm run buildto ensure TypeScript is compiled - Verify Node.js 20+ is installed:
node --version - Check for missing dependencies:
npm install - Review the server logs for error messages
Problem: The UE editor does not recognize the plugin.
Solutions:
- Verify the plugin path:
Plugins/UnrealMasterAgent/ - Confirm the
.uprojectentry:"Name": "UnrealMasterAgent", "Enabled": true - Rebuild the project: Edit > Plugins > Search "UnrealMasterAgent" > Restart
- Check for compilation errors in the Output Log
Problem: Another application is using port 9877.
Solutions:
- Change the port in
.claude/mcp.jsonto an available port (e.g., 9878) - Restart both the MCP server and UE editor
- Or terminate the process using the port (use
netstatorlsofto find it)
In production, Claude Code automatically starts the MCP server based on your configuration.
To manually start the server:
cd mcp-server
npm startOr in development mode with watch:
cd mcp-server
npm run devTest the MCP server components:
cd mcp-server
npm testOr in watch mode:
cd mcp-server
npm run test:watchVerify TypeScript types without running tests:
cd mcp-server
npm run typecheck- Read ARCHITECTURE.md for the system design and 4-layer architecture
- Review the MCP Tool Reference for available tool documentation
- Consult the Safety Architecture guide to understand approval workflows
- Check AGENTS.md for AI agent guidance
For issues, questions, or contributions, refer to the project repository or contact the development team.