Before troubleshooting, run these diagnostics:
# Check Node.js version (should be 20+)
node --version
# Test the server directly
cd <UEMCP_PATH>
node test-connection.js
# Check Claude config exists
# macOS
ls ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Windows
dir %APPDATA%\Claude\claude_desktop_config.jsonNote: The MCP server is designed to handle Unreal Engine restarts gracefully!
How it works:
- The server runs health checks every 5 seconds
- When UE stops, the server logs the disconnection but keeps running
- When UE starts again, the server automatically reconnects within seconds
- You'll see status updates in the Claude Code logs
What you DON'T need to do:
- ❌ Don't restart Claude Code when restarting UE
- ❌ Don't manually restart the MCP server
- ❌ Don't worry about "connection lost" messages
What you SHOULD do:
- Start Unreal Engine first with your project
- Then launch Claude Code (
claude -c) - If you restart UE, just wait a few seconds for auto-reconnection
- Watch the logs for "✓ Python listener connected" message
Symptoms:
- Claude doesn't recognize UEMCP commands
- No MCP indicator in Claude interface
Solutions:
-
Fully restart Claude Desktop
- Quit completely (not just close window)
- On macOS: Cmd+Q or right-click dock icon → Quit
- On Windows: File → Exit or system tray → Exit
-
Verify configuration file
# Check if config exists and is valid JSON cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | jq .
-
Check server path is correct
- The path in config must be absolute
- Path separators: Use forward slashes
/even on Windows
-
Test server manually
node <PATH_FROM_CONFIG>/dist/index.js
Solutions:
- Check Node.js is in PATH:
which nodeorwhere node - Try using full Node.js path in config:
{ "command": "/usr/local/bin/node", "args": ["..."] }
Common causes:
- Old npm cache
- Permission issues
- Network problems
Solutions:
# Clear npm cache
npm cache clean --force
# Try with different registry
npm install --registry https://registry.npmjs.org/
# Install with verbose logging
npm install --verboseSolutions:
- Check Node version:
node --version(needs 20+) - Delete and reinstall:
rm -rf node_modules package-lock.json npm install npm run build
Note: Python is required for development. Match your UE version's built-in Python:
- UE 5.4-5.5: Python 3.11
- UE 5.6+: Python 3.11 (as of January 2025)
To enable Python features:
# Check Python version
python3 --version # Should be 3.11
# Install Python dependencies for local development
pip3 install -r requirements-dev.txt # Includes unreal module stub
# For CI/CD environments (no UE available)
pip3 install -r requirements-ci.txt # Excludes unreal moduleSymptoms:
- 529 errors from the Python listener
- Audio buffer underrun warnings in UE
Solutions:
-
Restart the Python listener:
# In UE Python console restart_listener()
-
The listener now processes fewer commands per tick to prevent overload
Symptoms:
- OSError when starting UEMCP listener
- Address already in use error
Solutions:
-
Find and kill the process using the port:
# Find process lsof -i :8765 # macOS/Linux netstat -ano | findstr :8765 # Windows # Kill process kill -9 <PID> # macOS/Linux taskkill /PID <PID> /F # Windows
-
Or use the built-in port utilities:
# In UE Python console import uemcp_port_utils uemcp_port_utils.force_free_port(8765) # Then restart the listener restart_listener()
Solutions:
-
Set the environment variable:
export UE_PROJECT_PATH="/full/path/to/project.uproject"
-
Update Claude config:
{ "mcpServers": { "uemcp": { "env": { "UE_PROJECT_PATH": "/full/path/to/project.uproject" } } } } -
Verify path is correct:
- Must point to the
.uprojectfile, not just the directory - Use full absolute path
- Example:
/Users/name/Documents/Unreal Projects/MyProject/MyProject.uproject
- Must point to the
Requirements:
- Enable Python Script Plugin in UE
- UEMCP plugin installed in project
Check in Unreal:
- Edit → Plugins
- Search "Python"
- Enable "Python Script Plugin"
- Search "UEMCP"
- Ensure UEMCP is enabled
- Restart Unreal Editor
Symptoms:
- Error about missing
/UEMCP/Content/Python/init_unreal_simple.py - This file was removed but reference remained
Solution:
- Check
Config/DefaultEngine.iniin your UE project - Remove any line referencing
init_unreal_simple.py
Note: As of v0.8.0, restart_listener() uses a safe scheduled restart that won't crash UE!
How it works:
- The listener schedules a restart for the next tick cycle
- Automatically stops, reloads modules, and restarts
- Takes about 2-3 seconds to complete
- No risk of crashes or freezes
To reload code changes:
# Just call restart_listener() - it's safe now!
restart_listener()What happens:
- Listener schedules a restart (0.5 second delay)
- Current HTTP server gracefully shuts down
- Python modules are reloaded with your changes
- New listener starts automatically
- You see "Listener restarted successfully" in the log
Symptoms:
- Warning about deprecated
EditorLevelLibrarymethods
Solution:
All EditorLevelLibrary methods have been fully migrated to their modern subsystem equivalents:
# Actor operations (spawn, delete, get, select)
editor_actor_subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
editor_actor_subsystem.get_all_level_actors()
editor_actor_subsystem.spawn_actor_from_object(asset, location, rotation)
editor_actor_subsystem.destroy_actor(actor)
# Level operations (save, viewport realtime, pilot)
level_editor_subsystem = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
level_editor_subsystem.save_current_level()
level_editor_subsystem.editor_set_viewport_realtime(True)
# World/editor operations
editor_subsystem = unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem)
editor_subsystem.get_editor_world()No further action is needed -- these warnings should no longer appear.
Solution:
# Grant terminal full disk access
System Preferences → Security & Privacy → Privacy → Full Disk Access
# Add Terminal or your terminal appSolution:
# Run as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserCheck these locations:
~/.config/claude/claude_desktop_config.json~/.local/share/claude/claude_desktop_config.json$XDG_CONFIG_HOME/claude/claude_desktop_config.json
Enable detailed logging:
# Set debug environment variable
export DEBUG=uemcp:*
# Run with debug
DEBUG=uemcp:* node test-connection.js
# In Claude config
{
"mcpServers": {
"uemcp": {
"env": {
"DEBUG": "uemcp:*"
}
}
}
}- Check logs: Look for error messages in terminal output
- Run diagnostics: Use
test-connection.jsor thetest_connectionMCP tool - GitHub Issues: Search existing issues or create new one
- Debug output: Include
DEBUG=uemcp:*output when reporting - Check UE Output Log: Window → Developer Tools → Output Log in UE
Useful commands in the UE Python console:
# Check if listener is running
status()
# Restart the listener (hot reload)
restart_listener()
# Stop the listener
stop_listener()
# Start the listener
start_listener()
# Enable debug logging
import os
os.environ['UEMCP_DEBUG'] = '1'
restart_listener()If all else fails, complete reset:
# Backup your config
cp ~/Library/Application\ Support/Claude/claude_desktop_config.json ~/Desktop/
# Remove UEMCP
rm -rf UEMCP
# Start fresh
git clone https://github.com/atomantic/UEMCP.git
cd UEMCP
./setup.sh