Skip to content

feat(site): add organization picker to MCP server settings pages - #28150

Open
ibetitsmike wants to merge 4 commits into
mike/codagt-806-token-personal-rbacfrom
mike/codagt-714-mcp-org-picker
Open

feat(site): add organization picker to MCP server settings pages#28150
ibetitsmike wants to merge 4 commits into
mike/codagt-806-token-personal-rbacfrom
mike/codagt-714-mcp-org-picker

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Adds an organization picker to the MCP server settings pages so multi-org deployments can manage every organization's MCP servers through the UI, not just the default organization's. Closes CODAGT-714 (scoped to MCP servers only; model configs stay deployment-wide until CODAGT-709 lands).

Stack Context

Top of the CODAGT-711/717/712/806 stack: MCP server configs are org-scoped with RBAC, audit logging, per-config ACLs, and owner-scoped user tokens. This layer makes the admin UI org-aware, resolving the "default org only" limitation documented in the bottom PR.

Summary

  • The MCP servers list and add pages resolve the working organization from an org search param (falling back to the default org), and render an organization picker built on the existing OrganizationAutocomplete. The picker only appears when more than one organization is visible, so single-org deployments see no change.
  • Selecting an organization rewrites the search param, refetches the list for that org, and threads through to the add page so creation posts to the selected organization.
  • The update page now loads the server by ID (new GET /api/experimental/mcp-servers/{id} frontend binding) instead of listing the default org and searching client-side, so servers from any organization can be edited. Post-save navigation returns to the owning organization's list via the server's organization_id.
  • Removes the now-unused getDefaultOrganizationId helper.

Testing

Storybook interaction stories cover: picker hidden with one org, switching orgs refetches and swaps list contents, add posting to the URL-selected org, add posting after an in-form org switch (asserting typed form state survives the switch), and update loading by ID. Red-green verified by breaking the search-param resolution and observing the new stories fail.

Mux acted on Mike's behalf for this PR.

Multi-org deployments could only manage the default organization's MCP
servers through the UI. The list and add pages now carry an organization
picker (shown only when more than one organization is visible) persisted
in an org search param, and the update page loads servers by ID so
servers from any organization can be edited. Single-organization
deployments see no change.
@linear-code

linear-code Bot commented Aug 13, 2026

Copy link
Copy Markdown

CODAGT-714

@ibetitsmike
ibetitsmike marked this pull request as ready for review August 13, 2026 19:38
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown

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: 4c22bcf1ec

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

The form header's back link hardcoded the bare list route, silently
resetting the list to the default organization after a cancel via the
header. Thread the organization-aware list path through the form so
the header link and footer cancel land on the same organization.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown

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: 1ec9ca4540

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

A transient failure loading a server left the detail query dataless, so
the page silently redirected to the default organization's list. Render
the error with a retryable alert and reserve the redirect for a
confirmed 404.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 58a7461b24

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 743da29b38

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

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