Name the connected MCP servers on the Duo readiness card

What does this MR do and why?

This is a frontend-only MR. It changes the "MCP servers" row of the Duo readiness card in Project Settings > General > GitLab Duo to name the connected MCP servers instead of showing a count. This matches the approved design.

Connected-state copy:

  • One server: "Atlassian connected. Agents can use it."
  • Two servers: "Atlassian and Linear connected. Agents can use both."
  • Three or more: "Atlassian, GitHub, and 2 more connected. Agents can use them all." (first two names, then a count of the rest)

Names come sorted alphabetically from the backend. The not-connected copy, the loading copy, the error copy, and the buttons ("View servers" when connected, "How to connect" otherwise, "Check again" on error) are unchanged.

Implementation:

  • New query duo_mcp_server_names.query.graphql reads project.duoMcpServerNames.
  • duo_readiness_mcp_row.vue switches from the count to the names and builds the three copy variants with sprintf, without HTML escaping, since the row renders the description as text.
  • The old duo_mcp_servers_count.query.graphql is removed because nothing uses it anymore.
  • locale/gitlab.pot regenerated.

The backend field duoMcpServerNames comes from MR !259826 (merged), already in master. A later cleanup MR removes the duoMcpServersCount GraphQL field.

Besides the frontend row, this MR deliberately carries two backend commits: the backend MR was already approved, so its non-blocking review feedback lands here instead. They make the readiness list resolve pinned consumers to their pinned version and drop namespace-blocked servers, which also changes what the existing duoMcpServersCount field counts.

References

Closes #629943 (closed) Epic gitlab-org#22591 (closed) Design https://claude.ai/design/p/54bcc27d-fe37-450f-90c1-4457674092f0?file=Duo+Setup+Step+Process.dc.html

Screenshots or screen recordings

The screenshots below show the complete feature.

Before After (two servers) After (four servers)
before_two_connected after_two_connected after_four_connected

Full settings page on GDK with three servers connected ("Atlassian, Linear, and 1 more connected. Agents can use them all."):

mcp_names_row_connected

How to set up and validate locally

  1. In a Rails console, enable MCP for the top-level group:
    group.ai_settings.update!(duo_workflow_mcp_enabled: true)
    group.namespace_settings.update!(duo_custom_agents_enabled: true)
  2. Create two MCP servers in the AI Catalog and attach them to an agent configured for a project.
  3. Open the project's Settings > General > GitLab Duo and expand the section if collapsed.
  4. The MCP servers row should read " and connected. Agents can use both." with a "View servers" button.
  5. Remove the agent consumer and reload: the row should show "Experiment. Agents can connect to tools your team already uses, such as Jira or Linear." with "How to connect".

Tests:

  • New Capybara feature spec ee/spec/features/projects/settings/gitlab_duo/mcp_servers_row_spec.rb covering the not-connected state and two connected servers, run with a real browser against GDK (2 examples, 0 failures).
  • Jest spec ee/spec/frontend/ai/settings/readiness/components/duo_readiness_mcp_row_spec.js rewritten for names (one, two, four names, text not escaped, failure, retry, redacted null), plus updated mocks in duo_readiness_card_spec.js and gitlab_duo_settings_spec.js (41 tests, 0 failures across the three files).
  • eslint (including GraphQL query validation against the schema) and prettier clean.

MR acceptance checklist

I have evaluated the MR acceptance checklist for this MR.

🤖 Generated with Claude Code

Edited by Tian Gao

Merge request reports

Loading
Loading