# The Godot MCP server installs cleanly. Then every run_project call fails on a headless box

> Source: <https://dev.to/anclum/the-godot-mcp-server-installs-cleanly-then-every-runproject-call-fails-on-a-headless-box-2kk>
> Published: 2026-11-25 09:06:44+00:00

**Recommendation:** When an MCP tool reports success but its follow-up returns nothing, check the command the server actually builds and wrap the binary to add missing flags like --display-driver headless.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

You add the server the way its README says:

```
claude mcp add godot \
  -e GODOT_PATH=/usr/local/bin/godot \
  -- npx @coding-solo/godot-mcp
```

`tools/list` comes back with 14 tools. `run_project` answers like it worked:

```
Godot project started in debug mode. Use get_debug_output to see output.
```

Then `get_debug_output` answers, every single time:

```
No active Godot process.
```

No stack trace, no stderr, nothing in the client log. The project never started, and nothing in the response says why.

Its troubleshooting section has four entries: *Godot Not Found*, *Connection Issues*, *Invalid Project Path*, *Build Issues*. None of them is "the engine started and died". The word `headless` appears zero times in the README (I re-fetched `main` today to be sure). So the reasonable thing is to go check your own setup first.

Check the binary before you suspect the MCP layer:

```
./godot-headless --version
4.7.2.stable.official.ed1daf0bf
```

The engine runs. The MCP server answers `tools/list`, so Node and the client config are fine. What's left is the hand-off between the two.

In `index.js`, `handleRunProject` builds the command like this:

``` js
const cmdArgs = ['-d', '--path', args.projectPath];
```

No `--headless`. `-d` is debug mode, and debug mode wants a display. On a box with no display server the engine exits on startup, `handleGetDebugOutput` finds no active process, and returns that string. The message is accurate — there really is no process. It just doesn't tell you why there isn't one.

`GODOT_PATH` at a wrapper, not at the binary

``` bash
#!/bin/sh
# /opt/godot/godot-headless
exec /opt/godot/Godot_v4.7.2-stable_linux.x86_64 --display-driver headless "$@"
```

`chmod +x` it, then restart the MCP client with `GODOT_PATH` pointing at the wrapper. The server still sends `-d --path …`; the wrapper adds the display driver before `exec`. Client config, for reference:

```
{
  "mcpServers": {
    "godot": {
      "command": "npx",
      "args": ["@coding-solo/godot-mcp"],
      "env": { "GODOT_PATH": "/opt/godot/godot-headless" }
    }
  }
}
```

The trade you are making: every Godot invocation from that client is now headless, including editor launches. On a server or CI box that is the right trade. On your laptop it is the wrong one, and you probably never need the wrapper at all.

Same client, same project, one env var different:

`run_project` → `Godot project started in debug mode. Use get_debug_output to see output.` (a 154-byte JSON response)`get_debug_output` → 1,949 bytes. First line: `Godot Engine v4.7.2.stable.official.ed1daf0bf - https://godotengine.org`. Inside the output array, the project's own print: `CD10I_HELLO from cd10i-demo`.`./godot-headless -d --path proj`, exit 0 — prints the same line. That is how you know the MCP path isn't adding or hiding anything.
The demo project is three files: `project.godot` (148 B), `main.tscn` (149 B), `main.gd` (131 B). The whole loop — write project, run, read output — takes minutes, which matters when you are debugging the tool wrapper rather than the game.

`get_debug_output` reads from a live process, and the server clears its active process handle when the project quits by itself. A project that prints one line and calls `get_tree().quit()` gives you a real response if you read at ~3 seconds, and `No active Godot process.` again at 10. Our test project lives about 8 seconds for exactly that reason.

So: read the output while the thing is still running, or make the project wait. A polling loop that retries every 20 seconds will look like the server is broken when it is just late.

If you build a pass/fail check on top of this, prove it can go red before you trust a green:

```
run_project {"projectPath": "/root/nope"}
→ Not a valid Godot project: /root/nope
   isError: true
   Possible solutions: …
```

(The path in that output is whatever you passed — in our first run it was `/root/cd10i/gd_missing`, and the message echoed it back.)

A success check that has never returned false isn't measuring anything. The same applies to the fix above: keep one project path that fails so you can test the harness itself.

`--display-driver` behaviour, and I have no run to show.`4.7.2.stable.official` only. Older versions may not accept the same flags.`@coding-solo/godot-mcp` 0.1.1 — the version current when this was written.
If your machine has a display server, none of this fires. The wrapper is for the box that doesn't.

The four-step version of this, with the exact commands and the copy buttons, is here: [Game development · step by step](https://anclum.com/en/scene/game-dev/).
