fix(app-server): expose remote MCP servers in plugin read#26453
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6600b2eb04
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| && remote_detail | ||
| .release_version | ||
| .as_deref() | ||
| .is_none_or(|version| { | ||
| plugin.local_version.as_deref() == Some(version) | ||
| }) |
There was a problem hiding this comment.
Require a release version before hydrating MCP names
When the remote detail response omits release.version (the deserializer defaults it to None), this is_none_or branch accepts any local curated plugin with the same name, even if the synced bundle is a newer/different version. In that scenario plugin/read can advertise MCP servers that do not belong to the remote plugin version the user is viewing, despite the API docs saying these are hydrated from a same-version bundle.
Useful? React with 👍 / 👎.
| hooks: Vec::new(), | ||
| apps, | ||
| mcp_servers: Vec::new(), | ||
| mcp_servers: detail.mcp_server_names, |
There was a problem hiding this comment.
for consistency should we call it mcp_servers as well?
Why
Remote plugin detail responses include MCP server metadata under
release.mcp_servers, but Codex did not deserialize or propagate that field. As a result,plugin/readalways returned an emptymcpServerslist for remote plugins, so the plugin details pane omitted the MCP Servers section even when the remote plugin declares one.This affects uninstalled plugins as well: the remote detail API is the source of truth and returns MCP server keys without requiring a local plugin bundle.
What changed
RemotePluginDetail.plugin/readinstead of hardcoding an empty list.Test plan
just test -p codex-core-pluginsjust test -p codex-app-server plugin_read