@supabase/mcp-server-supabase 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/chunk-3BFHAE72.js +17 -0
  2. package/dist/chunk-3BFHAE72.js.map +1 -0
  3. package/dist/chunk-6DARTJRP.js +50 -0
  4. package/dist/chunk-6DARTJRP.js.map +1 -0
  5. package/dist/chunk-6QB2YXYQ.cjs +17 -0
  6. package/dist/chunk-6QB2YXYQ.cjs.map +1 -0
  7. package/dist/{chunk-SXD3C6JM.cjs → chunk-C4YUF27U.cjs} +11 -26
  8. package/dist/chunk-C4YUF27U.cjs.map +1 -0
  9. package/dist/chunk-DG3LSIFH.cjs +2 -0
  10. package/dist/chunk-DG3LSIFH.cjs.map +1 -0
  11. package/dist/chunk-OO7IZCN3.cjs +295 -0
  12. package/dist/chunk-OO7IZCN3.cjs.map +1 -0
  13. package/dist/chunk-VV4YSLRO.cjs +1 -0
  14. package/dist/{chunk-PHWSETKC.cjs.map → chunk-VV4YSLRO.cjs.map} +1 -1
  15. package/dist/chunk-W6H5VMAV.js +1 -0
  16. package/dist/chunk-WAYAYNQY.js +295 -0
  17. package/dist/chunk-WAYAYNQY.js.map +1 -0
  18. package/dist/chunk-YW7R6DLX.js +2 -0
  19. package/dist/chunk-YW7R6DLX.js.map +1 -0
  20. package/dist/cli.cjs +1 -1
  21. package/dist/cli.cjs.map +1 -1
  22. package/dist/cli.js +1 -1
  23. package/dist/cli.js.map +1 -1
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +36 -18
  27. package/dist/index.d.ts +36 -18
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/platform/api-platform.cjs +1 -1
  31. package/dist/platform/api-platform.d.cts +1 -1
  32. package/dist/platform/api-platform.d.ts +1 -1
  33. package/dist/platform/api-platform.js +1 -1
  34. package/dist/platform/index.cjs +1 -1
  35. package/dist/platform/index.cjs.map +1 -1
  36. package/dist/platform/index.d.cts +13 -576
  37. package/dist/platform/index.d.ts +13 -576
  38. package/dist/platform/index.js +1 -1
  39. package/dist/types-abfpaWQw.d.cts +582 -0
  40. package/dist/types-abfpaWQw.d.ts +582 -0
  41. package/package.json +7 -3
  42. package/dist/chunk-6FWRABME.cjs +0 -2
  43. package/dist/chunk-6FWRABME.cjs.map +0 -1
  44. package/dist/chunk-HID6VPMI.js +0 -2
  45. package/dist/chunk-HID6VPMI.js.map +0 -1
  46. package/dist/chunk-IMPRDEX4.cjs +0 -295
  47. package/dist/chunk-IMPRDEX4.cjs.map +0 -1
  48. package/dist/chunk-LL3YUIO5.js +0 -2
  49. package/dist/chunk-LL3YUIO5.js.map +0 -1
  50. package/dist/chunk-LU6L7C36.js +0 -1
  51. package/dist/chunk-PHWSETKC.cjs +0 -1
  52. package/dist/chunk-SXD3C6JM.cjs.map +0 -1
  53. package/dist/chunk-VJTFZ74D.js +0 -65
  54. package/dist/chunk-VJTFZ74D.js.map +0 -1
  55. package/dist/chunk-VNQ4ISM6.js +0 -295
  56. package/dist/chunk-VNQ4ISM6.js.map +0 -1
  57. package/dist/chunk-VVFN7QGX.cjs +0 -2
  58. package/dist/chunk-VVFN7QGX.cjs.map +0 -1
  59. /package/dist/{chunk-LU6L7C36.js.map → chunk-W6H5VMAV.js.map} +0 -0
