diff --git a/README.md b/README.md index a360da7..80ca103 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,25 @@ Waiting does **not** consume the restart budget: a slow dependency costs patience, not retries. This is what stops a Docker-backed server from being marked failed at login while the Docker daemon is still starting. +## Servers that read stdin + +MCP servers are stdio-first by convention, and several that also speak HTTP +still start their stdio transport unconditionally. Under the launchd agent the +daemon's stdin is `/dev/null`, so such a server sees EOF on its first read and +shuts down seconds after binding its port. + +`stdin` picks what the child gets on fd 0: + + stdin "keep-open" + +- `inherit` (default) — the child inherits the daemon's stdin. +- `null` — `/dev/null`; a read sees EOF immediately. +- `keep-open` — a pipe that `xy` holds open for the child's lifetime and never + writes to, so a read blocks instead of seeing EOF. + +Use `keep-open` for a server you want supervised in HTTP mode that insists on +running its stdio transport anyway. + ## Start on login (macOS) xy service install # write the LaunchAgent, load it, start the daemon