feat: allow sharing MCP servers with users and groups - #28593
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f4a1ed40e
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82b68dc909
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff0a96b0cd
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Documentation CheckUpdates Needed
Automated review via Coder Agents |
# Conflicts: # site/src/pages/AISettingsPage/ModelsPage/components/ChatModelSharingDialog.tsx
|
@codex review
|
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
ethanndickson
left a comment
There was a problem hiding this comment.
docs will need updating, and make sure to do the UI rename mentioned above, but otherwise 👍
ethanndickson
left a comment
There was a problem hiding this comment.
oh also since this is a PR to main, dont forget to change the /experimental/ to /v2/.
Maybe stack it on top of my PR #28542 ?
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
Summary
Adds the missing user-facing half of MCP server config ACLs: admins can now share an MCP server with individual users and groups from the UI, backed by a new permission-safe candidate-discovery endpoint.
Problem
The MCP server config ACL backend already existed (share RBAC action, hydrated
GET .../acl, sparsePATCH .../acl), but there was no frontend for it. There was also no way to populate a sharing autocomplete without the generic organization member/group APIs, which requireorganization_member:readandgroup:readand would wrongly couple MCP sharing to the workspace-sharing mode (the same bug fixed for chat models in #28542).Changes
Backend:
GET /api/v2/organizations/{organization}/mcp-servers/{mcpserverconfig}/acl/availablereturningcodersdk.ACLAvailable; because this API is new, it is not mounted under the experimental compatibility prefix. Gated onActionSharefor the specific server config; performs bounded org-scoped member/group lookups viadbauthz.AsSystemRestricted; excludes system users; supportsq,limit,offset, andafter_idwith template/chat-model autocomplete semantics.none,service_accounts,everyone).Frontend:
shareMCPServerConfigpermission plumbing; the MCP servers list, details page, and AI settings sidebar now admit share-only users (share does not require update; share-only users cannot edit the server form).GET .../aclresponse, adds/removals are saved as sparsePATCHdeltas ("read"/"")./acl/availableendpoint; the sharing flow never calls the generic org member/group APIs (Storybook enforces this by rejecting those API spies). A discovery error surfaces under the autocomplete without hiding existing grants.Dogfood UAT ran remotely against a dev instance and passed, including verifying via the network log that candidate discovery only hits
/acl/available. The share-only custom role UI flow could not be exercised there (no premium license on the dev instance); it is covered by the backend permission-matrix tests.