@@ -0,0 +1,582 @@
1
+ import { InitData } from '@supabase/mcp-utils';
2
+ import { z } from 'zod/v4';
3
+
4
+ type SuccessResponse = {
5
+ success: true;
6
+ };
7
+ declare const storageBucketSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ name: z.ZodString;
10
+ owner: z.ZodString;
11
+ created_at: z.ZodString;
12
+ updated_at: z.ZodString;
13
+ public: z.ZodBoolean;
14
+ }, z.core.$strip>;
15
+ declare const storageConfigSchema: z.ZodObject<{
16
+ fileSizeLimit: z.ZodNumber;
17
+ features: z.ZodObject<{
18
+ imageTransformation: z.ZodObject<{
19
+ enabled: z.ZodBoolean;
20
+ }, z.core.$strip>;
21
+ s3Protocol: z.ZodObject<{
22
+ enabled: z.ZodBoolean;
23
+ }, z.core.$strip>;
24
+ }, z.core.$strip>;
25
+ }, z.core.$strip>;
26
+ declare const organizationSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ name: z.ZodString;
29
+ plan: z.ZodOptional<z.ZodString>;
30
+ allowed_release_channels: z.ZodArray<z.ZodString>;
31
+ opt_in_tags: z.ZodArray<z.ZodString>;
32
+ }, z.core.$strip>;
33
+ declare const projectSchema: z.ZodObject<{
34
+ id: z.ZodString;
35
+ ref: z.ZodString;
36
+ organization_id: z.ZodString;
37
+ organization_slug: z.ZodString;
38
+ name: z.ZodString;
39
+ status: z.ZodString;
40
+ created_at: z.ZodString;
41
+ region: z.ZodString;
42
+ }, z.core.$strip>;
43
+ declare const branchSchema: z.ZodObject<{
44
+ id: z.ZodString;
45
+ name: z.ZodString;
46
+ project_ref: z.ZodString;
47
+ parent_project_ref: z.ZodString;
48
+ is_default: z.ZodBoolean;
49
+ git_branch: z.ZodOptional<z.ZodString>;
50
+ pr_number: z.ZodOptional<z.ZodNumber>;
51
+ latest_check_run_id: z.ZodOptional<z.ZodNumber>;
52
+ persistent: z.ZodBoolean;
53
+ status: z.ZodEnum<{
54
+ CREATING_PROJECT: "CREATING_PROJECT";
55
+ RUNNING_MIGRATIONS: "RUNNING_MIGRATIONS";
56
+ MIGRATIONS_PASSED: "MIGRATIONS_PASSED";
57
+ MIGRATIONS_FAILED: "MIGRATIONS_FAILED";
58
+ FUNCTIONS_DEPLOYED: "FUNCTIONS_DEPLOYED";
59
+ FUNCTIONS_FAILED: "FUNCTIONS_FAILED";
60
+ }>;
61
+ created_at: z.ZodString;
62
+ updated_at: z.ZodString;
63
+ }, z.core.$strip>;
64
+ declare const edgeFunctionSchema: z.ZodObject<{
65
+ id: z.ZodString;
66
+ slug: z.ZodString;
67
+ name: z.ZodString;
68
+ status: z.ZodString;
69
+ version: z.ZodNumber;
70
+ created_at: z.ZodOptional<z.ZodNumber>;
71
+ updated_at: z.ZodOptional<z.ZodNumber>;
72
+ verify_jwt: z.ZodOptional<z.ZodBoolean>;
73
+ import_map: z.ZodOptional<z.ZodBoolean>;
74
+ import_map_path: z.ZodOptional<z.ZodString>;
75
+ entrypoint_path: z.ZodOptional<z.ZodString>;
76
+ }, z.core.$strip>;
77
+ declare const edgeFunctionWithBodySchema: z.ZodObject<{
78
+ id: z.ZodString;
79
+ slug: z.ZodString;
80
+ name: z.ZodString;
81
+ status: z.ZodString;
82
+ version: z.ZodNumber;
83
+ created_at: z.ZodOptional<z.ZodNumber>;
84
+ updated_at: z.ZodOptional<z.ZodNumber>;
85
+ verify_jwt: z.ZodOptional<z.ZodBoolean>;
86
+ import_map: z.ZodOptional<z.ZodBoolean>;
87
+ import_map_path: z.ZodOptional<z.ZodString>;
88
+ entrypoint_path: z.ZodOptional<z.ZodString>;
89
+ files: z.ZodArray<z.ZodObject<{
90
+ name: z.ZodString;
91
+ content: z.ZodString;
92
+ }, z.core.$strip>>;
93
+ }, z.core.$strip>;
94
+ declare const createProjectOptionsSchema: z.ZodObject<{
95
+ name: z.ZodString;
96
+ organization_id: z.ZodString;
97
+ region: z.ZodEnum<{
98
+ "us-west-1": "us-west-1";
99
+ "us-east-1": "us-east-1";
100
+ "us-east-2": "us-east-2";
101
+ "ca-central-1": "ca-central-1";
102
+ "eu-west-1": "eu-west-1";
103
+ "eu-west-2": "eu-west-2";
104
+ "eu-west-3": "eu-west-3";
105
+ "eu-central-1": "eu-central-1";
106
+ "eu-central-2": "eu-central-2";
107
+ "eu-north-1": "eu-north-1";
108
+ "ap-south-1": "ap-south-1";
109
+ "ap-southeast-1": "ap-southeast-1";
110
+ "ap-northeast-1": "ap-northeast-1";
111
+ "ap-northeast-2": "ap-northeast-2";
112
+ "ap-southeast-2": "ap-southeast-2";
113
+ "sa-east-1": "sa-east-1";
114
+ }>;
115
+ db_pass: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$strip>;
117
+ declare const createBranchOptionsSchema: z.ZodObject<{
118
+ name: z.ZodString;
119
+ }, z.core.$strip>;
120
+ declare const resetBranchOptionsSchema: z.ZodObject<{
121
+ migration_version: z.ZodOptional<z.ZodString>;
122
+ }, z.core.$strip>;
123
+ declare const deployEdgeFunctionOptionsSchema: z.ZodObject<{
124
+ name: z.ZodString;
125
+ entrypoint_path: z.ZodString;
126
+ import_map_path: z.ZodOptional<z.ZodString>;
127
+ verify_jwt: z.ZodOptional<z.ZodBoolean>;
128
+ files: z.ZodArray<z.ZodObject<{
129
+ name: z.ZodString;
130
+ content: z.ZodString;
131
+ }, z.core.$strip>>;
132
+ }, z.core.$strip>;
133
+ declare class ResultTooLargeError extends Error {
134
+ name: string;
135
+ }
136
+ declare const executeSqlOptionsSchema: z.ZodObject<{
137
+ query: z.ZodString;
138
+ parameters: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
139
+ read_only: z.ZodOptional<z.ZodBoolean>;
140
+ max_result_bytes: z.ZodOptional<z.ZodNumber>;
141
+ }, z.core.$strip>;
142
+ declare const applyMigrationOptionsSchema: z.ZodObject<{
143
+ name: z.ZodString;
144
+ query: z.ZodString;
145
+ }, z.core.$strip>;
146
+ declare const migrationSchema: z.ZodObject<{
147
+ version: z.ZodString;
148
+ name: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$strip>;
150
+ declare const logsServiceSchema: z.ZodEnum<{
151
+ auth: "auth";
152
+ realtime: "realtime";
153
+ storage: "storage";
154
+ api: "api";
155
+ "branch-action": "branch-action";
156
+ postgres: "postgres";
157
+ "edge-function": "edge-function";
158
+ "edge-function-runtime": "edge-function-runtime";
159
+ }>;
160
+ declare const getLogsOptionsSchema: z.ZodObject<{
161
+ service: z.ZodEnum<{
162
+ auth: "auth";
163
+ realtime: "realtime";
164
+ storage: "storage";
165
+ api: "api";
166
+ "branch-action": "branch-action";
167
+ postgres: "postgres";
168
+ "edge-function": "edge-function";
169
+ "edge-function-runtime": "edge-function-runtime";
170
+ }>;
171
+ iso_timestamp_start: z.ZodOptional<z.ZodString>;
172
+ iso_timestamp_end: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>;
174
+ declare const queryLogsOptionsSchema: z.ZodObject<{
175
+ sql: z.ZodString;
176
+ iso_timestamp_start: z.ZodOptional<z.ZodString>;
177
+ iso_timestamp_end: z.ZodOptional<z.ZodString>;
178
+ max_result_bytes: z.ZodOptional<z.ZodNumber>;
179
+ }, z.core.$strip>;
180
+ declare const generateTypescriptTypesResultSchema: z.ZodObject<{
181
+ types: z.ZodString;
182
+ }, z.core.$strip>;
183
+ declare const notebookCellSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
184
+ id: z.ZodString;
185
+ type: z.ZodLiteral<"markdown">;
186
+ text: z.ZodString;
187
+ }, z.core.$strip>, z.ZodObject<{
188
+ id: z.ZodString;
189
+ type: z.ZodLiteral<"database">;
190
+ sql: z.ZodString;
191
+ row_limit: z.ZodNumber;
192
+ database_identifier: z.ZodOptional<z.ZodString>;
193
+ title: z.ZodOptional<z.ZodString>;
194
+ view: z.ZodOptional<z.ZodEnum<{
195
+ table: "table";
196
+ chart: "chart";
197
+ }>>;
198
+ chart: z.ZodOptional<z.ZodObject<{
199
+ type: z.ZodEnum<{
200
+ bar: "bar";
201
+ line: "line";
202
+ }>;
203
+ x_column: z.ZodString;
204
+ y_series: z.ZodArray<z.ZodObject<{
205
+ column: z.ZodString;
206
+ }, z.core.$strip>>;
207
+ scale: z.ZodEnum<{
208
+ linear: "linear";
209
+ log: "log";
210
+ }>;
211
+ cumulative: z.ZodBoolean;
212
+ show_labels: z.ZodBoolean;
213
+ }, z.core.$strip>>;
214
+ }, z.core.$strip>, z.ZodObject<{
215
+ id: z.ZodString;
216
+ type: z.ZodLiteral<"log">;
217
+ sql: z.ZodString;
218
+ time_range: z.ZodUnion<readonly [z.ZodObject<{
219
+ type: z.ZodLiteral<"absolute">;
220
+ start: z.ZodString;
221
+ end: z.ZodString;
222
+ }, z.core.$strip>, z.ZodObject<{
223
+ type: z.ZodLiteral<"relative">;
224
+ unit: z.ZodEnum<{
225
+ minute: "minute";
226
+ hour: "hour";
227
+ day: "day";
228
+ week: "week";
229
+ month: "month";
230
+ year: "year";
231
+ }>;
232
+ amount: z.ZodNumber;
233
+ }, z.core.$strip>]>;
234
+ title: z.ZodOptional<z.ZodString>;
235
+ view: z.ZodOptional<z.ZodEnum<{
236
+ table: "table";
237
+ chart: "chart";
238
+ }>>;
239
+ chart: z.ZodOptional<z.ZodObject<{
240
+ type: z.ZodEnum<{
241
+ bar: "bar";
242
+ line: "line";
243
+ }>;
244
+ x_column: z.ZodString;
245
+ y_series: z.ZodArray<z.ZodObject<{
246
+ column: z.ZodString;
247
+ }, z.core.$strip>>;
248
+ scale: z.ZodEnum<{
249
+ linear: "linear";
250
+ log: "log";
251
+ }>;
252
+ cumulative: z.ZodBoolean;
253
+ show_labels: z.ZodBoolean;
254
+ }, z.core.$strip>>;
255
+ }, z.core.$strip>], "type">;
256
+ declare const createNotebookOptionsSchema: z.ZodObject<{
257
+ name: z.ZodString;
258
+ description: z.ZodOptional<z.ZodString>;
259
+ content: z.ZodObject<{
260
+ cells: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
261
+ type: z.ZodLiteral<"markdown">;
262
+ text: z.ZodString;
263
+ }, z.core.$strict>, z.ZodObject<{
264
+ type: z.ZodLiteral<"database">;
265
+ view: z.ZodOptional<z.ZodEnum<{
266
+ table: "table";
267
+ chart: "chart";
268
+ }>>;
269
+ title: z.ZodOptional<z.ZodString>;
270
+ sql: z.ZodString;
271
+ row_limit: z.ZodNumber;
272
+ database_identifier: z.ZodOptional<z.ZodString>;
273
+ chart: z.ZodOptional<z.ZodObject<{
274
+ type: z.ZodEnum<{
275
+ bar: "bar";
276
+ line: "line";
277
+ }>;
278
+ x_column: z.ZodString;
279
+ scale: z.ZodEnum<{
280
+ linear: "linear";
281
+ log: "log";
282
+ }>;
283
+ cumulative: z.ZodBoolean;
284
+ show_labels: z.ZodBoolean;
285
+ y_series: z.ZodArray<z.ZodObject<{
286
+ column: z.ZodString;
287
+ }, z.core.$strict>>;
288
+ }, z.core.$strict>>;
289
+ }, z.core.$strict>, z.ZodObject<{
290
+ type: z.ZodLiteral<"log">;
291
+ view: z.ZodOptional<z.ZodEnum<{
292
+ table: "table";
293
+ chart: "chart";
294
+ }>>;
295
+ title: z.ZodOptional<z.ZodString>;
296
+ sql: z.ZodString;
297
+ time_range: z.ZodDiscriminatedUnion<[z.ZodObject<{
298
+ type: z.ZodLiteral<"absolute">;
299
+ start: z.ZodISODateTime;
300
+ end: z.ZodISODateTime;
301
+ }, z.core.$strict>, z.ZodObject<{
302
+ type: z.ZodLiteral<"relative">;
303
+ unit: z.ZodEnum<{
304
+ minute: "minute";
305
+ hour: "hour";
306
+ day: "day";
307
+ week: "week";
308
+ month: "month";
309
+ year: "year";
310
+ }>;
311
+ amount: z.ZodNumber;
312
+ }, z.core.$strict>], "type">;
313
+ chart: z.ZodOptional<z.ZodObject<{
314
+ type: z.ZodEnum<{
315
+ bar: "bar";
316
+ line: "line";
317
+ }>;
318
+ x_column: z.ZodString;
319
+ scale: z.ZodEnum<{
320
+ linear: "linear";
321
+ log: "log";
322
+ }>;
323
+ cumulative: z.ZodBoolean;
324
+ show_labels: z.ZodBoolean;
325
+ y_series: z.ZodArray<z.ZodObject<{
326
+ column: z.ZodString;
327
+ }, z.core.$strict>>;
328
+ }, z.core.$strict>>;
329
+ }, z.core.$strict>], "type">>;
330
+ }, z.core.$strip>;
331
+ }, z.core.$strip>;
332
+ declare const notebookSchema: z.ZodObject<{
333
+ id: z.ZodString;
334
+ name: z.ZodString;
335
+ description: z.ZodNullable<z.ZodString>;
336
+ favorite: z.ZodBoolean;
337
+ inserted_at: z.ZodString;
338
+ updated_at: z.ZodString;
339
+ owner: z.ZodNullable<z.ZodObject<{
340
+ id: z.ZodNumber;
341
+ username: z.ZodString;
342
+ }, z.core.$strip>>;
343
+ updated_by: z.ZodNullable<z.ZodObject<{
344
+ id: z.ZodNumber;
345
+ username: z.ZodString;
346
+ }, z.core.$strip>>;
347
+ }, z.core.$strip>;
348
+ declare const notebookWithContentSchema: z.ZodObject<{
349
+ id: z.ZodString;
350
+ name: z.ZodString;
351
+ description: z.ZodNullable<z.ZodString>;
352
+ favorite: z.ZodBoolean;
353
+ inserted_at: z.ZodString;
354
+ updated_at: z.ZodString;
355
+ owner: z.ZodNullable<z.ZodObject<{
356
+ id: z.ZodNumber;
357
+ username: z.ZodString;
358
+ }, z.core.$strip>>;
359
+ updated_by: z.ZodNullable<z.ZodObject<{
360
+ id: z.ZodNumber;
361
+ username: z.ZodString;
362
+ }, z.core.$strip>>;
363
+ content: z.ZodObject<{
364
+ schema_version: z.ZodNumber;
365
+ cells: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
366
+ id: z.ZodString;
367
+ type: z.ZodLiteral<"markdown">;
368
+ text: z.ZodString;
369
+ }, z.core.$strip>, z.ZodObject<{
370
+ id: z.ZodString;
371
+ type: z.ZodLiteral<"database">;
372
+ sql: z.ZodString;
373
+ row_limit: z.ZodNumber;
374
+ database_identifier: z.ZodOptional<z.ZodString>;
375
+ title: z.ZodOptional<z.ZodString>;
376
+ view: z.ZodOptional<z.ZodEnum<{
377
+ table: "table";
378
+ chart: "chart";
379
+ }>>;
380
+ chart: z.ZodOptional<z.ZodObject<{
381
+ type: z.ZodEnum<{
382
+ bar: "bar";
383
+ line: "line";
384
+ }>;
385
+ x_column: z.ZodString;
386
+ y_series: z.ZodArray<z.ZodObject<{
387
+ column: z.ZodString;
388
+ }, z.core.$strip>>;
389
+ scale: z.ZodEnum<{
390
+ linear: "linear";
391
+ log: "log";
392
+ }>;
393
+ cumulative: z.ZodBoolean;
394
+ show_labels: z.ZodBoolean;
395
+ }, z.core.$strip>>;
396
+ }, z.core.$strip>, z.ZodObject<{
397
+ id: z.ZodString;
398
+ type: z.ZodLiteral<"log">;
399
+ sql: z.ZodString;
400
+ time_range: z.ZodUnion<readonly [z.ZodObject<{
401
+ type: z.ZodLiteral<"absolute">;
402
+ start: z.ZodString;
403
+ end: z.ZodString;
404
+ }, z.core.$strip>, z.ZodObject<{
405
+ type: z.ZodLiteral<"relative">;
406
+ unit: z.ZodEnum<{
407
+ minute: "minute";
408
+ hour: "hour";
409
+ day: "day";
410
+ week: "week";
411
+ month: "month";
412
+ year: "year";
413
+ }>;
414
+ amount: z.ZodNumber;
415
+ }, z.core.$strip>]>;
416
+ title: z.ZodOptional<z.ZodString>;
417
+ view: z.ZodOptional<z.ZodEnum<{
418
+ table: "table";
419
+ chart: "chart";
420
+ }>>;
421
+ chart: z.ZodOptional<z.ZodObject<{
422
+ type: z.ZodEnum<{
423
+ bar: "bar";
424
+ line: "line";
425
+ }>;
426
+ x_column: z.ZodString;
427
+ y_series: z.ZodArray<z.ZodObject<{
428
+ column: z.ZodString;
429
+ }, z.core.$strip>>;
430
+ scale: z.ZodEnum<{
431
+ linear: "linear";
432
+ log: "log";
433
+ }>;
434
+ cumulative: z.ZodBoolean;
435
+ show_labels: z.ZodBoolean;
436
+ }, z.core.$strip>>;
437
+ }, z.core.$strip>], "type">>;
438
+ }, z.core.$strip>;
439
+ }, z.core.$strip>;
440
+ type Organization = z.infer<typeof organizationSchema>;
441
+ type Project = z.infer<typeof projectSchema>;
442
+ type Branch = z.infer<typeof branchSchema>;
443
+ type EdgeFunction = z.infer<typeof edgeFunctionSchema>;
444
+ type EdgeFunctionWithBody = z.infer<typeof edgeFunctionWithBodySchema>;
445
+ type CreateProjectOptions = z.infer<typeof createProjectOptionsSchema>;
446
+ type CreateBranchOptions = z.infer<typeof createBranchOptionsSchema>;
447
+ type ResetBranchOptions = z.infer<typeof resetBranchOptionsSchema>;
448
+ type DeployEdgeFunctionOptions = z.infer<typeof deployEdgeFunctionOptionsSchema>;
449
+ type ExecuteSqlOptions = z.infer<typeof executeSqlOptionsSchema>;
450
+ type ApplyMigrationOptions = z.infer<typeof applyMigrationOptionsSchema>;
451
+ type Migration = z.infer<typeof migrationSchema>;
452
+ type ListMigrationsResult = z.infer<typeof migrationSchema>;
453
+ type LogsService = z.infer<typeof logsServiceSchema>;
454
+ type GetLogsOptions = z.infer<typeof getLogsOptionsSchema>;
455
+ type QueryLogsOptions = z.infer<typeof queryLogsOptionsSchema>;
456
+ type GenerateTypescriptTypesResult = z.infer<typeof generateTypescriptTypesResultSchema>;
457
+ type StorageConfig = z.infer<typeof storageConfigSchema>;
458
+ type StorageBucket = z.infer<typeof storageBucketSchema>;
459
+ type NotebookCell = z.infer<typeof notebookCellSchema>;
460
+ type CreateNotebookOptions = z.infer<typeof createNotebookOptionsSchema>;
461
+ type Notebook = z.infer<typeof notebookSchema>;
462
+ type NotebookWithContent = z.infer<typeof notebookWithContentSchema>;
463
+ type DatabaseOperations = {
464
+ executeSql<T>(projectId: string, options: ExecuteSqlOptions): Promise<T[]>;
465
+ listMigrations(projectId: string): Promise<Migration[]>;
466
+ applyMigration(projectId: string, options: ApplyMigrationOptions): Promise<void>;
467
+ };
468
+ type AccountOperations = {
469
+ listOrganizations(): Promise<{
470
+ id: string;
471
+ slug: string;
472
+ name: string;
473
+ }[]>;
474
+ getOrganization(organizationId: string): Promise<Organization>;
475
+ listProjects(): Promise<Project[]>;
476
+ getProject(projectId: string): Promise<Project>;
477
+ createProject(options: CreateProjectOptions): Promise<Project>;
478
+ pauseProject(projectId: string): Promise<void>;
479
+ restoreProject(projectId: string): Promise<void>;
480
+ };
481
+ type EdgeFunctionsOperations = {
482
+ listEdgeFunctions(projectId: string): Promise<EdgeFunction[]>;
483
+ getEdgeFunction(projectId: string, functionSlug: string): Promise<EdgeFunctionWithBody>;
484
+ deployEdgeFunction(projectId: string, options: DeployEdgeFunctionOptions): Promise<Omit<EdgeFunction, 'files'>>;
485
+ };
486
+ /**
487
+ * SQL dialect that a platform's logs endpoint speaks. Selects the
488
+ * dialect-appropriate `query_logs` description and `sql` parameter hint so a
489
+ * single tool can roll out across environments that back logs with different
490
+ * engines (hosted ClickHouse vs. self-hosted/CLI BigQuery).
491
+ */
492
+ type LogsDialect = 'clickhouse' | 'bigquery';
493
+ type DebuggingOperations = {
494
+ /**
495
+ * SQL dialect accepted by `queryLogs`. Defaults to `'clickhouse'` when unset,
496
+ * preserving the behavior of platforms that predate this field.
497
+ */
498
+ logsDialect?: LogsDialect;
499
+ getLogs(projectId: string, options: GetLogsOptions): Promise<unknown>;
500
+ queryLogs?(projectId: string, options: QueryLogsOptions): Promise<unknown>;
501
+ getSecurityAdvisors(projectId: string): Promise<unknown>;
502
+ getPerformanceAdvisors(projectId: string): Promise<unknown>;
503
+ getHealthAdvisors?(projectId: string): Promise<unknown>;
504
+ };
505
+ declare const apiKeyTypeSchema: z.ZodEnum<{
506
+ legacy: "legacy";
507
+ publishable: "publishable";
508
+ }>;
509
+ type ApiKeyType = z.infer<typeof apiKeyTypeSchema>;
510
+ type ApiKey = {
511
+ api_key: string;
512
+ name: string;
513
+ type: ApiKeyType;
514
+ description?: string;
515
+ id?: string;
516
+ disabled?: boolean;
517
+ };
518
+ type DevelopmentOperations = {
519
+ getProjectUrl(projectId: string): Promise<string>;
520
+ getPublishableKeys(projectId: string): Promise<ApiKey[]>;
521
+ generateTypescriptTypes(projectId: string): Promise<GenerateTypescriptTypesResult>;
522
+ };
523
+ type StorageOperations = {
524
+ getStorageConfig(projectId: string): Promise<StorageConfig>;
525
+ updateStorageConfig(projectId: string, config: StorageConfig): Promise<void>;
526
+ listAllBuckets(projectId: string): Promise<StorageBucket[]>;
527
+ };
528
+ type BranchingOperations = {
529
+ listBranches(projectId: string): Promise<Branch[]>;
530
+ createBranch(projectId: string, options: CreateBranchOptions): Promise<Branch>;
531
+ deleteBranch(branchId: string): Promise<void>;
532
+ mergeBranch(branchId: string): Promise<void>;
533
+ resetBranch(branchId: string, options: ResetBranchOptions): Promise<void>;
534
+ rebaseBranch(branchId: string): Promise<void>;
535
+ };
536
+ /**
537
+ * Returns only the `updated_at` timestamp of the named secret, never its
538
+ * value or digest.
539
+ */
540
+ type SecretOperations = {
541
+ getUpdatedAt(projectId: string, name: string): Promise<Date | undefined>;
542
+ };
543
+ type NotebookOperations = {
544
+ /** Optional for platforms that only support reading notebooks. */
545
+ createNotebook?(projectId: string, options: CreateNotebookOptions): Promise<NotebookWithContent>;
546
+ listNotebooks(projectId: string): Promise<Notebook[]>;
547
+ getNotebook(projectId: string, notebookId: string): Promise<NotebookWithContent>;
548
+ deleteNotebook(projectId: string, notebookId: string): Promise<void>;
549
+ };
550
+ type FeedbackOperations = {
551
+ submit(input: {
552
+ feedback: string;
553
+ projectId?: string;
554
+ clientInfo?: {
555
+ name: string;
556
+ version: string;
557
+ };
558
+ }): Promise<{
559
+ deleteToken: string;
560
+ }>;
561
+ delete(input: {
562
+ deleteToken: string;
563
+ projectId?: string;
564
+ }): Promise<{
565
+ deleted: boolean;
566
+ }>;
567
+ };
568
+ type SupabasePlatform = {
569
+ init?(info: InitData): Promise<void>;
570
+ account?: AccountOperations;
571
+ database?: DatabaseOperations;
572
+ functions?: EdgeFunctionsOperations;
573
+ debugging?: DebuggingOperations;
574
+ development?: DevelopmentOperations;
575
+ storage?: StorageOperations;
576
+ branching?: BranchingOperations;
577
+ secrets?: SecretOperations;
578
+ notebooks?: NotebookOperations;
579
+ feedback?: FeedbackOperations;
580
+ };
581
+
582
+ export { apiKeyTypeSchema as $, type ExecuteSqlOptions as A, type Branch as B, type CreateProjectOptions as C, type DeployEdgeFunctionOptions as D, type EdgeFunction as E, type ApplyMigrationOptions as F, type LogsService as G, type GetLogsOptions as H, type GenerateTypescriptTypesResult as I, type StorageConfig as J, type StorageBucket as K, type ListMigrationsResult as L, type Migration as M, type NotebookCell as N, type Organization as O, type Project as P, type QueryLogsOptions as Q, ResultTooLargeError as R, type SupabasePlatform as S, type CreateNotebookOptions as T, type Notebook as U, type NotebookWithContent as V, type DatabaseOperations as W, type AccountOperations as X, type EdgeFunctionsOperations as Y, type LogsDialect as Z, type DebuggingOperations as _, type SuccessResponse as a, type ApiKeyType as a0, type ApiKey as a1, type DevelopmentOperations as a2, type StorageOperations as a3, type BranchingOperations as a4, type SecretOperations as a5, type NotebookOperations as a6, type FeedbackOperations as a7, storageConfigSchema as b, branchSchema as c, edgeFunctionWithBodySchema as d, edgeFunctionSchema as e, createProjectOptionsSchema as f, createBranchOptionsSchema as g, deployEdgeFunctionOptionsSchema as h, executeSqlOptionsSchema as i, applyMigrationOptionsSchema as j, getLogsOptionsSchema as k, logsServiceSchema as l, migrationSchema as m, generateTypescriptTypesResultSchema as n, organizationSchema as o, projectSchema as p, queryLogsOptionsSchema as q, resetBranchOptionsSchema as r, storageBucketSchema as s, notebookCellSchema as t, createNotebookOptionsSchema as u, notebookSchema as v, notebookWithContentSchema as w, type EdgeFunctionWithBody as x, type CreateBranchOptions as y, type ResetBranchOptions as z };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@supabase/mcp-server-supabase",
3
3
  "mcpName": "com.supabase/mcp",
