Skip to content

Commit 2689e4b

Browse files
committed
feat(frontend): add GitHub MCP integration settings in team configuration
1 parent e18ee03 commit 2689e4b

File tree

2 files changed

+123
-7
lines changed

2 files changed

+123
-7
lines changed

services/backend/src/global-settings/team.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,33 @@ export const teamSettings: GlobalSettingsModule = {
5353
description: 'Maximum total number of MCP server installations per team. Applied when a new team is created. Includes all transport types (HTTP, SSE, stdio).',
5454
encrypted: false,
5555
required: false
56+
},
57+
{
58+
key: 'team.allow_github_mcp',
59+
name: 'Allow GitHub MCP Servers',
60+
defaultValue: false,
61+
type: 'boolean',
62+
description: 'Allow teams to install MCP servers directly from GitHub repositories',
63+
encrypted: false,
64+
required: false
65+
},
66+
{
67+
key: 'team.allow_private_github_repos',
68+
name: 'Allow Private GitHub Repositories',
69+
defaultValue: false,
70+
type: 'boolean',
71+
description: 'Allow teams to install MCP servers from private GitHub repositories',
72+
encrypted: false,
73+
required: false
74+
},
75+
{
76+
key: 'team.github_mcp_limit',
77+
name: 'GitHub MCP Server Limit',
78+
defaultValue: 1,
79+
type: 'number',
80+
description: 'Maximum number of MCP servers that can be installed from GitHub repositories per team',
81+
encrypted: false,
82+
required: false
5683
}
5784
]
5885
};

services/frontend/src/components/globalSettings/TeamSettings.vue

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const {
2626
const isSavingCard1 = ref(false)
2727
const isSavingCard2 = ref(false)
2828
const isSavingCard3 = ref(false)
29+
const isSavingCard4 = ref(false)
2930
3031
// Get setting by key
3132
function getSetting(key: string) {
@@ -34,7 +35,7 @@ function getSetting(key: string) {
3435
3536
// Save specific settings by keys
3637
async function saveSpecificSettings(keys: string[], cardNumber: number): Promise<boolean> {
37-
const loadingRef = cardNumber === 1 ? isSavingCard1 : cardNumber === 2 ? isSavingCard2 : isSavingCard3
38+
const loadingRef = cardNumber === 1 ? isSavingCard1 : cardNumber === 2 ? isSavingCard2 : cardNumber === 3 ? isSavingCard3 : isSavingCard4
3839
loadingRef.value = true
3940
4041
try {
@@ -94,9 +95,17 @@ async function handleSaveCard2() {
9495
}
9596
}
9697
97-
// Handle form submission for Card 3
98+
// Handle form submission for Card 3 (GitHub MCP Integration)
9899
async function handleSaveCard3() {
99-
const success = await saveSpecificSettings(['team.allow_remote_mcp'], 3)
100+
const success = await saveSpecificSettings(['team.allow_github_mcp', 'team.allow_private_github_repos', 'team.github_mcp_limit'], 3)
101+
if (success) {
102+
emit('settings-updated', props.settings)
103+
}
104+
}
105+
106+
// Handle form submission for Card 4 (Remote MCP Options)
107+
async function handleSaveCard4() {
108+
const success = await saveSpecificSettings(['team.allow_remote_mcp'], 4)
100109
if (success) {
101110
emit('settings-updated', props.settings)
102111
}
@@ -227,7 +236,87 @@ async function handleSaveCard3() {
227236
</template>
228237
</DsCard>
229238

230-
<!-- Card 3: Remote MCP Options -->
239+
<!-- Card 3: GitHub MCP Integration -->
240+
<DsCard title="GitHub MCP Integration">
241+
<p class="text-sm text-muted-foreground mb-6">
242+
Configure GitHub repository access for MCP server installations.
243+
</p>
244+
245+
<div class="space-y-6">
246+
<!-- Allow GitHub MCP Servers Checkbox -->
247+
<div class="flex items-start gap-3">
248+
<Checkbox
249+
id="allow-github-mcp"
250+
:checked="Boolean(formValues['team.allow_github_mcp'])"
251+
@update:checked="(value: boolean) => updateField('team.allow_github_mcp', value)"
252+
/>
253+
<div class="grid gap-1">
254+
<label
255+
for="allow-github-mcp"
256+
class="cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
257+
>
258+
{{ getSetting('team.allow_github_mcp')?.name || 'Allow GitHub MCP Servers' }}
259+
</label>
260+
<p class="text-muted-foreground text-sm">
261+
{{ getSetting('team.allow_github_mcp')?.description }}
262+
</p>
263+
</div>
264+
</div>
265+
266+
<!-- Allow Private GitHub Repositories Checkbox -->
267+
<div class="flex items-start gap-3">
268+
<Checkbox
269+
id="allow-private-github-repos"
270+
:checked="Boolean(formValues['team.allow_private_github_repos'])"
271+
@update:checked="(value: boolean) => updateField('team.allow_private_github_repos', value)"
272+
/>
273+
<div class="grid gap-1">
274+
<label
275+
for="allow-private-github-repos"
276+
class="cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
277+
>
278+
{{ getSetting('team.allow_private_github_repos')?.name || 'Allow Private GitHub Repositories' }}
279+
</label>
280+
<p class="text-muted-foreground text-sm">
281+
{{ getSetting('team.allow_private_github_repos')?.description }}
282+
</p>
283+
</div>
284+
</div>
285+
286+
<!-- GitHub MCP Server Limit -->
287+
<div class="space-y-2">
288+
<Label for="github-mcp-limit">
289+
{{ getSetting('team.github_mcp_limit')?.name || 'GitHub MCP Server Limit' }}
290+
</Label>
291+
<Input
292+
id="github-mcp-limit"
293+
type="number"
294+
:model-value="String(formValues['team.github_mcp_limit'] || '')"
295+
@update:model-value="(value) => updateField('team.github_mcp_limit', Number(value))"
296+
placeholder="0"
297+
:class="{ 'border-destructive': getFieldError('team.github_mcp_limit') }"
298+
/>
299+
<p v-if="getFieldError('team.github_mcp_limit')" class="text-sm text-destructive">
300+
{{ getFieldError('team.github_mcp_limit') }}
301+
</p>
302+
<p class="text-xs text-muted-foreground">
303+
{{ getSetting('team.github_mcp_limit')?.description }}
304+
</p>
305+
</div>
306+
</div>
307+
308+
<template #footer-actions>
309+
<Button
310+
:disabled="isSavingCard3"
311+
@click="handleSaveCard3"
312+
>
313+
<Spinner v-if="isSavingCard3" class="mr-2" />
314+
Save Changes
315+
</Button>
316+
</template>
317+
</DsCard>
318+
319+
<!-- Card 4: Remote MCP Options -->
231320
<DsCard title="Remote MCP Options">
232321
<p class="text-sm text-muted-foreground mb-6">
233322
Control whether teams can install MCP servers from external sources.
@@ -257,10 +346,10 @@ async function handleSaveCard3() {
257346

258347
<template #footer-actions>
259348
<Button
260-
:disabled="isSavingCard3"
261-
@click="handleSaveCard3"
349+
:disabled="isSavingCard4"
350+
@click="handleSaveCard4"
262351
>
263-
<Spinner v-if="isSavingCard3" class="mr-2" />
352+
<Spinner v-if="isSavingCard4" class="mr-2" />
264353
Save Changes
265354
</Button>
266355
</template>

0 commit comments

Comments
 (0)