Skip to content

feat: make built-in MCPs first-class runtime servers#21356

Merged
jif-oai merged 4 commits intomainfrom
jif/rework-builtins-MCPs
May 7, 2026
Merged

feat: make built-in MCPs first-class runtime servers#21356
jif-oai merged 4 commits intomainfrom
jif/rework-builtins-MCPs

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented May 6, 2026

DISCLAIMER

This is experimental and no production service must rely on this

Why

Built-in MCPs are product-owned runtime capabilities, but they were previously flattened into the same config-backed stdio path as user-configured servers. That made them depend on a hidden codex builtin-mcp re-exec path, exposed them through config-oriented CLI flows, and erased distinctions the runtime needs to preserve—most notably whether an MCP call should count as external context for memory-mode pollution.

What changed

  • Model product-owned built-ins separately from config-backed MCP servers via BuiltinMcpServer and EffectiveMcpServer.
  • Launch built-ins in process through a reusable async transport instead of the hidden builtin-mcp stdio subcommand.
  • Keep config-oriented CLI operations such as codex mcp list/get/login/logout scoped to configured servers, while merging built-ins only into the effective runtime server set.
  • Retain server metadata after launch so parallel-tool support and context classification come from the live server set; built-in memories is now classified as local Codex state rather than external context.

Test plan

  • cargo test -p codex-mcp
  • cargo test -p codex-core --test suite builtin_memories_mcp_call_does_not_mark_thread_memory_mode_polluted_when_configured

@jif-oai jif-oai requested a review from a team as a code owner May 6, 2026 14:32
@jif-oai jif-oai changed the title feat: rework built-in MCPs feat: make built-in MCPs first-class runtime servers May 6, 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: e71090ea16

ℹ️ 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/rmcp-client/Cargo.toml
Co-authored-by: Codex <noreply@openai.com>
@jif-oai jif-oai closed this May 6, 2026
@jif-oai jif-oai reopened this May 6, 2026
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 6, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

💡 Codex Review

tokio = { workspace = true, features = ["io-util"] }

P1 Badge Regenerate the Bazel lock for new Rust deps

This commit changes Rust dependencies/features, including adding tokio to codex-builtin-mcps, but does not include the corresponding MODULE.bazel.lock update. Bazel derives crate deps from the lock data, so just bazel-lock-check/Bazel builds can fail or miss this new dependency until just bazel-lock-update is run.

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

@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 6, 2026

Codex is wrong...

@jif-oai jif-oai merged commit b226899 into main May 7, 2026
26 checks passed
@jif-oai jif-oai deleted the jif/rework-builtins-MCPs branch May 7, 2026 08:36
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 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.

2 participants