Display MCP settings for root groups only

What does this MR do and why?

After Display ai-common-settings-bottom slot in group... (!202266 - merged) fix, the MCP settings are now displayed in group General settings for self-managed instances. However, let's also display it only for root groups since the settings are not cascaded at the moment.

On .com we have Gitlab Duo page for each top-level group and we display the MCP checkbox there. When it's set, we use the value from the top-level group to identify whether MCP enabled for a project/group or not.

Screenshot_2025-08-26_at_11.25.20

However, we don't have the same setting on the instance level because the database column responsible for this value is in ai_namespace_settings only. And we don't cascade the setting over all groups.

It has been identified recently that it's not possible to enable MCP on self-managed due to this reason. The easiest option is to allow enabling the MCP setting per-group and we display the setting now: Display ai-common-settings-bottom slot in group... (!202266 - merged). But there's no need in displaying it for all groups because we take the value from the top-level one anyway.

Screenshot_2025-08-26_at_11.31.24

Proposal

The idea is to display the setting for top-level groups on self-managed instances. It's an easy fix that can be backported.

The long-term solution is to introduce an instance-level setting as well and cascade it properly over all groups.

Edited by Igor Drozdov

Merge request reports

Loading