Skip to content

scient: load installed Codex plugins' skills and MCP servers - #79

Open
yaacovcorcos wants to merge 4 commits into
mainfrom
claude/codex-plugins-20261121
Open

yaacovcorcos wants to merge 4 commits into
mainfrom
claude/codex-plugins-20261121

Conversation

@yaacovcorcos

Copy link
Copy Markdown
Contributor

Scient Agent now loads the skills and MCP servers of plugins installed and enabled in Codex, so a plugin added to Codex also works in Scient Agent.

  • New discovery source codex-plugins. It reads $CODEX_HOME/config.toml [plugins."<name>@<marketplace>"] and uses the same package version Codex runs from plugins/cache. Skills go through the existing skill reader and MCP servers through the existing Codex MCP mapping (env_vars, bearer_token_env_var, timeouts, package-relative command/cwd). Servers are named <plugin>:<server>.
  • It is opt-in through SCIENT_AGENT_ENABLE_SOURCES=codex-plugins or enabledProviders. --runtime-info lists it under enableSources so a host can check for it.
  • Left out: plugins that need OpenAI's host (browser, chrome, computer-use, unified-computer-use, codex-app-tools), servers launched by computer-use-client-launcher (Messages) or with auth: "chatgpt", .app.json app references (the ChatGPT-apps route already covers them), and hooks.
  • Ledger entry: SA-CODEX-PLUGINS.

Tests: the new codex-plugins tests plus the affected discovery, runtime-info and claude-plugins tests (52) pass. Typecheck, oxlint, oxfmt and the divergence check are clean. No plugin MCP server was started in testing.

Desktop side: ScientFactory/scient-desktop#1061 sets the source and shows Codex plugins as working with Scient Agent when the agent supports it.

Scient Agent reads the plugins Codex has installed and enabled ($CODEX_HOME/config.toml,
the version Codex runs from plugins/cache) and loads their skills and MCP servers through
the existing skill reader and Codex MCP mapping. The source is `codex-plugins`, opt-in through
SCIENT_AGENT_ENABLE_SOURCES or enabledProviders, and --runtime-info lists it under
enableSources so a host can check before enabling it. Plugins that need OpenAI's host
(browser, chrome, computer-use, unified-computer-use, codex-app-tools), servers launched by
computer-use-client-launcher or with auth "chatgpt", app references and hooks are left out.

Scient-Divergence: SA-CODEX-PLUGINS
…er skips alone

- A server whose plugin entry or config.toml policy sets enabled_tools (or a non-empty
  disabled_tools) is skipped with a warning: Scient Agent cannot enforce Codex's tool filters.
- Fields the mapper iterates are validated per server; a malformed server is skipped with a
  warning and its siblings still load.
@yaacovcorcos

Copy link
Copy Markdown
Contributor Author

0af9eab fixes two findings from a holistic Codex review:

  • A Codex plugin MCP server is no longer imported with more tools than Codex allows. A server whose .mcp.json entry or [plugins."<id>".mcp_servers.<name>] policy sets enabled_tools (or a non-empty disabled_tools) is skipped with a warning, because Scient Agent's MCP servers have no tool filter.
  • A malformed server is skipped with a warning, and its siblings still load. Before, it rejected the whole source.

New tests cover both. Desktop (ScientFactory/scient-desktop#1061) also now honors disabledProviders containing codex-plugins.

Codex review of 0af9eab:
- CODEX_HOME and header credentials come from the launch environment, never a project's .env.
- Stdio servers inherit only Codex's variable list plus their env_vars (MCPServer.envInherit),
  not the agent's whole environment; env values are literal, headers literal and origin-locked.
- [plugins._default] and /etc/codex/config.toml apply; nothing loads under an organization policy.
- Package files, cwd and relative commands must stay inside the symlink-resolved package.
- One transport per server with only its Codex fields; OAuth client settings, scopes and
  oauth_resource map; http_headers_helper and auth other than oauth are skipped.
- Same-named plugins from two marketplaces are named <plugin>.<marketplace>.
- Codex's manifest precedence: root Agent Plugins plugin.json, then .codex-, .claude-, .cursor-plugin.
- The plugin mapper no longer borrows the codex provider's config.toml mapper.
…ment and server rules

Second Codex review of 4d90a48:
- getLaunchEnv() (utils env.ts) drops every value the startup .env files define, whichever folder
  the agent works in now; CODEX_HOME, header credentials and servers' variables come from it.
- A stdio server's env is built as Codex builds it (variable list, absolute CA bundles, env_vars,
  literal env, minus Codex's non-inheritable names) and it inherits nothing else.
- System config merges at every depth; Windows system config and Group Policy RequirementsPath.
- Each skill and each legacy manifest's folder must stay in the package; a linked folder rejects.
- A declaration's enabled = false and a policy's auth = "ema_auth" disable a server.
- Mistyped command/url rejected; Agent Plugins mcp.json must be a regular file, sse is left out,
  and the legacy declaration's env_vars overlay applies.
- Same-named plugins are qualified <plugin>:<marketplace>, which no plugin name can collide with.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant