Related Issue
I get the following errors:
⚠ MCP client for avalonia failed to start: MCP startup failed: handshaking with MCP server failed: connection closed: initialize response
⚠ MCP startup incomplete (failed: avalonia)
After a lot of Trial and error me and AI figured out the reason for it was that the logger in AvaloniaUI.MCP vomits logs to STDOUT.
So Codex receives garbage before the JSON handshake.
A fix is to edit:
builder.Logging.AddConsole();
to
builder.Logging.AddConsole(o =>
{
o.LogToStandardErrorThreshold = LogLevel.Trace;
});
Related Issue
I get the following errors:
After a lot of Trial and error me and AI figured out the reason for it was that the logger in AvaloniaUI.MCP vomits logs to STDOUT.
So Codex receives garbage before the JSON handshake.
A fix is to edit:
to