Skip to content

feat: Support more plugin MCP file shapes.#18780

Merged
xl-openai merged 2 commits intomainfrom
xl/plugins
Apr 21, 2026
Merged

feat: Support more plugin MCP file shapes.#18780
xl-openai merged 2 commits intomainfrom
xl/plugins

Conversation

@xl-openai
Copy link
Copy Markdown
Collaborator

Update core-plugins MCP loading to accept either an mcpServers object or a top-level server map in .mcp.json

@xl-openai xl-openai requested a review from xli-oai April 21, 2026 01:02
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: 146b095f12

ℹ️ 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/core-plugins/src/loader.rs Outdated
Comment on lines +70 to +80
#[serde(deny_unknown_fields)]
struct PluginMcpServersFile {
#[serde(default)]
mcp_servers: HashMap<String, JsonValue>,
}

#[derive(Debug, Deserialize)]
#[serde(untagged)]
enum PluginMcpFile {
McpServersObject(PluginMcpServersFile),
ServerMap(HashMap<String, JsonValue>),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Accept wrapped MCP configs with metadata keys

Remove the strict deny_unknown_fields fallback interaction here. For JSON like { "mcpServers": {...}, "$schema": "..." }, PluginMcpServersFile now fails to deserialize, so untagged parsing falls through to ServerMap. That treats mcpServers as a server name, causing valid nested servers to be dropped during normalization. This regresses compatibility while trying to support more file shapes.

Useful? React with 👍 / 👎.

@xl-openai
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep it up!

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

@xl-openai xl-openai merged commit 6e9e2c2 into main Apr 21, 2026
25 checks passed
@xl-openai xl-openai deleted the xl/plugins branch April 21, 2026 02:42
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 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