feat(stdio): explain initialize-time EOF startup failure (YTMCP-23) #30
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/ytmcp-23-stdio-startup-diagnostics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When stdio mode is launched with no MCP client owning stdin (e.g. as a systemd service with stdin from /dev/null, or run interactively from a tty), rmcp's serve() returns the opaque
connection closed: initialize requestand the process exits non-zero, which a service manager then restart-loops with no signal about the real cause.Add a pre-flight WARN when stdin is a terminal, and map the initialize-time EOF (rmcp's ServerInitializeError::ConnectionClosed with context "initialize request") to an actionable ERROR before propagating. The diagnostic names the cause (no MCP client on stdin), the fix (let the client launch it, or set YT_MCP_TRANSPORT=http for a service, cross-referencing docs/deployment.md), and notes the token is a red herring because the failure is at the transport handshake before any YouTrack call. The process still exits non-zero so the misconfiguration is not masked. Covered by unit tests for the predicate and diagnostic content.
Fixes #YTMCP-23