Skip to content

[6/8] Wire remote MCP stdio through executor#18089

Merged
aibrahim-oai merged 1 commit intodev/remote-mcp-executor-stdiofrom
dev/remote-mcp-stdio
Apr 16, 2026
Merged

[6/8] Wire remote MCP stdio through executor#18089
aibrahim-oai merged 1 commit intodev/remote-mcp-executor-stdiofrom
dev/remote-mcp-stdio

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

@aibrahim-oai aibrahim-oai commented Apr 16, 2026

Summary

  • Use the MCP server environment setting to choose local or executor stdio at client startup.
  • Keep remote streamable HTTP unsupported until the low-level network API lands.

Stack

o  #18027 [8/8] Fail exec client operations after disconnect
│
o  #18025 [7/8] Cover MCP stdio tests with executor placement
│
@  #18089 [6/8] Wire remote MCP stdio through executor
│
o  #18088 [5/8] Add executor process transport for MCP stdio
│
o  #18087 [4/8] Abstract MCP stdio server launching
│
o  #18020 [3/8] Add pushed exec process events
│
o  #18086 [2/8] Support piped stdin in exec process API
│
o  #18085 [1/8] Add MCP server environment config
│
o  main

@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from f6e61df to f11cc84 Compare April 16, 2026 06:20
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch 2 times, most recently from e2510f7 to 912b400 Compare April 16, 2026 13:55
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch 2 times, most recently from aad254a to ad686d6 Compare April 16, 2026 13:59
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from 912b400 to 7e94d1f Compare April 16, 2026 13:59
aibrahim-oai added a commit that referenced this pull request Apr 16, 2026
## Summary
- Add an MCP server environment setting with local as the default.
- Thread the default through config serialization, schema generation,
and existing config fixtures.

## Stack
```text
o  #18027 [8/8] Fail exec client operations after disconnect
│
o  #18025 [7/8] Cover MCP stdio tests with executor placement
│
o  #18089 [6/8] Wire remote MCP stdio through executor
│
o  #18088 [5/8] Add executor process transport for MCP stdio
│
o  #18087 [4/8] Abstract MCP stdio server launching
│
o  #18020 [3/8] Add pushed exec process events
│
o  #18086 [2/8] Support piped stdin in exec process API
│
@  #18085 [1/8] Add MCP server environment config
│
o  main
```

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from ad686d6 to ceffe05 Compare April 16, 2026 15:56
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from 7e94d1f to 2f30ec1 Compare April 16, 2026 15:56
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f30ec11dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/codex-mcp/src/mcp/mod.rs Outdated
submit_id,
tx_event,
SandboxPolicy::new_read_only_policy(),
None,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Pass executor environment into snapshot MCP startup

collect_mcp_snapshot_with_detail creates McpConnectionManager with environment=None. In this commit, make_rmcp_client now rejects stdio servers with experimental_environment="remote" when no executor environment is present, so remote MCP servers never initialize in snapshot/status flows and callers only get empty/cached tools. Thread the active Environment into this startup path.

Useful? React with 👍 / 👎.

@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from ceffe05 to 2913392 Compare April 16, 2026 16:13
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from 2f30ec1 to 74ca01c Compare April 16, 2026 16:13
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from 2913392 to 0281bcc Compare April 16, 2026 16:16
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch 2 times, most recently from 87f5c4c to a375ead Compare April 16, 2026 16:22
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from 0281bcc to 1f31311 Compare April 16, 2026 16:22
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from a375ead to 19c53cb Compare April 16, 2026 16:29
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from 1f31311 to 19766ff Compare April 16, 2026 16:29
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from 19c53cb to 2f93c75 Compare April 16, 2026 16:42
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch 2 times, most recently from 62f2369 to bc359fc Compare April 16, 2026 16:43
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch 2 times, most recently from 6ca1f6b to 825a0cb Compare April 16, 2026 16:44
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from bc359fc to 4c9f73c Compare April 16, 2026 16:44
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 825a0cbc39

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// `RmcpClient` always sees a launched MCP stdio server. The
// launcher hides whether that means a local child process or an
// executor process whose stdin/stdout bytes cross the process API.
RmcpClient::new_stdio_client(command_os, args_os, env_os, &env_vars, cwd, launcher)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Resolve relative MCP cwd before remote executor start

When experimental_environment="remote", this path forwards cwd unchanged into RmcpClient::new_stdio_client. ExecutorStdioServerLauncher only falls back to remote_stdio_cwd when cwd is None; a relative cwd (for example "./tools") reaches process/start as-is and is resolved against the exec-server daemon's working dir, not the session cwd. Remote MCP servers can start in the wrong directory or fail to launch.

Useful? React with 👍 / 👎.

aibrahim-oai added a commit that referenced this pull request Apr 16, 2026
## Summary
- Add an explicit stdin mode to process/start.
- Keep normal non-interactive exec stdin closed while allowing
pipe-backed processes.

## Stack
```text
o  #18027 [8/8] Fail exec client operations after disconnect
│
o  #18025 [7/8] Cover MCP stdio tests with executor placement
│
o  #18089 [6/8] Wire remote MCP stdio through executor
│
o  #18088 [5/8] Add executor process transport for MCP stdio
│
o  #18087 [4/8] Abstract MCP stdio server launching
│
o  #18020 [3/8] Add pushed exec process events
│
@  #18086 [2/8] Support piped stdin in exec process API
│
o  #18085 [1/8] Add MCP server environment config
│
o  main
```

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from 825a0cb to a58a26f Compare April 16, 2026 18:21
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from 4c9f73c to 1b53598 Compare April 16, 2026 18:21
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from a58a26f to cfba2ef Compare April 16, 2026 18:32
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from 1b53598 to b04c034 Compare April 16, 2026 18:32
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from cfba2ef to 109a540 Compare April 16, 2026 18:43
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio branch from b04c034 to 97fd5d4 Compare April 16, 2026 18:44
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from 109a540 to 81a3281 Compare April 16, 2026 18:44
Use the MCP server experimental_environment string to choose local stdio or executor-backed stdio at client startup time.

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio branch from 81a3281 to fdfe2ca Compare April 16, 2026 18:52
@aibrahim-oai aibrahim-oai merged commit fdfe2ca into dev/remote-mcp-executor-stdio Apr 16, 2026
24 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/remote-mcp-stdio branch April 16, 2026 21:33
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant