Unreal MCP in 5.8 Cause an Unreal Automation Crash Hidden Behind HTTP 502 Code

While running Unreal Automation tests through an MCP integration, the runner returned HTTP 502 and never produced a structured test result.

The actual failure was caused by a wrong Automation test. A test fixture used:

Rows.Add(Rows[0]);

Rows[0] references memory inside the same TArray. If Add reallocates the array, that reference becomes invalid. UE 5.8 detected this container self-reference and triggered an assertion, crashing the Editor.

Because the MCP server runs inside the Unreal Editor process, it also stopped responding after the crash. The external MCP gateway could only report a generic HTTP 502.

This is cause a problem that AI-agent can’t detect the Unreal Editor crash automatically by itself.

When the AI-agent finally noticed the problem, it diagnosed that by checking:

  • the Editor PID and responsiveness;
  • the Automation log;
  • the last test started;
  • the fact that an earlier EMS round-trip test had already passed.

After rebuilding and restarting the Editor, the test completed normally.

The main lesson is that an MCP HTTP 502 may be a secondary symptom of an Editor crash. An external automation supervisor that tracks the Editor process, last test name, crash artifacts, and run status would make this much easier to diagnose.