feat(stdio): explain initialize-time EOF startup failure (YTMCP-23) #30

Merged
David merged 1 commit from feat/ytmcp-23-stdio-startup-diagnostics into main 2026-06-25 11:46:17 +02:00
Member

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 request and 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

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 request` and 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
feat(stdio): explain initialize-time EOF startup failure (YTMCP-23)
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 23s
Create release / Create release from merged PR (pull_request) Has been skipped
93bae7fe5c
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 request` and 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.

#YTMCP-23
David merged commit 8eac991c97 into main 2026-06-25 11:46:17 +02:00
David deleted branch feat/ytmcp-23-stdio-startup-diagnostics 2026-06-25 11:46:18 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/youtrack-mcp!30
No description provided.