Skip to content

ed-mcp: skip the child-process transport on tvOS - #37

Merged
setoelkahfi merged 2 commits into
developmentfrom
feature/ed-mcp-tvos-no-child-process
Oct 14, 2026
Merged

setoelkahfi merged 2 commits into
developmentfrom
feature/ed-mcp-tvos-no-child-process

Conversation

@setoelkahfi

Copy link
Copy Markdown
Collaborator

What

tvOS has no exec, so rmcp's transport-child-process feature pulls in nix, which does not compile for aarch64-apple-tvos. This moves that feature into a cfg(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 the nix/process-wrap layer. Gating the child-process transport off there is the smallest fix that keeps the stdio transport everywhere else.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo test --locked --workspace
  • cargo +nightly check -Z build-std -p ed-mcp --target aarch64-apple-tvos (this is what used to fail; it now compiles)

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>
@setoelkahfi setoelkahfi self-assigned this Oct 14, 2026
@setoelkahfi
setoelkahfi requested a review from paydii October 14, 2026 20:21

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread crates/ed-mcp/src/lib.rs
paydii

This comment was marked as duplicate.

@paydii paydii left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks goot to me

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>

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good.

@setoelkahfi
setoelkahfi requested a review from paydii October 14, 2026 20:41
@setoelkahfi
setoelkahfi merged commit 5ae12c4 into development Oct 14, 2026
1 check passed
@setoelkahfi
setoelkahfi deleted the feature/ed-mcp-tvos-no-child-process branch October 14, 2026 21:01
setoelkahfi added a commit that referenced this pull request Oct 16, 2026
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>
setoelkahfi added a commit that referenced this pull request Oct 16, 2026
Bump the workspace to 1.3.1. No source changes since 1.3.0; the only
commit on development since 503bbd8 is 5ae12c4, which merged
PR #37 (feature/ed-mcp-tvos-no-child-process) and gated the stdio
MCP transport on tvOS in ed-mcp.

Co-Authored-By: siGit Code v1.6.8-acp <noreply@sigit.si>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants