Use plugin-service MCP as the hosted plugin runtime - #27198
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2902b0f638
ℹ️ 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".
2902b0f to
27a1e56
Compare
13012c9 to
20b507e
Compare
ed65ea2 to
fa313ba
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19a14a0810
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Stack
jif/external-plugins-2, notmain.Why
#27191 moves the host-owned Apps MCP registration behind an extension contributor, but deliberately preserves the existing endpoint-selection feature while that contribution contract lands. App-server can therefore resolve the server through extensions, yet the hosted plugin endpoint is still selected through temporary
apps_mcp_path_overrideplumbing.That is not the long-term plugin model. A plugin can bundle skills, connectors, MCP servers, and hooks, and those components do not all need the same source or execution environment. In particular, an authenticated HTTP MCP server can expose plugin capabilities directly from a backend without an executor or an orchestrator filesystem.
This PR completes that hosted vertical. App-server's MCP extension now owns the aggregate hosted plugin runtime at
/ps/mcp. Connector actions continue to arrive as MCP tools, while backend-provided skills arrive as MCP resources and use Codex's existing resource list/read paths. No second backend client, skill filesystem, or generic plugin activation framework is introduced.The backend route remains the hosted implementation. This change replaces Codex's temporary endpoint-selection mechanism, not the service behind the endpoint.
What changed
Hosted plugin runtime
The MCP extension now contributes
codex_appsas the hosted plugin runtime rather than as a configurable Apps endpoint:https://chatgpt.comresolves tohttps://chatgpt.com/backend-api/ps/mcp;/api/codex/ps/mcp;The same MCP connection carries both component shapes supported by the hosted endpoint:
list_mcp_resourcesandread_mcp_resourcepaths.This keeps component access in the subsystem that already owns the protocol instead of downloading backend skills into an orchestrator filesystem or inventing a parallel hosted-skill client.
Explicit runtime ordering
McpManagernow resolves the reservedcodex_appsentry in three ordered phases:SetorRemoveoverlays;This ordering is important:
codex_appsname;Removeremains authoritative;The temporary
legacy_apps_mcp_loader_enabledcoordination flag is no longer needed.Remove the path override
The
apps_mcp_path_overridefeature and its runtime plumbing are removed, including:ConfigandMcpConfigfields;codex-mcp.Existing boolean and structured forms still deserialize as ignored compatibility input. They are omitted from new serialized config, and config-lock comparison normalizes the removed input so older locks remain replayable.
App-server coverage
App-server MCP fixtures now serve the hosted route at
/api/codex/ps/mcp. Existing resource-read and tool/elicitation flows therefore exercise the extension-owned endpoint rather than succeeding through the legacy fallback.The stack also adds the missing
codex_chatgpt::connectorsre-export for the manager-backed connector helper introduced in #27191.Compatibility
/ps/mcpfor the hosted runtime.codex_appsfrom the effective runtime view.Architectural fit
The stack now proves two independent runtime shapes:
Together they preserve the intended separation:
Planned follow-ups
Verification
Coverage in this change exercises:
/backend-api/ps/mcpregistration without an executor;SetandRemoveprecedence over the legacy fallback;cargo check -p codex-features -p codex-mcp-extension -p codex-app-serverpasses. Tests and Clippy were not run locally under the current development instruction; CI provides the full validation pass.