Skip to content

[4/4] Honor Streamable HTTP MCP placement#18584

Merged
aibrahim-oai merged 5 commits into
mainfrom
dev/remote-mcp-http-wire-full-ci
Apr 24, 2026
Merged

[4/4] Honor Streamable HTTP MCP placement#18584
aibrahim-oai merged 5 commits into
mainfrom
dev/remote-mcp-http-wire-full-ci

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

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

Why

Streamable HTTP MCP needs to honor the same experimental_environment placement rules as stdio.

Without that, a session running in a remote environment can accidentally route Streamable HTTP servers through the remote runtime even when the server is configured as local. That changes the documented placement behavior and can break localhost or private-network MCP endpoints that are only reachable from the orchestrator.

This PR wires the real codex-mcp startup path so:

  • experimental_environment = "remote" uses the remote HTTP capability
  • experimental_environment = "local" or unset stays local

What

  • Update codex-mcp/src/mcp_connection_manager.rs so Streamable HTTP placement is chosen from experimental_environment, matching the existing stdio pattern.
  • Use ReqwestHttpClient for local Streamable HTTP servers and the selected environment's HttpClient for remote ones.
  • Add remote-aware Streamable HTTP integration coverage in core/tests/suite/rmcp_client.rs for:
    • local round trips
    • remote round trips
    • OAuth-backed round trips
  • Update rmcp-client/src/bin/test_streamable_http_server.rs so the same test server binary works in both local and remote setups, including host-aware OAuth metadata and the resources/tools exercised by the integration tests.

Verification

  • online CI

Stack

  1. [1/4] Add executor HTTP request protocol #18581 protocol
  2. [2/4] Implement executor HTTP request runner #18582 runner
  3. [3/4] Add executor-backed RMCP HTTP client #18583 RMCP client
  4. [4/4] Honor Streamable HTTP MCP placement #18584 manager wiring and integration coverage
@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

aibrahim-oai commented Apr 19, 2026

@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from d2f4117 to f11defd Compare April 19, 2026 18:38
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from fb63260 to d466d81 Compare April 19, 2026 18:38
@aibrahim-oai aibrahim-oai changed the title Wire remote streamable HTTP MCP [4/4] Wire remote streamable HTTP MCP Apr 19, 2026
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: d466d81fd7

ℹ️ 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_connection_manager.rs Outdated
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from f11defd to 48f6619 Compare April 19, 2026 18:48
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from d466d81 to 3f8376a Compare April 19, 2026 18:49
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 48f6619 to c02a707 Compare April 19, 2026 18:57
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from 3f8376a to 3efddf5 Compare April 19, 2026 18:57
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from c02a707 to 4bd6bdf Compare April 19, 2026 19:07
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from 3efddf5 to e523eb5 Compare April 19, 2026 19:07
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 4bd6bdf to 7914b4b Compare April 19, 2026 19:15
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from e523eb5 to eb3a2c3 Compare April 19, 2026 19:15
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 7914b4b to f4d2712 Compare April 19, 2026 19:22
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from eb3a2c3 to d01334e Compare April 19, 2026 19:22
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from f4d2712 to c84554f Compare April 20, 2026 15:46
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from d01334e to c5abe6b Compare April 20, 2026 15:46
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from c84554f to cedd12a Compare April 20, 2026 15:52
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from c5abe6b to 20d9837 Compare April 20, 2026 15:52
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from cedd12a to 6c3949a Compare April 20, 2026 16:02
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from 20d9837 to 42d9202 Compare April 20, 2026 16:02
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 6c3949a to abc0092 Compare April 20, 2026 16:11
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from 42d9202 to aa47f19 Compare April 20, 2026 16:11
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from abc0092 to 5af5bf4 Compare April 20, 2026 17:24
@aibrahim-oai aibrahim-oai requested a review from a team as a code owner April 20, 2026 17:24
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from aa47f19 to 648f5b5 Compare April 20, 2026 17:24
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 5af5bf4 to 1134f26 Compare April 20, 2026 17:32
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from ff5e665 to ed7097f Compare April 21, 2026 00:27
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from cc6877e to f3c23be Compare April 21, 2026 00:27
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from ed7097f to 030a2e9 Compare April 21, 2026 00:36
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from f3c23be to 2c8faef Compare April 21, 2026 00:36
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 030a2e9 to 22aa3a9 Compare April 21, 2026 00:41
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from 2c8faef to 65fca0b Compare April 21, 2026 00:41
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 22aa3a9 to 0e73215 Compare April 21, 2026 01:12
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from 65fca0b to 4417ed7 Compare April 21, 2026 01:12
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 0e73215 to 561c8ee Compare April 21, 2026 01:14
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-wire-full-ci branch from 4417ed7 to 90e0e87 Compare April 21, 2026 01:14
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-http-client-full-ci branch from 561c8ee to e954a84 Compare April 21, 2026 01:18
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: 5fab4399d6

ℹ️ 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_connection_manager.rs Outdated
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: a6e52411ed

ℹ️ 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_connection_manager.rs Outdated
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: 1943cc1e89

ℹ️ 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_connection_manager.rs Outdated
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: 3888b706a0

ℹ️ 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_connection_manager.rs Outdated
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: a63c26fde6

ℹ️ 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_connection_manager.rs Outdated
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: 317c16996b

ℹ️ 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/deny.toml Outdated
Comment thread codex-rs/codex-mcp/src/mcp_connection_manager.rs Outdated
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: e31518b0e5

ℹ️ 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_connection_manager.rs Outdated
Comment thread codex-rs/deny.toml Outdated
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: 81beb79be5

ℹ️ 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_connection_manager.rs Outdated
Comment thread codex-rs/deny.toml Outdated
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

let client = RmcpClient::new_remote_streamable_http_client(
"test-streamable-http-remote",
&format!("{base_url}/mcp"),
Some("test-bearer".to_string()),
/*http_headers*/ None,
/*env_http_headers*/ None,
OAuthCredentialsStoreMode::File,
exec_client,

P1 Badge Pass lazy exec client to remote RMCP test helper

RmcpClient::new_remote_streamable_http_client now expects LazyRemoteExecServerClient, but this helper still forwards an ExecServerClient. That type mismatch breaks compilation of the rmcp-client remote Streamable HTTP integration tests.

ℹ️ 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/core/tests/suite/rmcp_client/streamable_http_tests.rs Outdated
Comment thread codex-rs/core/tests/suite/rmcp_client/streamable_http_tests.rs Outdated
Comment thread codex-rs/exec-server/src/environment.rs Outdated
Comment thread codex-rs/exec-server/src/environment.rs Outdated
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: 7321774d0f

ℹ️ 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_connection_manager.rs Outdated
aibrahim-oai and others added 3 commits April 22, 2026 17:41
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ 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".

Co-authored-by: Codex <noreply@openai.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants