Repository navigation
ed-mcp: skip the child-process transport on tvOS - #37
Conversation
tvOS has no exec, so rmcp's transport-child-process feature pulls in nix, which does not compile there. Move that feature into a cfg(not(target_os = "tvos")) dependency and gate the stdio transport arm the same way. On tvOS a stdio MCP server now fails with a plain message instead of the crate refusing to build. cargo +nightly rustc -Z build-std -p ed-mcp --target aarch64-apple-tvos now compiles; the HTTP transport and the rest of the workspace are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.6.9 <noreply@sigit.si>
There was a problem hiding this comment.
This change disables the transport-child-process feature of the rmcp dependency on tvOS by moving it under a cfg(not(target_os = "tvos")) dependency section in Cargo.toml. In the Rust code, it conditionally compiles the TokioChildProcess transport only for non-tvOS targets and returns a clear error on tvOS when attempting to use the stdio transport, which requires spawning a child process. The HTTP transport remains unaffected. This fixes build failures on tvOS due to missing exec support and the nix crate dependency.
Automated review by siGit Code Review · commit 8e12a74 · see the review dashboard
Address siGit Code Review feedback on PR #37: callers building an MCP client on tvOS see Transport::Stdio as a regular variant and only learn that the OS forbids child processes when the runtime errors out. Surface that in the rustdoc so the limitation is discoverable before shipping. - Transport::Stdio: note that tvOS cannot spawn child processes and point at Transport::Http as the supported alternative. - Connection::connect / connect_with: add # Errors sections calling out the tvOS-specific failure and the per-stage timeout for spawn, handshake and tools/list on every platform. Co-Authored-By: siGit Code v1.6.8-acp <noreply@sigit.si>
There was a problem hiding this comment.
This change gates the rmcp dependency with the transport-child-process feature behind a cfg(not(target_os = "tvos")) in Cargo.toml, preventing it from compiling on tvOS where exec is unavailable. In the Rust code, it conditionally imports and uses the child-process transport only on non-tvOS targets. On tvOS, attempts to use the Transport::Stdio variant return a runtime error explaining that MCP servers as child processes are unsupported. The HTTP transport remains unaffected and functional on all platforms. Documentation comments were added to clarify this platform limitation and the expected runtime error on tvOS.
Automated review by siGit Code Review · commit 5e97a83 · see the review dashboard
Address siGit Code Review feedback on PR #37: callers building an MCP client on tvOS see Transport::Stdio as a regular variant and only learn that the OS forbids child processes when the runtime errors out. Surface that in the rustdoc so the limitation is discoverable before shipping. - Transport::Stdio: note that tvOS cannot spawn child processes and point at Transport::Http as the supported alternative. - Connection::connect / connect_with: add # Errors sections calling out the tvOS-specific failure and the per-stage timeout for spawn, handshake and tools/list on every platform. Co-Authored-By: siGit Code v1.6.8-acp <noreply@sigit.si>
What
tvOS has no
exec, sormcp'stransport-child-processfeature pulls innix, which does not compile foraarch64-apple-tvos. This moves that feature into acfg(not(target_os = "tvos"))dependency and gates the stdio-transport match arm the same way. On tvOS a stdio MCP server now returns a plain error ("this platform can't run MCP servers as processes") instead of the crate failing to build.The HTTP (streamable) transport is untouched and still works on every platform.
Why
The native KaroKowe apps on Apple TV embed the agent through a UniFFI bridge that links
ed-mcp. Building it for tvOS failed at thenix/process-wraplayer. Gating the child-process transport off there is the smallest fix that keeps the stdio transport everywhere else.Testing
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspacecargo +nightly check -Z build-std -p ed-mcp --target aarch64-apple-tvos(this is what used to fail; it now compiles)