You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/mcp-server-supabase/src/server.ts
+32-53Lines changed: 32 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -439,48 +439,6 @@ export function createSupabaseMcpServer(options: SupabaseMcpServerOptions) {
439
439
}),
440
440
441
441
// Experimental features
442
-
enable_branching: tool({
443
-
description:
444
-
'Enables branching on a Supabase project if the organization has a paid subscription.',
445
-
parameters: z.object({
446
-
project_id: z.string(),
447
-
}),
448
-
execute: async({ project_id })=>{
449
-
const{ error, data }=awaitmanagementApiClient.GET(
450
-
'/v1/projects/{ref}/branches',
451
-
{
452
-
params: {
453
-
path: {
454
-
ref: project_id,
455
-
},
456
-
},
457
-
}
458
-
);
459
-
460
-
// If at least 1 branch exists, branching is already enabled.
461
-
if(!error){
462
-
returndata?.find((b)=>b.is_default);
463
-
}
464
-
465
-
constresponse=awaitmanagementApiClient.POST(
466
-
'/v1/projects/{ref}/branches',
467
-
{
468
-
params: {
469
-
path: {
470
-
ref: project_id,
471
-
},
472
-
},
473
-
body: {
474
-
branch_name: 'main',
475
-
},
476
-
}
477
-
);
478
-
479
-
assertSuccess(response,'Failed to enable branching');
480
-
481
-
returnresponse.data;
482
-
},
483
-
}),
484
442
create_branch: tool({
485
443
description:
486
444
'Creates a development branch on a Supabase project. This will apply all migrations from the main project to a fresh branch database. Note that production data will not carry over. The branch will get its own project_id via the resulting project_ref. Use this ID to execute queries and migrations on the branch.',
@@ -492,35 +450,54 @@ export function createSupabaseMcpServer(options: SupabaseMcpServerOptions) {
492
450
.describe('Name of the branch to create'),
493
451
}),
494
452
execute: async({ project_id, name })=>{
495
-
// First ensure branching is enabled by listing branches
0 commit comments