4
- "version": "0.17.0",
4
+ "version": "0.19.0",
5
5
  "description": "MCP server for interacting with Supabase",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "gqlmin": "^0.3.1",
43
43
  "graphql": "^16.11.0",
44
44
  "openapi-fetch": "^0.13.5",
45
- "@supabase/mcp-utils": "^0.10.0"
45
+ "@supabase/mcp-utils": "^0.11.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@modelcontextprotocol/server": "^2.0.0",
@@ -53,6 +53,7 @@
53
53
  "@ai-sdk/mcp": "^1.0.21",
54
54
  "@electric-sql/pglite": "^0.2.17",
55
55
  "@modelcontextprotocol/client": "^2.0.0",
56
+ "@modelcontextprotocol/ext-apps": "^2.0.4",
56
57
  "@modelcontextprotocol/server": "^2.0.0",
57
58
  "@total-typescript/tsconfig": "^1.0.4",
58
59
  "@types/common-tags": "^1.8.4",
@@ -71,7 +72,8 @@
71
72
  "typescript": "^5.6.3",
72
73
  "vite": "^5.4.19",
73
74
  "vitest": "^2.1.9",
74
- "zod": "^3.25.0 || ^4.0.0"
75
+ "zod": "^3.25.0 || ^4.0.0",
76
+ "@supabase/mcp-ui": "0.0.0"
75
77
  },
