@supabase/mcp-server-supabase 0.5.10 → 0.6.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.
- package/dist/chunk-2MMXINTQ.js +40 -0
- package/dist/{chunk-GYDVBUXB.js.map → chunk-2MMXINTQ.js.map} +1 -1
- package/dist/chunk-ILS2BP3W.cjs +272 -0
- package/dist/chunk-ILS2BP3W.cjs.map +1 -0
- package/dist/{chunk-QUBGHZKE.cjs → chunk-QR6DQNIA.cjs} +3 -3
- package/dist/{chunk-QUBGHZKE.cjs.map → chunk-QR6DQNIA.cjs.map} +1 -1
- package/dist/chunk-ZU2DJR27.js +272 -0
- package/dist/chunk-ZU2DJR27.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -4
- package/dist/index.d.ts +15 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/platform/api-platform.cjs +1 -1
- package/dist/platform/api-platform.d.cts +1 -1
- package/dist/platform/api-platform.d.ts +1 -1
- package/dist/platform/api-platform.js +1 -1
- package/dist/platform/index.cjs +1 -1
- package/dist/platform/index.d.cts +72 -274
- package/dist/platform/index.d.ts +72 -274
- package/dist/platform/index.js +1 -1
- package/dist/transports/stdio.cjs +1 -1
- package/dist/transports/stdio.js +1 -1
- package/package.json +15 -7
- package/dist/chunk-GYDVBUXB.js +0 -40
- package/dist/chunk-TOWYE6YC.js +0 -272
- package/dist/chunk-TOWYE6YC.js.map +0 -1
- package/dist/chunk-YK7IDQ6C.cjs +0 -272
- package/dist/chunk-YK7IDQ6C.cjs.map +0 -1
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InitData } from '@supabase/mcp-utils';
|
|
2
|
-
import { z } from 'zod';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
3
|
|
|
4
4
|
type SuccessResponse = {
|
|
5
5
|
success: true;
|
|
@@ -11,93 +11,25 @@ declare const storageBucketSchema: z.ZodObject<{
|
|
|
11
11
|
created_at: z.ZodString;
|
|
12
12
|
updated_at: z.ZodString;
|
|
13
13
|
public: z.ZodBoolean;
|
|
14
|
-
},
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
created_at: string;
|
|
18
|
-
updated_at: string;
|
|
19
|
-
public: boolean;
|
|
20
|
-
owner: string;
|
|
21
|
-
}, {
|
|
22
|
-
id: string;
|
|
23
|
-
name: string;
|
|
24
|
-
created_at: string;
|
|
25
|
-
updated_at: string;
|
|
26
|
-
public: boolean;
|
|
27
|
-
owner: string;
|
|
28
|
-
}>;
|
|
14
|
+
}, z.core.$strip>;
|
|
29
15
|
declare const storageConfigSchema: z.ZodObject<{
|
|
30
16
|
fileSizeLimit: z.ZodNumber;
|
|
31
17
|
features: z.ZodObject<{
|
|
32
18
|
imageTransformation: z.ZodObject<{
|
|
33
19
|
enabled: z.ZodBoolean;
|
|
34
|
-
},
|
|
35
|
-
enabled: boolean;
|
|
36
|
-
}, {
|
|
37
|
-
enabled: boolean;
|
|
38
|
-
}>;
|
|
20
|
+
}, z.core.$strip>;
|
|
39
21
|
s3Protocol: z.ZodObject<{
|
|
40
22
|
enabled: z.ZodBoolean;
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
enabled: boolean;
|
|
45
|
-
}>;
|
|
46
|
-
}, "strip", z.ZodTypeAny, {
|
|
47
|
-
imageTransformation: {
|
|
48
|
-
enabled: boolean;
|
|
49
|
-
};
|
|
50
|
-
s3Protocol: {
|
|
51
|
-
enabled: boolean;
|
|
52
|
-
};
|
|
53
|
-
}, {
|
|
54
|
-
imageTransformation: {
|
|
55
|
-
enabled: boolean;
|
|
56
|
-
};
|
|
57
|
-
s3Protocol: {
|
|
58
|
-
enabled: boolean;
|
|
59
|
-
};
|
|
60
|
-
}>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
fileSizeLimit: number;
|
|
63
|
-
features: {
|
|
64
|
-
imageTransformation: {
|
|
65
|
-
enabled: boolean;
|
|
66
|
-
};
|
|
67
|
-
s3Protocol: {
|
|
68
|
-
enabled: boolean;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
}, {
|
|
72
|
-
fileSizeLimit: number;
|
|
73
|
-
features: {
|
|
74
|
-
imageTransformation: {
|
|
75
|
-
enabled: boolean;
|
|
76
|
-
};
|
|
77
|
-
s3Protocol: {
|
|
78
|
-
enabled: boolean;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
}>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
}, z.core.$strip>;
|
|
82
26
|
declare const organizationSchema: z.ZodObject<{
|
|
83
27
|
id: z.ZodString;
|
|
84
28
|
name: z.ZodString;
|
|
85
29
|
plan: z.ZodOptional<z.ZodString>;
|
|
86
|
-
allowed_release_channels: z.ZodArray<z.ZodString
|
|
87
|
-
opt_in_tags: z.ZodArray<z.ZodString
|
|
88
|
-
},
|
|
89
|
-
id: string;
|
|
90
|
-
name: string;
|
|
91
|
-
allowed_release_channels: string[];
|
|
92
|
-
opt_in_tags: string[];
|
|
93
|
-
plan?: string | undefined;
|
|
94
|
-
}, {
|
|
95
|
-
id: string;
|
|
96
|
-
name: string;
|
|
97
|
-
allowed_release_channels: string[];
|
|
98
|
-
opt_in_tags: string[];
|
|
99
|
-
plan?: string | undefined;
|
|
100
|
-
}>;
|
|
30
|
+
allowed_release_channels: z.ZodArray<z.ZodString>;
|
|
31
|
+
opt_in_tags: z.ZodArray<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
101
33
|
declare const projectSchema: z.ZodObject<{
|
|
102
34
|
id: z.ZodString;
|
|
103
35
|
organization_id: z.ZodString;
|
|
@@ -105,21 +37,7 @@ declare const projectSchema: z.ZodObject<{
|
|
|
105
37
|
status: z.ZodString;
|
|
106
38
|
created_at: z.ZodString;
|
|
107
39
|
region: z.ZodString;
|
|
108
|
-
},
|
|
109
|
-
status: string;
|
|
110
|
-
id: string;
|
|
111
|
-
name: string;
|
|
112
|
-
organization_id: string;
|
|
113
|
-
created_at: string;
|
|
114
|
-
region: string;
|
|
115
|
-
}, {
|
|
116
|
-
status: string;
|
|
117
|
-
id: string;
|
|
118
|
-
name: string;
|
|
119
|
-
organization_id: string;
|
|
120
|
-
created_at: string;
|
|
121
|
-
region: string;
|
|
122
|
-
}>;
|
|
40
|
+
}, z.core.$strip>;
|
|
123
41
|
declare const branchSchema: z.ZodObject<{
|
|
124
42
|
id: z.ZodString;
|
|
125
43
|
name: z.ZodString;
|
|
@@ -130,36 +48,17 @@ declare const branchSchema: z.ZodObject<{
|
|
|
130
48
|
pr_number: z.ZodOptional<z.ZodNumber>;
|
|
131
49
|
latest_check_run_id: z.ZodOptional<z.ZodNumber>;
|
|
132
50
|
persistent: z.ZodBoolean;
|
|
133
|
-
status: z.ZodEnum<
|
|
51
|
+
status: z.ZodEnum<{
|
|
52
|
+
CREATING_PROJECT: "CREATING_PROJECT";
|
|
53
|
+
RUNNING_MIGRATIONS: "RUNNING_MIGRATIONS";
|
|
54
|
+
MIGRATIONS_PASSED: "MIGRATIONS_PASSED";
|
|
55
|
+
MIGRATIONS_FAILED: "MIGRATIONS_FAILED";
|
|
56
|
+
FUNCTIONS_DEPLOYED: "FUNCTIONS_DEPLOYED";
|
|
57
|
+
FUNCTIONS_FAILED: "FUNCTIONS_FAILED";
|
|
58
|
+
}>;
|
|
134
59
|
created_at: z.ZodString;
|
|
135
60
|
updated_at: z.ZodString;
|
|
136
|
-
},
|
|
137
|
-
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
138
|
-
id: string;
|
|
139
|
-
name: string;
|
|
140
|
-
created_at: string;
|
|
141
|
-
project_ref: string;
|
|
142
|
-
parent_project_ref: string;
|
|
143
|
-
is_default: boolean;
|
|
144
|
-
persistent: boolean;
|
|
145
|
-
updated_at: string;
|
|
146
|
-
git_branch?: string | undefined;
|
|
147
|
-
pr_number?: number | undefined;
|
|
148
|
-
latest_check_run_id?: number | undefined;
|
|
149
|
-
}, {
|
|
150
|
-
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
151
|
-
id: string;
|
|
152
|
-
name: string;
|
|
153
|
-
created_at: string;
|
|
154
|
-
project_ref: string;
|
|
155
|
-
parent_project_ref: string;
|
|
156
|
-
is_default: boolean;
|
|
157
|
-
persistent: boolean;
|
|
158
|
-
updated_at: string;
|
|
159
|
-
git_branch?: string | undefined;
|
|
160
|
-
pr_number?: number | undefined;
|
|
161
|
-
latest_check_run_id?: number | undefined;
|
|
162
|
-
}>;
|
|
61
|
+
}, z.core.$strip>;
|
|
163
62
|
declare const edgeFunctionSchema: z.ZodObject<{
|
|
164
63
|
id: z.ZodString;
|
|
165
64
|
slug: z.ZodString;
|
|
@@ -172,31 +71,7 @@ declare const edgeFunctionSchema: z.ZodObject<{
|
|
|
172
71
|
import_map: z.ZodOptional<z.ZodBoolean>;
|
|
173
72
|
import_map_path: z.ZodOptional<z.ZodString>;
|
|
174
73
|
entrypoint_path: z.ZodOptional<z.ZodString>;
|
|
175
|
-
},
|
|
176
|
-
status: string;
|
|
177
|
-
id: string;
|
|
178
|
-
name: string;
|
|
179
|
-
version: number;
|
|
180
|
-
slug: string;
|
|
181
|
-
created_at?: number | undefined;
|
|
182
|
-
updated_at?: number | undefined;
|
|
183
|
-
verify_jwt?: boolean | undefined;
|
|
184
|
-
import_map?: boolean | undefined;
|
|
185
|
-
import_map_path?: string | undefined;
|
|
186
|
-
entrypoint_path?: string | undefined;
|
|
187
|
-
}, {
|
|
188
|
-
status: string;
|
|
189
|
-
id: string;
|
|
190
|
-
name: string;
|
|
191
|
-
version: number;
|
|
192
|
-
slug: string;
|
|
193
|
-
created_at?: number | undefined;
|
|
194
|
-
updated_at?: number | undefined;
|
|
195
|
-
verify_jwt?: boolean | undefined;
|
|
196
|
-
import_map?: boolean | undefined;
|
|
197
|
-
import_map_path?: string | undefined;
|
|
198
|
-
entrypoint_path?: string | undefined;
|
|
199
|
-
}>;
|
|
74
|
+
}, z.core.$strip>;
|
|
200
75
|
declare const edgeFunctionWithBodySchema: z.ZodObject<{
|
|
201
76
|
id: z.ZodString;
|
|
202
77
|
slug: z.ZodString;
|
|
@@ -209,80 +84,40 @@ declare const edgeFunctionWithBodySchema: z.ZodObject<{
|
|
|
209
84
|
import_map: z.ZodOptional<z.ZodBoolean>;
|
|
210
85
|
import_map_path: z.ZodOptional<z.ZodString>;
|
|
211
86
|
entrypoint_path: z.ZodOptional<z.ZodString>;
|
|
212
|
-
} & {
|
|
213
87
|
files: z.ZodArray<z.ZodObject<{
|
|
214
88
|
name: z.ZodString;
|
|
215
89
|
content: z.ZodString;
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
content: string;
|
|
219
|
-
}, {
|
|
220
|
-
name: string;
|
|
221
|
-
content: string;
|
|
222
|
-
}>, "many">;
|
|
223
|
-
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
status: string;
|
|
225
|
-
id: string;
|
|
226
|
-
name: string;
|
|
227
|
-
version: number;
|
|
228
|
-
slug: string;
|
|
229
|
-
files: {
|
|
230
|
-
name: string;
|
|
231
|
-
content: string;
|
|
232
|
-
}[];
|
|
233
|
-
created_at?: number | undefined;
|
|
234
|
-
updated_at?: number | undefined;
|
|
235
|
-
verify_jwt?: boolean | undefined;
|
|
236
|
-
import_map?: boolean | undefined;
|
|
237
|
-
import_map_path?: string | undefined;
|
|
238
|
-
entrypoint_path?: string | undefined;
|
|
239
|
-
}, {
|
|
240
|
-
status: string;
|
|
241
|
-
id: string;
|
|
242
|
-
name: string;
|
|
243
|
-
version: number;
|
|
244
|
-
slug: string;
|
|
245
|
-
files: {
|
|
246
|
-
name: string;
|
|
247
|
-
content: string;
|
|
248
|
-
}[];
|
|
249
|
-
created_at?: number | undefined;
|
|
250
|
-
updated_at?: number | undefined;
|
|
251
|
-
verify_jwt?: boolean | undefined;
|
|
252
|
-
import_map?: boolean | undefined;
|
|
253
|
-
import_map_path?: string | undefined;
|
|
254
|
-
entrypoint_path?: string | undefined;
|
|
255
|
-
}>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
256
92
|
declare const createProjectOptionsSchema: z.ZodObject<{
|
|
257
93
|
name: z.ZodString;
|
|
258
94
|
organization_id: z.ZodString;
|
|
259
|
-
region: z.ZodEnum<
|
|
95
|
+
region: z.ZodEnum<{
|
|
96
|
+
"us-west-1": "us-west-1";
|
|
97
|
+
"us-east-1": "us-east-1";
|
|
98
|
+
"us-east-2": "us-east-2";
|
|
99
|
+
"ca-central-1": "ca-central-1";
|
|
100
|
+
"eu-west-1": "eu-west-1";
|
|
101
|
+
"eu-west-2": "eu-west-2";
|
|
102
|
+
"eu-west-3": "eu-west-3";
|
|
103
|
+
"eu-central-1": "eu-central-1";
|
|
104
|
+
"eu-central-2": "eu-central-2";
|
|
105
|
+
"eu-north-1": "eu-north-1";
|
|
106
|
+
"ap-south-1": "ap-south-1";
|
|
107
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
108
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
109
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
110
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
111
|
+
"sa-east-1": "sa-east-1";
|
|
112
|
+
}>;
|
|
260
113
|
db_pass: z.ZodOptional<z.ZodString>;
|
|
261
|
-
},
|
|
262
|
-
name: string;
|
|
263
|
-
organization_id: string;
|
|
264
|
-
region: "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";
|
|
265
|
-
db_pass?: string | undefined;
|
|
266
|
-
}, {
|
|
267
|
-
name: string;
|
|
268
|
-
organization_id: string;
|
|
269
|
-
region: "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";
|
|
270
|
-
db_pass?: string | undefined;
|
|
271
|
-
}>;
|
|
114
|
+
}, z.core.$strip>;
|
|
272
115
|
declare const createBranchOptionsSchema: z.ZodObject<{
|
|
273
116
|
name: z.ZodString;
|
|
274
|
-
},
|
|
275
|
-
name: string;
|
|
276
|
-
}, {
|
|
277
|
-
name: string;
|
|
278
|
-
}>;
|
|
117
|
+
}, z.core.$strip>;
|
|
279
118
|
declare const resetBranchOptionsSchema: z.ZodObject<{
|
|
280
119
|
migration_version: z.ZodOptional<z.ZodString>;
|
|
281
|
-
},
|
|
282
|
-
migration_version?: string | undefined;
|
|
283
|
-
}, {
|
|
284
|
-
migration_version?: string | undefined;
|
|
285
|
-
}>;
|
|
120
|
+
}, z.core.$strip>;
|
|
286
121
|
declare const deployEdgeFunctionOptionsSchema: z.ZodObject<{
|
|
287
122
|
name: z.ZodString;
|
|
288
123
|
entrypoint_path: z.ZodString;
|
|
@@ -291,86 +126,46 @@ declare const deployEdgeFunctionOptionsSchema: z.ZodObject<{
|
|
|
291
126
|
files: z.ZodArray<z.ZodObject<{
|
|
292
127
|
name: z.ZodString;
|
|
293
128
|
content: z.ZodString;
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
content: string;
|
|
297
|
-
}, {
|
|
298
|
-
name: string;
|
|
299
|
-
content: string;
|
|
300
|
-
}>, "many">;
|
|
301
|
-
}, "strip", z.ZodTypeAny, {
|
|
302
|
-
name: string;
|
|
303
|
-
entrypoint_path: string;
|
|
304
|
-
files: {
|
|
305
|
-
name: string;
|
|
306
|
-
content: string;
|
|
307
|
-
}[];
|
|
308
|
-
verify_jwt?: boolean | undefined;
|
|
309
|
-
import_map_path?: string | undefined;
|
|
310
|
-
}, {
|
|
311
|
-
name: string;
|
|
312
|
-
entrypoint_path: string;
|
|
313
|
-
files: {
|
|
314
|
-
name: string;
|
|
315
|
-
content: string;
|
|
316
|
-
}[];
|
|
317
|
-
verify_jwt?: boolean | undefined;
|
|
318
|
-
import_map_path?: string | undefined;
|
|
319
|
-
}>;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
320
131
|
declare const executeSqlOptionsSchema: z.ZodObject<{
|
|
321
132
|
query: z.ZodString;
|
|
322
|
-
parameters: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
133
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
323
134
|
read_only: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
-
},
|
|
325
|
-
query: string;
|
|
326
|
-
parameters?: unknown[] | undefined;
|
|
327
|
-
read_only?: boolean | undefined;
|
|
328
|
-
}, {
|
|
329
|
-
query: string;
|
|
330
|
-
parameters?: unknown[] | undefined;
|
|
331
|
-
read_only?: boolean | undefined;
|
|
332
|
-
}>;
|
|
135
|
+
}, z.core.$strip>;
|
|
333
136
|
declare const applyMigrationOptionsSchema: z.ZodObject<{
|
|
334
137
|
name: z.ZodString;
|
|
335
138
|
query: z.ZodString;
|
|
336
|
-
},
|
|
337
|
-
query: string;
|
|
338
|
-
name: string;
|
|
339
|
-
}, {
|
|
340
|
-
query: string;
|
|
341
|
-
name: string;
|
|
342
|
-
}>;
|
|
139
|
+
}, z.core.$strip>;
|
|
343
140
|
declare const migrationSchema: z.ZodObject<{
|
|
344
141
|
version: z.ZodString;
|
|
345
142
|
name: z.ZodOptional<z.ZodString>;
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
declare const logsServiceSchema: z.ZodEnum<{
|
|
145
|
+
api: "api";
|
|
146
|
+
"branch-action": "branch-action";
|
|
147
|
+
postgres: "postgres";
|
|
148
|
+
"edge-function": "edge-function";
|
|
149
|
+
auth: "auth";
|
|
150
|
+
storage: "storage";
|
|
151
|
+
realtime: "realtime";
|
|
352
152
|
}>;
|
|
353
|
-
declare const logsServiceSchema: z.ZodEnum<["api", "branch-action", "postgres", "edge-function", "auth", "storage", "realtime"]>;
|
|
354
153
|
declare const getLogsOptionsSchema: z.ZodObject<{
|
|
355
|
-
service: z.ZodEnum<
|
|
154
|
+
service: z.ZodEnum<{
|
|
155
|
+
api: "api";
|
|
156
|
+
"branch-action": "branch-action";
|
|
157
|
+
postgres: "postgres";
|
|
158
|
+
"edge-function": "edge-function";
|
|
159
|
+
auth: "auth";
|
|
160
|
+
storage: "storage";
|
|
161
|
+
realtime: "realtime";
|
|
162
|
+
}>;
|
|
356
163
|
iso_timestamp_start: z.ZodOptional<z.ZodString>;
|
|
357
164
|
iso_timestamp_end: z.ZodOptional<z.ZodString>;
|
|
358
|
-
},
|
|
359
|
-
service: "api" | "branch-action" | "postgres" | "edge-function" | "auth" | "storage" | "realtime";
|
|
360
|
-
iso_timestamp_start?: string | undefined;
|
|
361
|
-
iso_timestamp_end?: string | undefined;
|
|
362
|
-
}, {
|
|
363
|
-
service: "api" | "branch-action" | "postgres" | "edge-function" | "auth" | "storage" | "realtime";
|
|
364
|
-
iso_timestamp_start?: string | undefined;
|
|
365
|
-
iso_timestamp_end?: string | undefined;
|
|
366
|
-
}>;
|
|
165
|
+
}, z.core.$strip>;
|
|
367
166
|
declare const generateTypescriptTypesResultSchema: z.ZodObject<{
|
|
368
167
|
types: z.ZodString;
|
|
369
|
-
},
|
|
370
|
-
types: string;
|
|
371
|
-
}, {
|
|
372
|
-
types: string;
|
|
373
|
-
}>;
|
|
168
|
+
}, z.core.$strip>;
|
|
374
169
|
type Organization = z.infer<typeof organizationSchema>;
|
|
375
170
|
type Project = z.infer<typeof projectSchema>;
|
|
376
171
|
type Branch = z.infer<typeof branchSchema>;
|
|
@@ -413,7 +208,10 @@ type DebuggingOperations = {
|
|
|
413
208
|
getSecurityAdvisors(projectId: string): Promise<unknown>;
|
|
414
209
|
getPerformanceAdvisors(projectId: string): Promise<unknown>;
|
|
415
210
|
};
|
|
416
|
-
declare const apiKeyTypeSchema: z.ZodEnum<
|
|
211
|
+
declare const apiKeyTypeSchema: z.ZodEnum<{
|
|
212
|
+
legacy: "legacy";
|
|
213
|
+
publishable: "publishable";
|
|
214
|
+
}>;
|
|
417
215
|
type ApiKeyType = z.infer<typeof apiKeyTypeSchema>;
|
|
418
216
|
type ApiKey = {
|
|
419
217
|
api_key: string;
|
package/dist/platform/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-LU6L7C36.js";import{
|
|
1
|
+
import"../chunk-LU6L7C36.js";import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r}from"../chunk-ZU2DJR27.js";export{r as apiKeyTypeSchema,m as applyMigrationOptionsSchema,e as branchSchema,i as createBranchOptionsSchema,h as createProjectOptionsSchema,k as deployEdgeFunctionOptionsSchema,f as edgeFunctionSchema,g as edgeFunctionWithBodySchema,l as executeSqlOptionsSchema,q as generateTypescriptTypesResultSchema,p as getLogsOptionsSchema,o as logsServiceSchema,n as migrationSchema,c as organizationSchema,d as projectSchema,j as resetBranchOptionsSchema,a as storageBucketSchema,b as storageConfigSchema};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var
|
|
2
|
+
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkQR6DQNIAcjs = require('../chunk-QR6DQNIA.cjs');require('../chunk-PHWSETKC.cjs');var _chunkILS2BP3Wcjs = require('../chunk-ILS2BP3W.cjs');var _stdiojs = require('@modelcontextprotocol/sdk/server/stdio.js');var _util = require('util');function p(r,o=","){return r.split(o).map(e=>e.trim()).filter(e=>e!=="")}var{version:d}=_chunkILS2BP3Wcjs.a;async function g(){let{values:{["access-token"]:r,["project-ref"]:o,["read-only"]:t,["api-url"]:e,["version"]:l,["features"]:s}}=_util.parseArgs.call(void 0, {options:{"access-token":{type:"string"},"project-ref":{type:"string"},"read-only":{type:"boolean",default:!1},"api-url":{type:"string"},version:{type:"boolean"},features:{type:"string"}}});l&&(console.log(d),process.exit(0));let n=_nullishCoalesce(r, () => (process.env.SUPABASE_ACCESS_TOKEN));n||(console.error("Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable"),process.exit(1));let f=s?p(s):void 0,m=_chunkQR6DQNIAcjs.a.call(void 0, {accessToken:n,apiUrl:e}),u=_chunkILS2BP3Wcjs.w.call(void 0, {platform:m,projectId:o,readOnly:t,features:f}),S=new _stdiojs.StdioServerTransport;await u.connect(S)}g().catch(console.error);
|
|
3
3
|
//# sourceMappingURL=stdio.cjs.map
|
package/dist/transports/stdio.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as c}from"../chunk-
|
|
2
|
+
import{a as c}from"../chunk-2MMXINTQ.js";import"../chunk-LU6L7C36.js";import{a,w as i}from"../chunk-ZU2DJR27.js";import{StdioServerTransport as v}from"@modelcontextprotocol/sdk/server/stdio.js";import{parseArgs as y}from"util";function p(r,o=","){return r.split(o).map(e=>e.trim()).filter(e=>e!=="")}var{version:d}=a;async function g(){let{values:{["access-token"]:r,["project-ref"]:o,["read-only"]:t,["api-url"]:e,["version"]:l,["features"]:s}}=y({options:{"access-token":{type:"string"},"project-ref":{type:"string"},"read-only":{type:"boolean",default:!1},"api-url":{type:"string"},version:{type:"boolean"},features:{type:"string"}}});l&&(console.log(d),process.exit(0));let n=r??process.env.SUPABASE_ACCESS_TOKEN;n||(console.error("Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable"),process.exit(1));let f=s?p(s):void 0,m=c({accessToken:n,apiUrl:e}),u=i({platform:m,projectId:o,readOnly:t,features:f}),S=new v;await u.connect(S)}g().catch(console.error);
|
|
3
3
|
//# sourceMappingURL=stdio.js.map
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supabase/mcp-server-supabase",
|
|
3
3
|
"mcpName": "com.supabase/mcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"description": "MCP server for interacting with Supabase",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/supabase-community/supabase-mcp.git"
|
|
10
|
+
},
|
|
7
11
|
"type": "module",
|
|
8
12
|
"main": "dist/index.cjs",
|
|
9
13
|
"types": "dist/index.d.ts",
|
|
@@ -33,22 +37,25 @@
|
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
39
|
"@mjackson/multipart-parser": "^0.10.1",
|
|
36
|
-
"@modelcontextprotocol/sdk": "
|
|
40
|
+
"@modelcontextprotocol/sdk": "1.23.1",
|
|
37
41
|
"common-tags": "^1.8.2",
|
|
38
42
|
"gqlmin": "^0.3.1",
|
|
39
43
|
"graphql": "^16.11.0",
|
|
40
44
|
"openapi-fetch": "^0.13.5",
|
|
41
|
-
"
|
|
42
|
-
|
|
45
|
+
"@supabase/mcp-utils": "^0.3.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"zod": "^3.25.0 || ^4.0.0"
|
|
43
49
|
},
|
|
44
50
|
"devDependencies": {
|
|
45
|
-
"@ai-sdk/anthropic": "^
|
|
51
|
+
"@ai-sdk/anthropic": "^3.0.1",
|
|
52
|
+
"@ai-sdk/mcp": "^1.0.1",
|
|
46
53
|
"@electric-sql/pglite": "^0.2.17",
|
|
47
54
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
48
55
|
"@types/common-tags": "^1.8.4",
|
|
49
56
|
"@types/node": "^22.8.6",
|
|
50
57
|
"@vitest/coverage-v8": "^2.1.9",
|
|
51
|
-
"ai": "^
|
|
58
|
+
"ai": "^6.0.3",
|
|
52
59
|
"date-fns": "^4.1.0",
|
|
53
60
|
"dotenv": "^16.5.0",
|
|
54
61
|
"msw": "^2.7.3",
|
|
@@ -60,7 +67,8 @@
|
|
|
60
67
|
"tsx": "^4.19.2",
|
|
61
68
|
"typescript": "^5.6.3",
|
|
62
69
|
"vite": "^5.4.19",
|
|
63
|
-
"vitest": "^2.1.9"
|
|
70
|
+
"vitest": "^2.1.9",
|
|
71
|
+
"zod": "^3.25.0 || ^4.0.0"
|
|
64
72
|
},
|
|
65
73
|
"scripts": {
|
|
66
74
|
"build": "tsup --clean",
|
package/dist/chunk-GYDVBUXB.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import{a as R,k as C,l as B,m as x,n as M,o as q,p as G,s as L,v as P,w as b}from"./chunk-TOWYE6YC.js";import{getMultipartBoundary as J,parseMultipartStream as V}from"@mjackson/multipart-parser";import{fileURLToPath as T}from"url";import{stripIndent as f}from"common-tags";function D(p,i=100){switch(p){case"api":return f`
|
|
2
|
-
select id, identifier, timestamp, event_message, request.method, request.path, response.status_code
|
|
3
|
-
from edge_logs
|
|
4
|
-
cross join unnest(metadata) as m
|
|
5
|
-
cross join unnest(m.request) as request
|
|
6
|
-
cross join unnest(m.response) as response
|
|
7
|
-
order by timestamp desc
|
|
8
|
-
limit ${i}
|
|
9
|
-
`;case"branch-action":return f`
|
|
10
|
-
select workflow_run, workflow_run_logs.timestamp, id, event_message from workflow_run_logs
|
|
11
|
-
order by timestamp desc
|
|
12
|
-
limit ${i}
|
|
13
|
-
`;case"postgres":return f`
|
|
14
|
-
select identifier, postgres_logs.timestamp, id, event_message, parsed.error_severity from postgres_logs
|
|
15
|
-
cross join unnest(metadata) as m
|
|
16
|
-
cross join unnest(m.parsed) as parsed
|
|
17
|
-
order by timestamp desc
|
|
18
|
-
limit ${i}
|
|
19
|
-
`;case"edge-function":return f`
|
|
20
|
-
select id, function_edge_logs.timestamp, event_message, response.status_code, request.method, m.function_id, m.execution_time_ms, m.deployment_id, m.version from function_edge_logs
|
|
21
|
-
cross join unnest(metadata) as m
|
|
22
|
-
cross join unnest(m.response) as response
|
|
23
|
-
cross join unnest(m.request) as request
|
|
24
|
-
order by timestamp desc
|
|
25
|
-
limit ${i}
|
|
26
|
-
`;case"auth":return f`
|
|
27
|
-
select id, auth_logs.timestamp, event_message, metadata.level, metadata.status, metadata.path, metadata.msg as msg, metadata.error from auth_logs
|
|
28
|
-
cross join unnest(metadata) as metadata
|
|
29
|
-
order by timestamp desc
|
|
30
|
-
limit ${i}
|
|
31
|
-
`;case"storage":return f`
|
|
32
|
-
select id, storage_logs.timestamp, event_message from storage_logs
|
|
33
|
-
order by timestamp desc
|
|
34
|
-
limit ${i}
|
|
35
|
-
`;case"realtime":return f`
|
|
36
|
-
select id, realtime_logs.timestamp, event_message from realtime_logs
|
|
37
|
-
order by timestamp desc
|
|
38
|
-
limit ${i}
|
|
39
|
-
`;default:throw new Error(`unsupported log service type: ${p}`)}}import K from"openapi-fetch";import{z as U}from"zod";function F(p,i,d={}){return K({baseUrl:p,headers:{Authorization:`Bearer ${i}`,...d}})}var N=U.object({message:U.string()});function n(p,i){if("error"in p){if(p.response.status===401)throw new Error("Unauthorized. Please provide a valid access token to the MCP server via the --access-token flag or SUPABASE_ACCESS_TOKEN.");let{data:d}=N.safeParse(p.error);throw d?new Error(d.message):new Error(i)}}var H="ABCDEFGHIJKLMNOPQRSTUVWXYZ",I="abcdefghijklmnopqrstuvwxyz",W="0123456789",Q="!@#$%^&*()_+~`|}{[]:;?><,./-=",$=({length:p=10,numbers:i=!1,symbols:d=!1,uppercase:_=!0,lowercase:a=!0}={})=>{let m="";if(_&&(m+=H),a&&(m+=I),i&&(m+=W),d&&(m+=Q),m.length===0)throw new Error("at least one character set must be selected");let v=new Uint32Array(p);crypto.getRandomValues(v);let O="";for(let w=0;w<p;w++){let j=v[w]%m.length;O+=m.charAt(j)}return O};var{version:Y}=R;function ye(p){let{accessToken:i,apiUrl:d}=p,_=d??"https://api.supabase.com",a=F(_,i),m={async listOrganizations(){let t=await a.GET("/v1/organizations");return n(t,"Failed to fetch organizations"),t.data},async getOrganization(t){let e=await a.GET("/v1/organizations/{slug}",{params:{path:{slug:t}}});return n(e,"Failed to fetch organization"),e.data},async listProjects(){let t=await a.GET("/v1/projects");return n(t,"Failed to fetch projects"),t.data},async getProject(t){let e=await a.GET("/v1/projects/{ref}",{params:{path:{ref:t}}});return n(e,"Failed to fetch project"),e.data},async createProject(t){let{name:e,organization_id:s,region:o,db_pass:r}=C.parse(t),c=await a.POST("/v1/projects",{body:{name:e,region:o,organization_id:s,db_pass:r??$({length:16,numbers:!0,uppercase:!0,lowercase:!0})}});return n(c,"Failed to create project"),c.data},async pauseProject(t){let e=await a.POST("/v1/projects/{ref}/pause",{params:{path:{ref:t}}});n(e,"Failed to pause project")},async restoreProject(t){let e=await a.POST("/v1/projects/{ref}/restore",{params:{path:{ref:t}}});n(e,"Failed to restore project")}},v={async executeSql(t,e){let{query:s,parameters:o,read_only:r}=q.parse(e),c=await a.POST("/v1/projects/{ref}/database/query",{params:{path:{ref:t}},body:{query:s,parameters:o,read_only:r}});return n(c,"Failed to execute SQL query"),c.data},async listMigrations(t){let e=await a.GET("/v1/projects/{ref}/database/migrations",{params:{path:{ref:t}}});return n(e,"Failed to fetch migrations"),e.data},async applyMigration(t,e){let{name:s,query:o}=G.parse(e),r=await a.POST("/v1/projects/{ref}/database/migrations",{params:{path:{ref:t}},body:{name:s,query:o}});n(r,"Failed to apply migration")}},O={async getLogs(t,e){let{service:s,iso_timestamp_start:o,iso_timestamp_end:r}=L.parse(e),c=D(s),u=await a.GET("/v1/projects/{ref}/analytics/endpoints/logs.all",{params:{path:{ref:t},query:{sql:c,iso_timestamp_start:o,iso_timestamp_end:r}}});return n(u,"Failed to fetch logs"),u.data},async getSecurityAdvisors(t){let e=await a.GET("/v1/projects/{ref}/advisors/security",{params:{path:{ref:t}}});return n(e,"Failed to fetch security advisors"),e.data},async getPerformanceAdvisors(t){let e=await a.GET("/v1/projects/{ref}/advisors/performance",{params:{path:{ref:t}}});return n(e,"Failed to fetch performance advisors"),e.data}},w={async getProjectUrl(t){let e=new URL(_);return`https://${t}.${X(e.hostname)}`},async getPublishableKeys(t){let e=await a.GET("/v1/projects/{ref}/api-keys",{params:{path:{ref:t},query:{reveal:!1}}});n(e,"Failed to fetch API keys");let s;try{let r=await a.GET("/v1/projects/{ref}/api-keys/legacy",{params:{path:{ref:t}}});r.response.ok&&(s=r.data?.enabled??!0)}catch{s=void 0}let o=e.data?.filter(r=>r.name==="anon"||r.type==="publishable")??[];if(o.length===0)throw new Error("No client-safe API keys (anon or publishable) found. Please create a publishable key in your project settings.");return o.map(r=>({api_key:r.api_key,name:r.name,type:r.type==="publishable"?"publishable":"legacy",...s!==void 0&&{disabled:r.type==="legacy"&&!s},description:r.description??void 0,id:r.id??void 0}))},async generateTypescriptTypes(t){let e=await a.GET("/v1/projects/{ref}/types/typescript",{params:{path:{ref:t}}});return n(e,"Failed to fetch TypeScript types"),e.data}},j={async listEdgeFunctions(t){let e=await a.GET("/v1/projects/{ref}/functions",{params:{path:{ref:t}}});return n(e,"Failed to fetch Edge Functions"),e.data.map(s=>{let o=P(t,s.id,s.version),r=s.entrypoint_path?b({deploymentId:o,filename:T(s.entrypoint_path,{windows:!1})}):void 0,c=s.import_map_path?b({deploymentId:o,filename:T(s.import_map_path,{windows:!1})}):void 0;return{...s,entrypoint_path:r,import_map_path:c}})},async getEdgeFunction(t,e){let s=await a.GET("/v1/projects/{ref}/functions/{function_slug}",{params:{path:{ref:t,function_slug:e}}});if(s.error)throw s.error;n(s,"Failed to fetch Edge Function");let o=s.data,r=P(t,o.id,o.version),c=o.entrypoint_path?b({deploymentId:r,filename:T(o.entrypoint_path,{windows:!1})}):void 0,u=o.import_map_path?b({deploymentId:r,filename:T(o.import_map_path,{windows:!1})}):void 0,g=await a.GET("/v1/projects/{ref}/functions/{function_slug}/body",{params:{path:{ref:t,function_slug:e}},headers:{Accept:"multipart/form-data"},parseAs:"stream"});n(g,"Failed to fetch Edge Function files");let y=g.response.headers.get("content-type");if(!y||!y.startsWith("multipart/form-data"))throw new Error(`Unexpected content type: ${y}. Expected multipart/form-data.`);let S=J(y);if(!S)throw new Error("No multipart boundary found in response headers");if(!g.data)throw new Error("No data received from Edge Function body");let l=[],E=V(g.data,{boundary:S});for await(let h of E)h.isFile&&h.filename&&l.push({name:b({deploymentId:r,filename:h.filename}),content:h.text});return{...o,entrypoint_path:c,import_map_path:u,files:l}},async deployEdgeFunction(t,e){let{name:s,entrypoint_path:o,import_map_path:r,verify_jwt:c,files:u}=M.parse(e),g;try{g=await j.getEdgeFunction(t,s)}catch{}let y=u.find(l=>["deno.json","import_map.json"].includes(l.name));r??=g?.import_map_path??y?.name;let S=await a.POST("/v1/projects/{ref}/functions/deploy",{params:{path:{ref:t},query:{slug:s}},body:{metadata:{name:s,entrypoint_path:o,import_map_path:r,verify_jwt:c},file:u},bodySerializer(l){let E=new FormData,h=new Blob([JSON.stringify(l.metadata)],{type:"application/json"});return E.append("metadata",h),l.file?.forEach(k=>{let A=k,z=new Blob([A.content],{type:"application/typescript"});E.append("file",z,A.name)}),E}});return n(S,"Failed to deploy Edge Function"),S.data}};return{async init(t){let{clientInfo:e}=t;if(!e)throw new Error("Client info is required");a=F(_,i,{"User-Agent":`supabase-mcp/${Y} (${e.name}/${e.version})`})},account:m,database:v,debugging:O,development:w,functions:j,branching:{async listBranches(t){let e=await a.GET("/v1/projects/{ref}/branches",{params:{path:{ref:t}}});return e.response.status===422?[]:(n(e,"Failed to list branches"),e.data)},async createBranch(t,e){let{name:s}=B.parse(e),o=await a.POST("/v1/projects/{ref}/branches",{params:{path:{ref:t}},body:{branch_name:s}});return n(o,"Failed to create branch"),o.data},async deleteBranch(t){let e=await a.DELETE("/v1/branches/{branch_id}",{params:{path:{branch_id:t}}});n(e,"Failed to delete branch")},async mergeBranch(t){let e=await a.POST("/v1/branches/{branch_id}/merge",{params:{path:{branch_id:t}},body:{}});n(e,"Failed to merge branch")},async resetBranch(t,e){let{migration_version:s}=x.parse(e),o=await a.POST("/v1/branches/{branch_id}/reset",{params:{path:{branch_id:t}},body:{migration_version:s}});n(o,"Failed to reset branch")},async rebaseBranch(t){let e=await a.POST("/v1/branches/{branch_id}/push",{params:{path:{branch_id:t}},body:{}});n(e,"Failed to rebase branch")}},storage:{async listAllBuckets(t){let e=await a.GET("/v1/projects/{ref}/storage/buckets",{params:{path:{ref:t}}});return n(e,"Failed to list storage buckets"),e.data},async getStorageConfig(t){let e=await a.GET("/v1/projects/{ref}/config/storage",{params:{path:{ref:t}}});return n(e,"Failed to get storage config"),e.data},async updateStorageConfig(t,e){let s=await a.PATCH("/v1/projects/{ref}/config/storage",{params:{path:{ref:t}},body:{fileSizeLimit:e.fileSizeLimit,features:{imageTransformation:{enabled:e.features.imageTransformation.enabled},s3Protocol:{enabled:e.features.s3Protocol.enabled}}}});n(s,"Failed to update storage config")}}}}function X(p){switch(p){case"api.supabase.com":return"supabase.co";case"api.supabase.green":return"supabase.green";default:return"supabase.red"}}export{ye as a};
|
|
40
|
-
//# sourceMappingURL=chunk-GYDVBUXB.js.map
|