Files
Martin Vogel 7cdda21ef4 fix(mcp): never let a client-path startup failure die silently (#1582)
@gotspatel's Claude Desktop log showed the entire failure as:

    Server transport closed unexpectedly, this is likely due to the process
    exiting early

for what was a specific, nameable refusal. v0.10.3 added a JSON-RPC error for
bootstrap failures (#1539), but every EARLIER exit on the client path still
wrote to stderr only — and no MCP client surfaces stderr. So the guarantee "a
server that cannot start always says why" held for exactly one failure mode.

The worst of them was the endpoint-creation exit, which is precisely where an
ownership or ancestry refusal lands: the very failure most likely to stop a
fresh install was the one that said nothing at all.

Client-path exits now report through the same path as bootstrap failures, and
the endpoint failure carries the validation detail — so instead of a closed
transport the client receives the directory and the rule that refused it.

The reporter was extracted rather than duplicated (main_report_client_failure),
so a future exit added on this path gets the behaviour by calling one function
instead of remembering to hand-roll a JSON-RPC frame.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-08-13 14:35:06 +02:00
..