Skip to content

Keep same-named MCP servers separate across environments - #60905

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5593372b06a15c16aa3220faa3b19f5d3b20e67e
Nov 11, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5593372b06a15c16aa3220faa3b19f5d3b20e67e

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Keep same-named MCP servers separate across environments

Why

MCP servers discovered on different executors can share a name. Resolving them by name alone exposes only one server and prevents tools and resources from being addressed independently.

What changed

  • Add the disabled-by-default multi_environment_mcp feature to expose environment-scoped servers, including multiple installations of the same plugin.
  • Carry exact McpServerKey identities through catalogs, connections, tool calls, resources, and approval tracking. Give environment-scoped tools stable namespaces derived from their environment.
  • Include environment_id in scoped resource listings and accept it in resource requests. Require it for environment-owned servers when multiple environments are selected.
  • Preserve server ownership through hooks and use the owning environment's permissions for scoped elicitation review.

Testing

Add coverage for same-named servers across environments, independent calls and approvals, resource selection, plugin discovery, and rejection of hook changes to the tool environment.

## Why

MCP servers discovered on different executors can share a name. Resolving them by name alone exposes only one server and prevents tools and resources from being addressed independently.

## What changed

- Add the disabled-by-default `multi_environment_mcp` feature to expose environment-scoped servers, including multiple installations of the same plugin.
- Carry exact `McpServerKey` identities through catalogs, connections, tool calls, resources, and approval tracking. Give environment-scoped tools stable namespaces derived from their environment.
- Include `environment_id` in scoped resource listings and accept it in resource requests. Require it for environment-owned servers when multiple environments are selected.
- Preserve server ownership through hooks and use the owning environment's permissions for scoped elicitation review.

## Testing

Add coverage for same-named servers across environments, independent calls and approvals, resource selection, plugin discovery, and rejection of hook changes to the tool environment.

GitOrigin-RevId: 5593372b06a15c16aa3220faa3b19f5d3b20e67e
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/5593372b06a15c16aa3220faa3b19f5d3b20e67e branch from 8f1ba90 to 561f0f5 Compare November 11, 2026 23:36
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-11T23:36:41.911778Z 8f1ba90 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 561f0f5 into main Nov 11, 2026
9 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/5593372b06a15c16aa3220faa3b19f5d3b20e67e branch November 11, 2026 23:36
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026

This branch was previously deployed

1 inactive deployment
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.

3 participants