Skip to content

Troubleshooting

Each section starts with the symptom, then the cause and the fix. When none of these match, check the logs and open an issue on GitHub.

Ports 52342 to 52350

Symptom: hayba_check_ue_status says the editor is not connected, or the agent edits a different editor than the one you are watching.

The plugin listens on port 52342. If that port is taken, usually by a second editor, it tries 52343, 52344 and so on up to 52350, and writes the port it chose to <YourProject>/Saved/HaybaMCP/instances/<pid>.json. The server finds that file by searching upward from its own working directory. If it finds none, it uses 52342.

  1. Check the editor's Output Log for LogHaybaMCP: TCP server started on port. If it says no free port in 52342-52350, close other editors or whatever holds those ports.
  2. Start your MCP client from the project folder, so the server can find the instance file.
  3. Or pin the port in your client config with the UE_TCP_PORT environment variable:
claude_desktop_config.json
{
  "mcpServers": {
    "hayba-toolkit": {
      "command": "node",
      "args": ["C:\\dev\\hayba\\mcp-tools\\hayba-mcp\\dist\\index.js"],
      "env": { "UE_TCP_PORT": "52343" }
    }
  }
}

The server reconnects if the editor restarts, and looks up the port again each time. The plugin accepts up to 16 client connections at once.

Plugin does not load

Symptom: Unreal says the HaybaMCPToolkit module is missing or was built with a different engine version, or the Hayba tab is not in the Tools menu.

Hayba ships as C++ source. Its binaries must be compiled for the exact engine version that opens the project. Binaries built for Unreal Engine 5.8 do not load in 5.7, and the other way round. The plugin descriptor does not pin an engine version, so it is the build, not the descriptor, that has to match.

  1. Close the editor.
  2. Right-click the .uproject file, choose Switch Unreal Engine version if needed, then Generate Visual Studio project files.
  3. Build the Development Editor configuration in Visual Studio and read the first error in the build output if it fails.

Most development and testing happens on 5.8. If the plugin fails to compile on 5.7, open an issue with the first compiler error and your exact engine version.

Other causes:

Node.js not found

Symptom: your MCP client cannot start the server, or the in-editor chat cannot send and the Output Log shows Node.js not found.

Stale build after an update

Symptom: after git pull, tools are missing, behave as before, or a tool the docs describe returns unknown_tool.

Your client runs the compiled server in dist/, not the TypeScript source. Pulling new source changes nothing until you rebuild:

Terminal
npm install
npm --prefix mcp-tools/hayba-mcp run build:server
  1. Restart the server in your client. In Claude Code, run /mcp and reconnect, or restart the session.
  2. Restart the in-editor chat's server too. The plugin reuses whatever already listens on port 7821, so close the editor and end any leftover node.exe for Hayba before you reopen it.
  3. If the plugin's C++ changed, close the editor and rebuild the project. A running editor keeps the old plugin loaded.

hayba_check_ue_status reports the plugin version, and the server prints its own version when it starts. They should match.

Live Coding and class layout

Symptom: the editor crashes with an access violation soon after a Live Coding compile.

Live Coding patches function bodies in a running editor. It cannot safely change a class's layout: adding or removing members, changing a UPROPERTY or UFUNCTION, or changing virtual functions. Patching such a change in leaves old objects with the old layout, and the editor crashes when it touches them.

Live Coding errors are written to %LOCALAPPDATA%\UnrealBuildTool\Log.txt, not to the editor's Output Log.

Editor busy or timeouts

Symptom: calls fail with Timeout waiting for response, or everything slows to a crawl.

All editor work runs on the game thread, a few commands per frame. Anything that holds the game thread holds every command behind it. The server gives up on a reply after 30 seconds by default. Common causes:

editor_get_state shows Live Coding, shader and save activity, builds in progress and editor health in one call.

Refused commands

A refused command did not run. The code says why.

CodeMeaning and fix
plan_mode_requiredPlan Mode is holding it. Approve the card in the toolkit's Agent view, then the agent retries. See Plan Mode.
exact_approval_unavailablePlan Mode is on and this command cannot be approved on this version. Turn Review each external edit off for creation work.
pie_activePlay-In-Editor is running. Stop it, then retry.
pie_blockedA loaded Blueprint would open a compile-error dialog. Fix and compile the Blueprints it names.
lease_conflict, owner_requiredAnother agent holds the resource, or several agents are connected and this one sent no name. See Leases.
asset_busyAnother agent is building that asset. Wait, or work on something else.
editor_unsafe_restart_requiredA native fault was caught earlier. Save what you can and restart the editor.
package_read_onlyThe file is read-only, often because source control has not checked it out. Check it out and retry.
unknown_toolNo tool has that name. Check spelling with hayba_search_tools, or see Stale build.

Logs

WhatWhere
Plugin messagesThe editor's Output Log, category LogHaybaMCP. Also in <YourProject>/Saved/Logs/<YourProject>.log.
Every command the plugin ran<YourProject>/Saved/hayba-execution.log, while the execution journal is on.
MCP serverStandard error, collected by your client. Claude Desktop writes it to %APPDATA%\Claude\logs\mcp-server-hayba-toolkit.log. In Claude Code, run claude --debug. Cursor and VS Code show it in their MCP output panels.
Live Coding and builds%LOCALAPPDATA%\UnrealBuildTool\Log.txt
Which editor is on which port<YourProject>/Saved/HaybaMCP/instances/

The server and the plugin redact secrets, such as API keys and tokens, before they log tool results. Check a log yourself before you share it.