Skip to content

Split MCP connection modules#19725

Merged
aibrahim-oai merged 6 commits intomainfrom
split-mcp-modules
Apr 26, 2026
Merged

Split MCP connection modules#19725
aibrahim-oai merged 6 commits intomainfrom
split-mcp-modules

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

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

Why

The MCP connection manager module had grown to mix orchestration, RMCP client startup, elicitation handling, Codex Apps cache and naming behavior, tool qualification and filtering, and runtime data. The previous stacked PRs split these responsibilities incrementally; this PR collapses that work into one self-contained refactor on latest main.

What changed

  • Move McpConnectionManager into connection_manager.rs.
  • Move RMCP client lifecycle, startup, and uncached tool listing into rmcp_client.rs.
  • Move elicitation request tracking and policy handling into elicitation.rs.
  • Move Codex Apps cache, key, filtering, and naming helpers into codex_apps.rs.
  • Rename the tool-name helper module to tools.rs and move ToolInfo, tool filtering, schema masking, and qualification there.
  • Move runtime and sandbox shared types into runtime.rs.
  • Preserve latest main PermissionProfile-based MCP elicitation auto-approval behavior.

Verification

  • just fmt
  • cargo check -p codex-mcp
  • cargo check -p codex-mcp --tests
  • cargo check -p codex-core

Split the former MCP connection manager module into focused modules for manager orchestration, RMCP client startup, elicitation handling, Codex Apps support, tool helpers, and runtime support.

Preserve latest main's PermissionProfile-based MCP elicitation approval behavior while applying the module split.

Co-authored-by: Codex <noreply@openai.com>
aibrahim-oai and others added 2 commits April 27, 2026 01:33
Rename the split codex-mcp modules so filenames include the MCP responsibility they own, such as mcp_connection_manager.rs, rmcp_client.rs, mcp_elicitation.rs, codex_apps.rs, mcp_tools.rs, and mcp_runtime.rs.

Co-authored-by: Codex <noreply@openai.com>
Add module-level docs explaining the ownership boundary of each split codex-mcp module.

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this

Rename split codex-mcp modules to drop redundant mcp_ prefixes while keeping rmcp_client.rs specific to the RMCP client layer.

Co-authored-by: Codex <noreply@openai.com>
aibrahim-oai and others added 2 commits April 27, 2026 01:43
Order moved module items by visibility and primary entry points so public APIs come before supporting helpers.

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai enabled auto-merge (squash) April 26, 2026 23:04
@aibrahim-oai aibrahim-oai merged commit 0bda816 into main Apr 26, 2026
25 checks passed
@aibrahim-oai aibrahim-oai deleted the split-mcp-modules branch April 26, 2026 23:23
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 26, 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