Skip to content

Resolve MCP server registrations through a catalog#27634

Merged
jif-oai merged 3 commits into
mainfrom
jif/mcp-resolved-catalog
Jun 11, 2026
Merged

Resolve MCP server registrations through a catalog#27634
jif-oai merged 3 commits into
mainfrom
jif/mcp-resolved-catalog

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Why

MCP servers currently come from user config, local plugins, compatibility Apps synthesis, and host extensions. Those sources were composed by mutating a shared map, leaving registration identity, precedence, removal, and provenance implicit in assembly order.

Before adding executor-owned MCPs, Codex needs one durable resolution boundary above McpConnectionManager. This PR introduces that boundary while preserving current server configuration, policy, and runtime behavior. Executor-scoped registrations and explicit policy layers remain follow-ups.

What changed

  • Add typed McpServerRegistration inputs and an immutable ResolvedMcpCatalog in codex-mcp.
  • Retain each registration's complete McpServerConfig, including its environment binding, while recording its source and provenance.
  • Preserve the existing structural precedence between plugin, config, compatibility, and ordered extension sources.
  • Resolve equal-precedence actions by contribution order; provenance IDs are used only for diagnostics and cannot affect the winner.
  • Preserve extension removals and the existing name-scoped enabled = false veto.
  • Report same-tier conflicts with every contender and the final catalog outcome, including whether the winning action registers or removes the server.
  • Require MCP contributors to provide a stable diagnostic identity.
  • Derive materialized server maps and plugin ownership from the resolved catalog.

McpConnectionManager, transport startup, tool calls, and resource routing continue to consume the same effective McpServerConfig values.

Scope

This PR does not add new MCP capabilities or change user-visible behavior. It does not add executor plugin discovery, thread-scoped registrations, dynamic refresh generations, or new user/managed policy semantics.

Verification

  • Added focused catalog coverage for source precedence, complete configuration preservation, disabled vetoes, plugin ownership, contribution-order tie breaking, removal outcomes, and conflict diagnostics.
  • Extended hosted Apps coverage for ordered extension removal and Apps-disabled hosts with and without the hosted extension installed.
  • cargo check -p codex-mcp --tests -p codex-extension-api -p codex-core

@jif-oai jif-oai changed the title [codex] Resolve MCP server registrations through a catalog Resolve MCP server registrations through a catalog Jun 11, 2026
@jif-oai jif-oai marked this pull request as ready for review June 11, 2026 16:31
@jif-oai jif-oai requested a review from a team as a code owner June 11, 2026 16:31
@jif-oai jif-oai merged commit 4a5a676 into main Jun 11, 2026
30 checks passed
@jif-oai jif-oai deleted the jif/mcp-resolved-catalog branch June 11, 2026 19:54
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 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