76
78
  "scripts": {
77
79
  "build": "tsup --clean",
@@ -86,6 +88,8 @@
86
88
  "test:e2e": "vitest --project e2e",
87
89
  "test:integration": "vitest --project integration",
88
90
  "test:coverage": "vitest --coverage",
91
+ "mock-api": "tsx dev/mock-api.ts",
92
+ "typecheck:dev": "tsc --noEmit -p dev/tsconfig.json",
89
93
  "generate:management-api-types": "node scripts/generate-management-api-types.mjs"
90
94
  }
91
95
  }
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _v4 = require('zod/v4');var n=["us-west-1","us-east-1","us-east-2","ca-central-1","eu-west-1","eu-west-2","eu-west-3","eu-central-1","eu-central-2","eu-north-1","ap-south-1","ap-southeast-1","ap-northeast-1","ap-northeast-2","ap-southeast-2","sa-east-1"];var x=_v4.z.object({id:_v4.z.string(),name:_v4.z.string(),owner:_v4.z.string(),created_at:_v4.z.string(),updated_at:_v4.z.string(),public:_v4.z.boolean()}),_= exports.c =_v4.z.object({fileSizeLimit:_v4.z.number().int().min(0).max(536870912e3),features:_v4.z.object({imageTransformation:_v4.z.object({enabled:_v4.z.boolean()}),s3Protocol:_v4.z.object({enabled:_v4.z.boolean()})})}),O= exports.d =_v4.z.object({id:_v4.z.string(),name:_v4.z.string(),plan:_v4.z.string().optional(),allowed_release_channels:_v4.z.array(_v4.z.string()),opt_in_tags:_v4.z.array(_v4.z.string())}),P= exports.e =_v4.z.object({id:_v4.z.string(),ref:_v4.z.string(),organization_id:_v4.z.string(),organization_slug:_v4.z.string(),name:_v4.z.string(),status:_v4.z.string(),created_at:_v4.z.string(),region:_v4.z.string()}),k= exports.f =_v4.z.object({id:_v4.z.string(),name:_v4.z.string(),project_ref:_v4.z.string(),parent_project_ref:_v4.z.string(),is_default:_v4.z.boolean(),git_branch:_v4.z.string().optional(),pr_number:_v4.z.number().optional(),latest_check_run_id:_v4.z.number().optional(),persistent:_v4.z.boolean(),status:_v4.z.enum(["CREATING_PROJECT","RUNNING_MIGRATIONS","MIGRATIONS_PASSED","MIGRATIONS_FAILED","FUNCTIONS_DEPLOYED","FUNCTIONS_FAILED"]),created_at:_v4.z.string(),updated_at:_v4.z.string()}),l= exports.g =_v4.z.object({id:_v4.z.string(),slug:_v4.z.string(),name:_v4.z.string(),status:_v4.z.string(),version:_v4.z.number(),created_at:_v4.z.number().optional(),updated_at:_v4.z.number().optional(),verify_jwt:_v4.z.boolean().optional(),import_map:_v4.z.boolean().optional(),import_map_path:_v4.z.string().optional(),entrypoint_path:_v4.z.string().optional()}),I= exports.h =l.extend({files:_v4.z.array(_v4.z.object({name:_v4.z.string(),content:_v4.z.string()}))}),v= exports.i =_v4.z.object({name:_v4.z.string().min(1).max(256),organization_id:_v4.z.string(),region:_v4.z.enum(n),db_pass:_v4.z.string().optional()}),z= exports.j =_v4.z.object({name:_v4.z.string().min(1)}),C= exports.k =_v4.z.object({migration_version:_v4.z.string().optional()}),N= exports.l =_v4.z.object({name:_v4.z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/),entrypoint_path:_v4.z.string(),import_map_path:_v4.z.string().optional(),verify_jwt:_v4.z.boolean().optional(),files:_v4.z.array(_v4.z.object({name:_v4.z.string(),content:_v4.z.string()}))}),r= exports.m = (_class =class extends Error{constructor(...args) { super(...args); _class.prototype.__init.call(this); }__init() {this.name="ResultTooLargeError"}}, _class),T= exports.n =_v4.z.object({query:_v4.z.string().min(1),parameters:_v4.z.array(_v4.z.unknown()).optional(),read_only:_v4.z.boolean().optional(),max_result_bytes:_v4.z.number().int().nonnegative().optional()}),B= exports.o =_v4.z.object({name:_v4.z.string().min(1),query:_v4.z.string().min(1)}),E= exports.p =_v4.z.object({version:_v4.z.string(),name:_v4.z.string().optional()}),d= exports.q =_v4.z.enum(["api","branch-action","postgres","edge-function","edge-function-runtime","auth","storage","realtime"]),w= exports.r =_v4.z.object({service:d,iso_timestamp_start:_v4.z.string().optional(),iso_timestamp_end:_v4.z.string().optional()}),A= exports.s =_v4.z.object({sql:_v4.z.string().min(1),iso_timestamp_start:_v4.z.string().optional(),iso_timestamp_end:_v4.z.string().optional(),max_result_bytes:_v4.z.number().int().nonnegative().optional()}),D= exports.t =_v4.z.object({types:_v4.z.string()}),i=_v4.z.object({id:_v4.z.number(),username:_v4.z.string()}).nullable(),t=_v4.z.object({type:_v4.z.enum(["bar","line"]),x_column:_v4.z.string(),y_series:_v4.z.array(_v4.z.object({column:_v4.z.string()})),scale:_v4.z.enum(["linear","log"]),cumulative:_v4.z.boolean(),show_labels:_v4.z.boolean()}),p=_v4.z.object({id:_v4.z.string(),type:_v4.z.literal("markdown"),text:_v4.z.string()}),c=_v4.z.object({id:_v4.z.string(),type:_v4.z.literal("database"),sql:_v4.z.string(),row_limit:_v4.z.number(),database_identifier:_v4.z.string().optional(),title:_v4.z.string().optional(),view:_v4.z.enum(["table","chart"]).optional(),chart:t.optional()}),g=_v4.z.enum(["minute","hour","day","week","month","year"]),u=_v4.z.union([_v4.z.object({type:_v4.z.literal("absolute"),start:_v4.z.string(),end:_v4.z.string()}),_v4.z.object({type:_v4.z.literal("relative"),unit:g,amount:_v4.z.number()})]),m=_v4.z.object({id:_v4.z.string(),type:_v4.z.literal("log"),sql:_v4.z.string(),time_range:u,title:_v4.z.string().optional(),view:_v4.z.enum(["table","chart"]).optional(),chart:t.optional()}),b= exports.u =_v4.z.discriminatedUnion("type",[p,c,m]),s=t.extend({y_series:_v4.z.array(t.shape.y_series.element.strict())}).strict(),a=_v4.z.string().trim().min(1),y=_v4.z.discriminatedUnion("type",[p.omit({id:!0}).strict(),c.omit({id:!0}).extend({sql:a,row_limit:_v4.z.number().int().positive(),database_identifier:_v4.z.string().min(1).optional(),chart:s.optional()}).strict(),m.omit({id:!0}).extend({sql:a,time_range:_v4.z.discriminatedUnion("type",[_v4.z.object({type:_v4.z.literal("absolute"),start:_v4.z.iso.datetime({offset:!0}),end:_v4.z.iso.datetime({offset:!0})}).strict().refine(o=>Date.parse(o.end)>Date.parse(o.start),{message:"The end must be later than the start of the range.",path:["end"]}),_v4.z.object({type:_v4.z.literal("relative"),unit:g,amount:_v4.z.number().int().positive()}).strict()]),chart:s.optional()}).strict()]),F= exports.v =_v4.z.object({name:_v4.z.string().trim().min(1),description:_v4.z.string().optional(),content:_v4.z.object({cells:_v4.z.array(y)})}),h= exports.w =_v4.z.object({id:_v4.z.string(),name:_v4.z.string(),description:_v4.z.string().nullable(),favorite:_v4.z.boolean(),inserted_at:_v4.z.string(),updated_at:_v4.z.string(),owner:i,updated_by:i}),L= exports.x =h.extend({content:_v4.z.object({schema_version:_v4.z.number(),cells:_v4.z.array(b)})}),q= exports.y =_v4.z.enum(["legacy","publishable"]);exports.a = n; exports.b = x; exports.c = _; exports.d = O; exports.e = P; exports.f = k; exports.g = l; exports.h = I; exports.i = v; exports.j = z; exports.k = C; exports.l = N; exports.m = r; exports.n = T; exports.o = B; exports.p = E; exports.q = d; exports.r = w; exports.s = A; exports.t = D; exports.u = b; exports.v = F; exports.w = h; exports.x = L; exports.y = q;
2
- //# sourceMappingURL=chunk-6FWRABME.cjs.map