Skip to content

[codex] Support object-valued plugin MCP manifests#28580

Merged
charlesgong-openai merged 2 commits into
mainfrom
codex/inline-mcp-manifest
Jun 17, 2026
Merged

[codex] Support object-valued plugin MCP manifests#28580
charlesgong-openai merged 2 commits into
mainfrom
codex/inline-mcp-manifest

Conversation

@charlesgong-openai

@charlesgong-openai charlesgong-openai commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This fixes plugin manifest parsing for MCP servers declared as an object directly in plugin.json.

Before this change, Codex modeled mcpServers as only a string path, for example:

{
  "name": "counter-sample",
  "version": "1.1.1",
  "mcpServers": "./.mcp.json"
}

Some migrated plugins instead provide the server map directly in the manifest:

{
  "name": "counter-sample",
  "version": "1.1.1",
  "description": "Plugin that declares MCP servers in the manifest",
  "mcpServers": {
    "counter": {
      "type": "http",
      "url": "https://sample.example/counter/mcp"
    }
  }
}

That object form previously failed during install/load with an error like:

failed to parse plugin manifest: invalid type: map, expected a string

What changed

  • Add a manifest representation for mcpServers as either Path(Resource) or Object(map).
  • Parse plugin.json mcpServers as either a string path or an object.
  • Route object-valued MCP server maps through the existing plugin MCP config parser instead of adding a second parser.
  • Apply existing per-plugin MCP server policy to object-valued MCP servers the same way as file-backed MCP servers.
  • Include object-valued MCP server names in plugin telemetry/capability metadata.
  • Support object-valued MCP config for executor plugins without requiring a .mcp.json filesystem read.
  • Update the bundled plugin-creator validator and plugin-json-spec.md so generated-plugin validation accepts the same object-valued shape.

Compatibility

Existing plugin manifests that use "mcpServers": "./.mcp.json" continue to work. Plugins can now also use the object shape shown above.

Tests

Added coverage for the new manifest attribute shape at the install, normal load, telemetry, and executor-provider layers:

  • install_accepts_manifest_mcp_server_objects
  • load_plugins_loads_manifest_mcp_server_objects
  • plugin_telemetry_metadata_uses_manifest_mcp_server_objects
  • reads_manifest_object_config_without_executor_file_system_access

Also smoke-tested the plugin-creator validator against both supported forms:

  • mcpServers as a direct object in plugin.json
  • mcpServers as "./.mcp.json" with a companion .mcp.json

Validation

  • just test -p codex-plugin
  • just test -p codex-core-plugins
  • just test -p codex-mcp-extension
  • just bazel-lock-update
  • just bazel-lock-check
  • just fmt
  • git diff --check
  • Focused rename/object-form rerun: just test -p codex-core-plugins manager::tests::load_plugins_loads_manifest_mcp_server_objects manager::tests::plugin_telemetry_metadata_uses_manifest_mcp_server_objects store::tests::install_accepts_manifest_mcp_server_objects
  • Focused executor rerun: just test -p codex-mcp-extension executor_plugin::provider::tests::reads_manifest_object_config_without_executor_file_system_access
  • python3 codex-rs/skills/src/assets/samples/plugin-creator/scripts/validate_plugin.py /private/tmp/codex-validator-object
  • python3 codex-rs/skills/src/assets/samples/plugin-creator/scripts/validate_plugin.py /private/tmp/codex-validator-path

@charlesgong-openai
charlesgong-openai marked this pull request as ready for review June 16, 2026 19:41
@charlesgong-openai
charlesgong-openai marked this pull request as draft June 16, 2026 19:41
@charlesgong-openai
charlesgong-openai force-pushed the codex/inline-mcp-manifest branch from dc89f9d to c65423b Compare June 16, 2026 19:47
@charlesgong-openai charlesgong-openai changed the title [codex] Support inline plugin MCP manifests [codex] Support object-valued plugin MCP manifests Jun 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc89f9dc18

ℹ️ 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/manifest.rs Outdated
@charlesgong-openai
charlesgong-openai marked this pull request as ready for review June 16, 2026 19:56
@charlesgong-openai
charlesgong-openai force-pushed the codex/inline-mcp-manifest branch from c65423b to 36acfc8 Compare June 16, 2026 19:58
@charlesgong-openai
charlesgong-openai marked this pull request as draft June 16, 2026 19:59
@charlesgong-openai
charlesgong-openai marked this pull request as ready for review June 16, 2026 20:01
@charlesgong-openai
charlesgong-openai marked this pull request as draft June 16, 2026 20:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36acfc8d0d

ℹ️ 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/plugin/Cargo.toml Outdated
@charlesgong-openai
charlesgong-openai force-pushed the codex/inline-mcp-manifest branch from 36acfc8 to 24dadcf Compare June 16, 2026 20:19
@charlesgong-openai
charlesgong-openai marked this pull request as ready for review June 16, 2026 20:24
@charlesgong-openai
charlesgong-openai merged commit 1883ded into main Jun 17, 2026
31 checks passed
@charlesgong-openai
charlesgong-openai deleted the codex/inline-mcp-manifest branch June 17, 2026 02:23
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants