Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

feat: enable normal mcp

DarkPhoenix2704422c7471e990
diff --git a/packages/nc-gui/components/dashboard/settings/base/index.vue b/packages/nc-gui/components/dashboard/settings/base/index.vue
index 9ac71ae950..551f2d095c 100644
--- a/packages/nc-gui/components/dashboard/settings/base/index.vue
+++ b/packages/nc-gui/components/dashboard/settings/base/index.vue
@@ -3,6 +3,8 @@ const { isUIAllowed } = useRoles()
const hasPermissionForBaseAccess = computed(() => isEeUI && isUIAllowed('manageBaseType'))
+const hasPermissionForMCP = computed(() => isUIAllowed('manageMCP'))
+
const hasPermissionForSnapshots = computed(() => isEeUI && isUIAllowed('baseMiscSettings') && isUIAllowed('manageSnapshot'))
const hasPermissionForMigrate = computed(() => !isEeUI && isUIAllowed('baseMiscSettings') && isUIAllowed('migrateBase'))
@@ -15,10 +17,6 @@ const activeMenu = ref(
hasPermissionForBaseAccess.value ? 'baseType' : hasPermissionForSnapshots.value ? 'snapshots' : 'visibility',
)
-const { isFeatureEnabled } = useBetaFeatureToggle()
-
-const isMCPEnabled = computed(() => isUIAllowed('baseMiscSettings') && isFeatureEnabled(FEATURE_FLAG.MODEL_CONTEXT_PROTOCOL))
-
const selectMenu = (option: string, updateQuery = true) => {
if (!hasPermissionForSnapshots.value && option === 'snapshots') {
return
@@ -32,6 +30,10 @@ const selectMenu = (option: string, updateQuery = true) => {
return
}
+ if (!hasPermissionForMCP.value && option === 'mcp') {
+ return
+ }
+
if (updateQuery) {
router.push({
query: {
@@ -112,7 +114,7 @@ watch(
</span>
</div>
<div
- v-if="isMCPEnabled"
+ v-if="hasPermissionForMCP"
:class="{
'active-menu': activeMenu === 'mcp',
}"
diff --git a/packages/nc-gui/components/project/View.vue b/packages/nc-gui/components/project/View.vue
index 38e2f08151..05e63f9514 100644
--- a/packages/nc-gui/components/project/View.vue
+++ b/packages/nc-gui/components/project/View.vue
@@ -304,14 +304,7 @@ onMounted(() => {
</template>
<DashboardSettingsSyncs v-model:state="baseSettingsState" :base-id="base.id" class="max-h-full" />
</a-tab-pane>
- <a-tab-pane
- v-if="
- !isSharedBase &&
- (isUIAllowed('baseMiscSettings') || isFeatureEnabled(FEATURE_FLAG.MODEL_CONTEXT_PROTOCOL)) &&
- !isMobileMode
- "
- key="base-settings"
- >
+ <a-tab-pane v-if="!isSharedBase && !isMobileMode" key="base-settings">
<template #tab>
<div class="tab-title" data-testid="proj-view-tab__base-settings">
<GeneralIcon icon="ncSettings" />
diff --git a/packages/nc-gui/lib/acl.ts b/packages/nc-gui/lib/acl.ts
index 343d5defb0..2dec4401fa 100644
--- a/packages/nc-gui/lib/acl.ts
+++ b/packages/nc-gui/lib/acl.ts
@@ -126,6 +126,7 @@ const rolePermissions = {
commentCount: true,
recordAuditList: true,
newUser: true,
+ manageMCP: true,
},
},
[ProjectRoles.NO_ACCESS]: {