Skip to content

feat(settings): list organization MCP servers in the Agent Profile editors (OHE-3863) - #1123

Merged
hieptl merged 1 commit into
hiep/ohe-3862-org-mcp-organization-mcp-servers-on-the-settings-mcp-pagefrom
hiep/ohe-3863-org-mcp-org-mcp-servers-in-the-personal-and-org-agent
Nov 2, 2026
Merged

hieptl merged 1 commit into
hiep/ohe-3862-org-mcp-organization-mcp-servers-on-the-settings-mcp-pagefrom
hiep/ohe-3863-org-mcp-org-mcp-servers-in-the-personal-and-org-agent

Conversation

@hieptl

@hieptl hieptl commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

OHE-3091 asks that a member can see the organization's MCP servers in a personal Agent Profile and enable or disable them individually, and that an org admin can enable specific organization-managed MCP servers in an organization Agent Profile. Today the personal editor lists only the member's own servers and the org editor hides the MCP section and always saves mcp_server_refs: [], because no organization MCP servers existed. #1121 adds them to the launch map and lets scope=org profiles reference organization-managed listings; this PR lets both editors pick them, behind the enable_org_mcp_servers flag from #1120.

Summary

  • Personal editor: the MCP picker lists the organization's listings after the member's own servers, with the existing Organization badge and the URL as description. "All servers" (null) now means every personal and organization server, matching the launch merge; "Choose servers" can toggle organization entries one by one; dangling references and the first-switch pre-selection include organization names.
  • Org editor: the MCP section renders, listing the organization-managed listings only as toggles with no "All servers" mode (which would mean every launching member's own servers). The save body sends the chosen names ([] when none, as before); when editing, the stored list is kept instead of being forced to [], and a reference to a listing that no longer exists is flagged.
  • The organization section description, the org editor hint and the legacy-profile warning get flag-aware copy (5 i18n keys, 15 locales) that no longer says "no MCP servers".
  • Flag off: the editors, their catalogs and their save bodies are exactly as today.

Issue Number

OHE-3863 (sub-ticket of OHE-3091). Stacked on #1122 (shared API client, query hook and view-model helper) and #1120; the backend rule that accepts organization-managed references is #1121.

How to Test

cd frontend
npx vitest run __tests__/components/features/settings/agent-profiles __tests__/routes/agent-settings.test.tsx __tests__/components/features/settings/profiles-body.test.tsx
npm run lint
npm run check-translation-completeness

42 tests pass (8 new, in the first tests for the Agent Profile editor): the org save body is [] with the flag off and the chosen names with it on while personal profiles keep null / list semantics; the org editor hides the MCP section with the flag off, shows toggles without a mode dropdown with it on, reports an empty organization catalog and a dangling reference; the personal picker badges organization entries.

Manual: VITE_MOCK_SAAS=true VITE_MOCK_ORG_MCP_SERVERS=true npm run dev:mock with the Agent Profiles flags on, open /settings/agents, edit a personal profile (organization entries badged in the MCP picker) and, as an admin, an organization profile (toggles for the organization-managed listing only).

Video/Screenshots

No recording yet; the flows above are covered by the editor tests and the mock setup, and I will add captures from a test install once #1121 is deployed there.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes


Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-aa5c648

…itors (OHE-3863)

Behind enable_org_mcp_servers, both Agent Profile editors see the
organization's MCP server listings:

- The personal editor's MCP picker lists the organization's listings
  after the member's own servers, with the Organization badge. "All
  servers" now means every personal and organization server, as the
  launch merge does; "Choose servers" can toggle organization entries
  individually, and dangling references include organization names.
- The org editor shows the MCP section it used to hide, listing the
  organization-managed listings only as toggles with no "All servers"
  mode (that would mean every launching member's own servers). The
  save body sends the chosen names, [] when none, as before; the
  stored list is kept when editing instead of being forced to [].
- The org section description, the org editor hint and the
  legacy-profile warning no longer say "no MCP servers" once the flag
  is on.

Flag off, the editors and their save bodies are unchanged.
@github-actions github-actions Bot added the type: feat A new feature label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@hieptl
hieptl merged commit aead8b7 into hiep/ohe-3862-org-mcp-organization-mcp-servers-on-the-settings-mcp-page Nov 2, 2026
22 checks passed
@hieptl
hieptl deleted the hiep/ohe-3863-org-mcp-org-mcp-servers-in-the-personal-and-org-agent branch November 2, 2026 13:33
hieptl added a commit that referenced this pull request Nov 2, 2026
…ngs > MCP page (OHE-3862) (#1122)

* feat(settings): show and manage organization MCP servers on the Settings > MCP page (OHE-3862)

Behind enable_org_mcp_servers, the MCP page gains an Organization MCP
servers section below the member's own list, built like the Secrets
page's organization section:

- Organization-managed listings (one shared credential) and
  user-managed listings (each member's own secret) in two groups, with
  a "Managed by organization" / "Your identity" badge.
- A user-managed listing shows whether the member already holds the
  personal secret it references; "Connect" opens the existing secret
  form with that name prefilled and locked, so the server runs under
  the member's own identity once saved.
- Admins and owners (new frontend permission manage_org_mcp) add, edit,
  test and delete listings through a dedicated form: server type,
  name, URL, timeout, who manages it, and None / Bearer / Header
  authentication. An organization-managed token is stored masked and
  kept on save unless the URL changes; a user-managed listing stores
  the personal secret name as ${NAME}.
- The personal server form refuses a name the organization already
  provides, since a member's server of that name would hide the
  organization's at launch.

Flag off, the page is unchanged. API client, query and mutation hooks,
dev-mock handlers (VITE_MOCK_ORG_MCP_SERVERS=true) and 36 i18n keys in
15 locales.

* feat(settings): list organization MCP servers in the Agent Profile editors (OHE-3863) (#1123)

Behind enable_org_mcp_servers, both Agent Profile editors see the
organization's MCP server listings:

- The personal editor's MCP picker lists the organization's listings
  after the member's own servers, with the Organization badge. "All
  servers" now means every personal and organization server, as the
  launch merge does; "Choose servers" can toggle organization entries
  individually, and dangling references include organization names.
- The org editor shows the MCP section it used to hide, listing the
  organization-managed listings only as toggles with no "All servers"
  mode (that would mean every launching member's own servers). The
  save body sends the chosen names, [] when none, as before; the
  stored list is kept when editing instead of being forced to [].
- The org section description, the org editor hint and the
  legacy-profile warning no longer say "no MCP servers" once the flag
  is on.

Flag off, the editors and their save bodies are unchanged.
hieptl added a commit that referenced this pull request Nov 2, 2026
#1120)

* feat(settings): add the enable_org_mcp_servers feature flag (OHE-3860)

Organization-scoped MCP servers (OHE-3091) land in three settings
surfaces in separate PRs. This flag lets each land dark: it gates the
Organization MCP servers section on Settings > MCP and the org entries
in both Agent Profile editors, and stays off by default so every
existing install keeps today's UI.

Read from ENABLE_ORG_MCP_SERVERS or the structured
OH_WEB_CLIENT_FEATURE_FLAGS_ENABLE_ORG_MCP_SERVERS, like the agent
profile flags. UI-level only: the org MCP servers API is not gated.

* feat(settings): show and manage organization MCP servers on the Settings > MCP page (OHE-3862) (#1122)

* feat(settings): show and manage organization MCP servers on the Settings > MCP page (OHE-3862)

Behind enable_org_mcp_servers, the MCP page gains an Organization MCP
servers section below the member's own list, built like the Secrets
page's organization section:

- Organization-managed listings (one shared credential) and
  user-managed listings (each member's own secret) in two groups, with
  a "Managed by organization" / "Your identity" badge.
- A user-managed listing shows whether the member already holds the
  personal secret it references; "Connect" opens the existing secret
  form with that name prefilled and locked, so the server runs under
  the member's own identity once saved.
- Admins and owners (new frontend permission manage_org_mcp) add, edit,
  test and delete listings through a dedicated form: server type,
  name, URL, timeout, who manages it, and None / Bearer / Header
  authentication. An organization-managed token is stored masked and
  kept on save unless the URL changes; a user-managed listing stores
  the personal secret name as ${NAME}.
- The personal server form refuses a name the organization already
  provides, since a member's server of that name would hide the
  organization's at launch.

Flag off, the page is unchanged. API client, query and mutation hooks,
dev-mock handlers (VITE_MOCK_ORG_MCP_SERVERS=true) and 36 i18n keys in
15 locales.

* feat(settings): list organization MCP servers in the Agent Profile editors (OHE-3863) (#1123)

Behind enable_org_mcp_servers, both Agent Profile editors see the
organization's MCP server listings:

- The personal editor's MCP picker lists the organization's listings
  after the member's own servers, with the Organization badge. "All
  servers" now means every personal and organization server, as the
  launch merge does; "Choose servers" can toggle organization entries
  individually, and dangling references include organization names.
- The org editor shows the MCP section it used to hide, listing the
  organization-managed listings only as toggles with no "All servers"
  mode (that would mean every launching member's own servers). The
  save body sends the chosen names, [] when none, as before; the
  stored list is kept when editing instead of being forced to [].
- The org section description, the org editor hint and the
  legacy-profile warning no longer say "no MCP servers" once the flag
  is on.

Flag off, the editors and their save bodies are unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant