@supabase/mcp-server-supabase 0.4.1-dev.1 → 0.4.2-alpha.1
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-EZSQZZQT.js +302 -0
- package/dist/chunk-EZSQZZQT.js.map +1 -0
- package/dist/chunk-HN6SHDQA.cjs +302 -0
- package/dist/chunk-HN6SHDQA.cjs.map +1 -0
- package/dist/chunk-ILOQJ4GC.cjs +3 -0
- package/dist/chunk-ILOQJ4GC.cjs.map +1 -0
- package/dist/chunk-P4XUQGTL.js +3 -0
- package/dist/chunk-P4XUQGTL.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -3
- package/dist/index.d.ts +25 -3
- package/dist/index.js +1 -1
- package/dist/platform/index.cjs +2 -0
- package/dist/platform/index.cjs.map +1 -0
- package/dist/platform/index.d.cts +292 -0
- package/dist/platform/index.d.ts +292 -0
- package/dist/platform/index.js +2 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/transports/stdio.cjs +3 -0
- package/dist/transports/stdio.cjs.map +1 -0
- package/dist/transports/stdio.js +3 -0
- package/dist/transports/stdio.js.map +1 -0
- package/package.json +11 -7
- package/dist/chunk-6X2DT2BL.js +0 -296
- package/dist/chunk-6X2DT2BL.js.map +0 -1
- package/dist/chunk-B7LGECMI.cjs +0 -296
- package/dist/chunk-B7LGECMI.cjs.map +0 -1
- package/dist/stdio.cjs +0 -3
- package/dist/stdio.cjs.map +0 -1
- package/dist/stdio.js +0 -3
- package/dist/stdio.js.map +0 -1
- /package/dist/{stdio.d.cts → transports/stdio.d.cts} +0 -0
- /package/dist/{stdio.d.ts → transports/stdio.d.ts} +0 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InitData } from '@supabase/mcp-utils';
|
|
3
|
+
|
|
4
|
+
declare const organizationSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
8
|
+
allowed_release_channels: z.ZodArray<z.ZodString, "many">;
|
|
9
|
+
opt_in_tags: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
id: string;
|
|
13
|
+
allowed_release_channels: string[];
|
|
14
|
+
opt_in_tags: string[];
|
|
15
|
+
plan?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name: string;
|
|
18
|
+
id: string;
|
|
19
|
+
allowed_release_channels: string[];
|
|
20
|
+
opt_in_tags: string[];
|
|
21
|
+
plan?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
declare const projectSchema: z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
organization_id: z.ZodString;
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
status: z.ZodString;
|
|
28
|
+
created_at: z.ZodString;
|
|
29
|
+
region: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
status: string;
|
|
32
|
+
name: string;
|
|
33
|
+
region: string;
|
|
34
|
+
id: string;
|
|
35
|
+
organization_id: string;
|
|
36
|
+
created_at: string;
|
|
37
|
+
}, {
|
|
38
|
+
status: string;
|
|
39
|
+
name: string;
|
|
40
|
+
region: string;
|
|
41
|
+
id: string;
|
|
42
|
+
organization_id: string;
|
|
43
|
+
created_at: string;
|
|
44
|
+
}>;
|
|
45
|
+
declare const branchSchema: z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
project_ref: z.ZodString;
|
|
49
|
+
parent_project_ref: z.ZodString;
|
|
50
|
+
is_default: z.ZodBoolean;
|
|
51
|
+
git_branch: z.ZodOptional<z.ZodString>;
|
|
52
|
+
pr_number: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
latest_check_run_id: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
persistent: z.ZodBoolean;
|
|
55
|
+
status: z.ZodEnum<["CREATING_PROJECT", "RUNNING_MIGRATIONS", "MIGRATIONS_PASSED", "MIGRATIONS_FAILED", "FUNCTIONS_DEPLOYED", "FUNCTIONS_FAILED"]>;
|
|
56
|
+
created_at: z.ZodString;
|
|
57
|
+
updated_at: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
60
|
+
name: string;
|
|
61
|
+
id: string;
|
|
62
|
+
created_at: string;
|
|
63
|
+
project_ref: string;
|
|
64
|
+
parent_project_ref: string;
|
|
65
|
+
is_default: boolean;
|
|
66
|
+
persistent: boolean;
|
|
67
|
+
updated_at: string;
|
|
68
|
+
git_branch?: string | undefined;
|
|
69
|
+
pr_number?: number | undefined;
|
|
70
|
+
latest_check_run_id?: number | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
status: "CREATING_PROJECT" | "RUNNING_MIGRATIONS" | "MIGRATIONS_PASSED" | "MIGRATIONS_FAILED" | "FUNCTIONS_DEPLOYED" | "FUNCTIONS_FAILED";
|
|
73
|
+
name: string;
|
|
74
|
+
id: string;
|
|
75
|
+
created_at: string;
|
|
76
|
+
project_ref: string;
|
|
77
|
+
parent_project_ref: string;
|
|
78
|
+
is_default: boolean;
|
|
79
|
+
persistent: boolean;
|
|
80
|
+
updated_at: string;
|
|
81
|
+
git_branch?: string | undefined;
|
|
82
|
+
pr_number?: number | undefined;
|
|
83
|
+
latest_check_run_id?: number | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
declare const edgeFunctionSchema: z.ZodObject<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
slug: z.ZodString;
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
status: z.ZodString;
|
|
90
|
+
version: z.ZodNumber;
|
|
91
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
verify_jwt: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
import_map: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
import_map_path: z.ZodOptional<z.ZodString>;
|
|
96
|
+
entrypoint_path: z.ZodOptional<z.ZodString>;
|
|
97
|
+
files: z.ZodArray<z.ZodObject<{
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
content: z.ZodString;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
content: string;
|
|
102
|
+
name: string;
|
|
103
|
+
}, {
|
|
104
|
+
content: string;
|
|
105
|
+
name: string;
|
|
106
|
+
}>, "many">;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
version: number;
|
|
109
|
+
status: string;
|
|
110
|
+
name: string;
|
|
111
|
+
id: string;
|
|
112
|
+
slug: string;
|
|
113
|
+
files: {
|
|
114
|
+
content: string;
|
|
115
|
+
name: string;
|
|
116
|
+
}[];
|
|
117
|
+
created_at?: number | undefined;
|
|
118
|
+
updated_at?: number | undefined;
|
|
119
|
+
verify_jwt?: boolean | undefined;
|
|
120
|
+
import_map?: boolean | undefined;
|
|
121
|
+
import_map_path?: string | undefined;
|
|
122
|
+
entrypoint_path?: string | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
version: number;
|
|
125
|
+
status: string;
|
|
126
|
+
name: string;
|
|
127
|
+
id: string;
|
|
128
|
+
slug: string;
|
|
129
|
+
files: {
|
|
130
|
+
content: string;
|
|
131
|
+
name: string;
|
|
132
|
+
}[];
|
|
133
|
+
created_at?: number | undefined;
|
|
134
|
+
updated_at?: number | undefined;
|
|
135
|
+
verify_jwt?: boolean | undefined;
|
|
136
|
+
import_map?: boolean | undefined;
|
|
137
|
+
import_map_path?: string | undefined;
|
|
138
|
+
entrypoint_path?: string | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
declare const createProjectOptionsSchema: z.ZodObject<{
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
organization_id: z.ZodString;
|
|
143
|
+
region: z.ZodOptional<z.ZodEnum<["sa-east-1", "ap-south-1", "ca-central-1", "eu-central-2", "eu-central-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-southeast-2", "ap-northeast-2", "ap-northeast-1", "ap-southeast-1", "us-west-1", "us-east-2", "us-east-1"]>>;
|
|
144
|
+
db_pass: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
name: string;
|
|
147
|
+
organization_id: string;
|
|
148
|
+
region?: "us-east-1" | "us-east-2" | "us-west-1" | "ap-southeast-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-southeast-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "eu-central-1" | "eu-central-2" | "ca-central-1" | "ap-south-1" | "sa-east-1" | undefined;
|
|
149
|
+
db_pass?: string | undefined;
|
|
150
|
+
}, {
|
|
151
|
+
name: string;
|
|
152
|
+
organization_id: string;
|
|
153
|
+
region?: "us-east-1" | "us-east-2" | "us-west-1" | "ap-southeast-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-southeast-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "eu-central-1" | "eu-central-2" | "ca-central-1" | "ap-south-1" | "sa-east-1" | undefined;
|
|
154
|
+
db_pass?: string | undefined;
|
|
155
|
+
}>;
|
|
156
|
+
declare const createBranchOptionsSchema: z.ZodObject<{
|
|
157
|
+
name: z.ZodString;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
name: string;
|
|
160
|
+
}, {
|
|
161
|
+
name: string;
|
|
162
|
+
}>;
|
|
163
|
+
declare const resetBranchOptionsSchema: z.ZodObject<{
|
|
164
|
+
migration_version: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, "strip", z.ZodTypeAny, {
|
|
166
|
+
migration_version?: string | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
migration_version?: string | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
declare const deployEdgeFunctionOptionsSchema: z.ZodObject<{
|
|
171
|
+
name: z.ZodString;
|
|
172
|
+
entrypoint_path: z.ZodString;
|
|
173
|
+
import_map_path: z.ZodOptional<z.ZodString>;
|
|
174
|
+
files: z.ZodArray<z.ZodObject<{
|
|
175
|
+
name: z.ZodString;
|
|
176
|
+
content: z.ZodString;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
content: string;
|
|
179
|
+
name: string;
|
|
180
|
+
}, {
|
|
181
|
+
content: string;
|
|
182
|
+
name: string;
|
|
183
|
+
}>, "many">;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
name: string;
|
|
186
|
+
entrypoint_path: string;
|
|
187
|
+
files: {
|
|
188
|
+
content: string;
|
|
189
|
+
name: string;
|
|
190
|
+
}[];
|
|
191
|
+
import_map_path?: string | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
name: string;
|
|
194
|
+
entrypoint_path: string;
|
|
195
|
+
files: {
|
|
196
|
+
content: string;
|
|
197
|
+
name: string;
|
|
198
|
+
}[];
|
|
199
|
+
import_map_path?: string | undefined;
|
|
200
|
+
}>;
|
|
201
|
+
declare const executeSqlOptionsSchema: z.ZodObject<{
|
|
202
|
+
query: z.ZodString;
|
|
203
|
+
read_only: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
query: string;
|
|
206
|
+
read_only?: boolean | undefined;
|
|
207
|
+
}, {
|
|
208
|
+
query: string;
|
|
209
|
+
read_only?: boolean | undefined;
|
|
210
|
+
}>;
|
|
211
|
+
declare const applyMigrationOptionsSchema: z.ZodObject<{
|
|
212
|
+
name: z.ZodString;
|
|
213
|
+
query: z.ZodString;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
name: string;
|
|
216
|
+
query: string;
|
|
217
|
+
}, {
|
|
218
|
+
name: string;
|
|
219
|
+
query: string;
|
|
220
|
+
}>;
|
|
221
|
+
declare const migrationSchema: z.ZodObject<{
|
|
222
|
+
version: z.ZodString;
|
|
223
|
+
name: z.ZodOptional<z.ZodString>;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
version: string;
|
|
226
|
+
name?: string | undefined;
|
|
227
|
+
}, {
|
|
228
|
+
version: string;
|
|
229
|
+
name?: string | undefined;
|
|
230
|
+
}>;
|
|
231
|
+
declare const getLogsOptionsSchema: z.ZodObject<{
|
|
232
|
+
sql: z.ZodString;
|
|
233
|
+
iso_timestamp_start: z.ZodOptional<z.ZodString>;
|
|
234
|
+
iso_timestamp_end: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
sql: string;
|
|
237
|
+
iso_timestamp_start?: string | undefined;
|
|
238
|
+
iso_timestamp_end?: string | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
sql: string;
|
|
241
|
+
iso_timestamp_start?: string | undefined;
|
|
242
|
+
iso_timestamp_end?: string | undefined;
|
|
243
|
+
}>;
|
|
244
|
+
declare const generateTypescriptTypesResultSchema: z.ZodObject<{
|
|
245
|
+
types: z.ZodString;
|
|
246
|
+
}, "strip", z.ZodTypeAny, {
|
|
247
|
+
types: string;
|
|
248
|
+
}, {
|
|
249
|
+
types: string;
|
|
250
|
+
}>;
|
|
251
|
+
type Organization = z.infer<typeof organizationSchema>;
|
|
252
|
+
type Project = z.infer<typeof projectSchema>;
|
|
253
|
+
type Branch = z.infer<typeof branchSchema>;
|
|
254
|
+
type EdgeFunction = z.infer<typeof edgeFunctionSchema>;
|
|
255
|
+
type CreateProjectOptions = z.infer<typeof createProjectOptionsSchema>;
|
|
256
|
+
type CreateBranchOptions = z.infer<typeof createBranchOptionsSchema>;
|
|
257
|
+
type ResetBranchOptions = z.infer<typeof resetBranchOptionsSchema>;
|
|
258
|
+
type DeployEdgeFunctionOptions = z.infer<typeof deployEdgeFunctionOptionsSchema>;
|
|
259
|
+
type ExecuteSqlOptions = z.infer<typeof executeSqlOptionsSchema>;
|
|
260
|
+
type ApplyMigrationOptions = z.infer<typeof applyMigrationOptionsSchema>;
|
|
261
|
+
type Migration = z.infer<typeof migrationSchema>;
|
|
262
|
+
type ListMigrationsResult = z.infer<typeof migrationSchema>;
|
|
263
|
+
type GetLogsOptions = z.infer<typeof getLogsOptionsSchema>;
|
|
264
|
+
type GenerateTypescriptTypesResult = z.infer<typeof generateTypescriptTypesResultSchema>;
|
|
265
|
+
type SupabasePlatform = {
|
|
266
|
+
init?(info: InitData): Promise<void>;
|
|
267
|
+
executeSql<T>(projectId: string, options: ExecuteSqlOptions): Promise<T[]>;
|
|
268
|
+
listMigrations(projectId: string): Promise<Migration[]>;
|
|
269
|
+
applyMigration<T>(projectId: string, options: ApplyMigrationOptions): Promise<T[]>;
|
|
270
|
+
listOrganizations(): Promise<Pick<Organization, 'id' | 'name'>[]>;
|
|
271
|
+
getOrganization(organizationId: string): Promise<Organization>;
|
|
272
|
+
listProjects(): Promise<Project[]>;
|
|
273
|
+
getProject(projectId: string): Promise<Project>;
|
|
274
|
+
createProject(options: CreateProjectOptions): Promise<Project>;
|
|
275
|
+
pauseProject(projectId: string): Promise<void>;
|
|
276
|
+
restoreProject(projectId: string): Promise<void>;
|
|
277
|
+
listEdgeFunctions(projectId: string): Promise<EdgeFunction[]>;
|
|
278
|
+
getEdgeFunction(projectId: string, functionSlug: string): Promise<EdgeFunction>;
|
|
279
|
+
deployEdgeFunction(projectId: string, options: DeployEdgeFunctionOptions): Promise<Omit<EdgeFunction, 'files'>>;
|
|
280
|
+
getLogs(projectId: string, options: GetLogsOptions): Promise<unknown>;
|
|
281
|
+
getProjectUrl(projectId: string): Promise<string>;
|
|
282
|
+
getAnonKey(projectId: string): Promise<string>;
|
|
283
|
+
generateTypescriptTypes(projectId: string): Promise<GenerateTypescriptTypesResult>;
|
|
284
|
+
listBranches(projectId: string): Promise<Branch[]>;
|
|
285
|
+
createBranch(projectId: string, options: CreateBranchOptions): Promise<Branch>;
|
|
286
|
+
deleteBranch(branchId: string): Promise<void>;
|
|
287
|
+
mergeBranch(branchId: string): Promise<void>;
|
|
288
|
+
resetBranch(branchId: string, options: ResetBranchOptions): Promise<void>;
|
|
289
|
+
rebaseBranch(branchId: string): Promise<void>;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export { type ApplyMigrationOptions, type Branch, type CreateBranchOptions, type CreateProjectOptions, type DeployEdgeFunctionOptions, type EdgeFunction, type ExecuteSqlOptions, type GenerateTypescriptTypesResult, type GetLogsOptions, type ListMigrationsResult, type Migration, type Organization, type Project, type ResetBranchOptions, type SupabasePlatform, applyMigrationOptionsSchema, branchSchema, createBranchOptionsSchema, createProjectOptionsSchema, deployEdgeFunctionOptionsSchema, edgeFunctionSchema, executeSqlOptionsSchema, generateTypescriptTypesResultSchema, getLogsOptionsSchema, migrationSchema, organizationSchema, projectSchema, resetBranchOptionsSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i,o as j,p as k,q as l,r as m}from"../chunk-P4XUQGTL.js";export{j as applyMigrationOptionsSchema,c as branchSchema,f as createBranchOptionsSchema,e as createProjectOptionsSchema,h as deployEdgeFunctionOptionsSchema,d as edgeFunctionSchema,i as executeSqlOptionsSchema,m as generateTypescriptTypesResultSchema,l as getLogsOptionsSchema,k as migrationSchema,a as organizationSchema,b as projectSchema,g as resetBranchOptionsSchema};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkHN6SHDQAcjs = require('../chunk-HN6SHDQA.cjs');require('../chunk-ILOQJ4GC.cjs');var _stdiojs = require('@modelcontextprotocol/sdk/server/stdio.js');var _util = require('util');var{version:v}=_chunkHN6SHDQAcjs.a;async function y(){let{values:{["access-token"]:t,["project-ref"]:n,["read-only"]:a,["api-url"]:c,["version"]:i}}=_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"}}});i&&(console.log(v),process.exit(0));let e=_nullishCoalesce(t, () => (process.env.SUPABASE_ACCESS_TOKEN));e||(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 p=_chunkHN6SHDQAcjs.b.call(void 0, {accessToken:e,apiUrl:c}),l=_chunkHN6SHDQAcjs.c.call(void 0, {platform:p,projectId:n,readOnly:a}),f=new _stdiojs.StdioServerTransport;await l.connect(f)}y().catch(console.error);
|
|
3
|
+
//# sourceMappingURL=stdio.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/grichardson/Documents/dev/supabase/mcp-server-supabase/packages/mcp-server-supabase/dist/transports/stdio.cjs","../../src/transports/stdio.ts"],"names":["version","package_default","main","cliAccessToken","projectId","readOnly","apiUrl","showVersion","parseArgs","accessToken","platform","createSupabaseApiPlatform","server","createSupabaseMcpServer","transport","StdioServerTransport"],"mappings":"AAAA;AACA,0KAAuD,iCAA8B,oECChD,4BACX,GAKpB,CAAE,OAAA,CAAAA,CAAQ,CAAA,CAAIC,mBAAAA,CAEpB,MAAA,SAAeC,CAAAA,CAAAA,CAAO,CACpB,GAAM,CACJ,MAAA,CAAQ,CACN,CAAC,cAAc,CAAA,CAAGC,CAAAA,CAClB,CAAC,aAAa,CAAA,CAAGC,CAAAA,CACjB,CAAC,WAAW,CAAA,CAAGC,CAAAA,CACf,CAAC,SAAS,CAAA,CAAGC,CAAAA,CACb,CAAC,SAAS,CAAA,CAAGC,CACf,CACF,CAAA,CAAIC,6BAAAA,CACF,OAAA,CAAS,CACN,cAAA,CAAiB,CAChB,IAAA,CAAM,QACR,CAAA,CACC,aAAA,CAAgB,CACf,IAAA,CAAM,QACR,CAAA,CACC,WAAA,CAAc,CACb,IAAA,CAAM,SAAA,CACN,OAAA,CAAS,CAAA,CACX,CAAA,CACC,SAAA,CAAY,CACX,IAAA,CAAM,QACR,CAAA,CACC,OAAA,CAAY,CACX,IAAA,CAAM,SACR,CACF,CACF,CAAC,CAAA,CAEGD,CAAAA,EAAAA,CACF,OAAA,CAAQ,GAAA,CAAIP,CAAO,CAAA,CACnB,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIhB,IAAMS,CAAAA,kBAAcN,CAAAA,SAAkB,OAAA,CAAQ,GAAA,CAAI,uBAAA,CAE7CM,CAAAA,EAAAA,CACH,OAAA,CAAQ,KAAA,CACN,iIACF,CAAA,CACA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMC,CAAAA,CAAWC,iCAAAA,CACf,WAAA,CAAAF,CAAAA,CACA,MAAA,CAAAH,CACF,CAAC,CAAA,CAEKM,CAAAA,CAASC,iCAAAA,CACb,QAAA,CAAAH,CAAAA,CACA,SAAA,CAAAN,CAAAA,CACA,QAAA,CAAAC,CACF,CAAC,CAAA,CAEKS,CAAAA,CAAY,IAAIC,6BAAAA,CAEtB,MAAMH,CAAAA,CAAO,OAAA,CAAQE,CAAS,CAChC,CAEAZ,CAAAA,CAAK,CAAA,CAAE,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA","file":"/Users/grichardson/Documents/dev/supabase/mcp-server-supabase/packages/mcp-server-supabase/dist/transports/stdio.cjs","sourcesContent":[null,"#!/usr/bin/env node\n\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { parseArgs } from 'node:util';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { createSupabaseApiPlatform } from '../platform/api-platform.js';\nimport { createSupabaseMcpServer } from '../server.js';\n\nconst { version } = packageJson;\n\nasync function main() {\n const {\n values: {\n ['access-token']: cliAccessToken,\n ['project-ref']: projectId,\n ['read-only']: readOnly,\n ['api-url']: apiUrl,\n ['version']: showVersion,\n },\n } = parseArgs({\n options: {\n ['access-token']: {\n type: 'string',\n },\n ['project-ref']: {\n type: 'string',\n },\n ['read-only']: {\n type: 'boolean',\n default: false,\n },\n ['api-url']: {\n type: 'string',\n },\n ['version']: {\n type: 'boolean',\n },\n },\n });\n\n if (showVersion) {\n console.log(version);\n process.exit(0);\n }\n\n // Use access token from CLI argument or environment variable\n const accessToken = cliAccessToken ?? process.env.SUPABASE_ACCESS_TOKEN;\n\n if (!accessToken) {\n console.error(\n 'Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable'\n );\n process.exit(1);\n }\n\n const platform = createSupabaseApiPlatform({\n accessToken,\n apiUrl,\n });\n\n const server = createSupabaseMcpServer({\n platform,\n projectId,\n readOnly,\n });\n\n const transport = new StdioServerTransport();\n\n await server.connect(transport);\n}\n\nmain().catch(console.error);\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as o,b as r,c as s}from"../chunk-EZSQZZQT.js";import"../chunk-P4XUQGTL.js";import{StdioServerTransport as m}from"@modelcontextprotocol/sdk/server/stdio.js";import{parseArgs as S}from"node:util";var{version:v}=o;async function y(){let{values:{["access-token"]:t,["project-ref"]:n,["read-only"]:a,["api-url"]:c,["version"]:i}}=S({options:{"access-token":{type:"string"},"project-ref":{type:"string"},"read-only":{type:"boolean",default:!1},"api-url":{type:"string"},version:{type:"boolean"}}});i&&(console.log(v),process.exit(0));let e=t??process.env.SUPABASE_ACCESS_TOKEN;e||(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 p=r({accessToken:e,apiUrl:c}),l=s({platform:p,projectId:n,readOnly:a}),f=new m;await l.connect(f)}y().catch(console.error);
|
|
3
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/transports/stdio.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { parseArgs } from 'node:util';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { createSupabaseApiPlatform } from '../platform/api-platform.js';\nimport { createSupabaseMcpServer } from '../server.js';\n\nconst { version } = packageJson;\n\nasync function main() {\n const {\n values: {\n ['access-token']: cliAccessToken,\n ['project-ref']: projectId,\n ['read-only']: readOnly,\n ['api-url']: apiUrl,\n ['version']: showVersion,\n },\n } = parseArgs({\n options: {\n ['access-token']: {\n type: 'string',\n },\n ['project-ref']: {\n type: 'string',\n },\n ['read-only']: {\n type: 'boolean',\n default: false,\n },\n ['api-url']: {\n type: 'string',\n },\n ['version']: {\n type: 'boolean',\n },\n },\n });\n\n if (showVersion) {\n console.log(version);\n process.exit(0);\n }\n\n // Use access token from CLI argument or environment variable\n const accessToken = cliAccessToken ?? process.env.SUPABASE_ACCESS_TOKEN;\n\n if (!accessToken) {\n console.error(\n 'Please provide a personal access token (PAT) with the --access-token flag or set the SUPABASE_ACCESS_TOKEN environment variable'\n );\n process.exit(1);\n }\n\n const platform = createSupabaseApiPlatform({\n accessToken,\n apiUrl,\n });\n\n const server = createSupabaseMcpServer({\n platform,\n projectId,\n readOnly,\n });\n\n const transport = new StdioServerTransport();\n\n await server.connect(transport);\n}\n\nmain().catch(console.error);\n"],"mappings":";oFAEA,OAAS,wBAAAA,MAA4B,4CACrC,OAAS,aAAAC,MAAiB,YAK1B,GAAM,CAAE,QAAAC,CAAQ,EAAIC,EAEpB,eAAeC,GAAO,CACpB,GAAM,CACJ,OAAQ,CACN,CAAC,cAAc,EAAGC,EAClB,CAAC,aAAa,EAAGC,EACjB,CAAC,WAAW,EAAGC,EACf,CAAC,SAAS,EAAGC,EACb,CAAC,SAAS,EAAGC,CACf,CACF,EAAIC,EAAU,CACZ,QAAS,CACN,eAAiB,CAChB,KAAM,QACR,EACC,cAAgB,CACf,KAAM,QACR,EACC,YAAc,CACb,KAAM,UACN,QAAS,EACX,EACC,UAAY,CACX,KAAM,QACR,EACC,QAAY,CACX,KAAM,SACR,CACF,CACF,CAAC,EAEGD,IACF,QAAQ,IAAIP,CAAO,EACnB,QAAQ,KAAK,CAAC,GAIhB,IAAMS,EAAcN,GAAkB,QAAQ,IAAI,sBAE7CM,IACH,QAAQ,MACN,iIACF,EACA,QAAQ,KAAK,CAAC,GAGhB,IAAMC,EAAWC,EAA0B,CACzC,YAAAF,EACA,OAAAH,CACF,CAAC,EAEKM,EAASC,EAAwB,CACrC,SAAAH,EACA,UAAAN,EACA,SAAAC,CACF,CAAC,EAEKS,EAAY,IAAIC,EAEtB,MAAMH,EAAO,QAAQE,CAAS,CAChC,CAEAZ,EAAK,EAAE,MAAM,QAAQ,KAAK","names":["StdioServerTransport","parseArgs","version","package_default","main","cliAccessToken","projectId","readOnly","apiUrl","showVersion","parseArgs","accessToken","platform","createSupabaseApiPlatform","server","createSupabaseMcpServer","transport","StdioServerTransport"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supabase/mcp-server-supabase",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2-alpha.1",
|
|
4
4
|
"description": "MCP server for interacting with Supabase",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -17,24 +17,28 @@
|
|
|
17
17
|
"test:coverage": "vitest --coverage",
|
|
18
18
|
"generate:management-api-types": "openapi-typescript https://api.supabase.com/api/v1-json -o ./src/management-api/types.ts"
|
|
19
19
|
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist/**/*"
|
|
22
|
-
],
|
|
20
|
+
"files": ["dist/**/*"],
|
|
23
21
|
"bin": {
|
|
24
|
-
"mcp-server-supabase": "./dist/stdio.js"
|
|
22
|
+
"mcp-server-supabase": "./dist/transports/stdio.js"
|
|
25
23
|
},
|
|
26
24
|
"exports": {
|
|
27
25
|
".": {
|
|
28
26
|
"import": "./dist/index.js",
|
|
29
27
|
"types": "./dist/index.d.ts",
|
|
30
28
|
"default": "./dist/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./platform": {
|
|
31
|
+
"import": "./dist/platform/index.js",
|
|
32
|
+
"types": "./dist/platform/index.d.ts",
|
|
33
|
+
"default": "./dist/platform/index.cjs"
|
|
31
34
|
}
|
|
32
35
|
},
|
|
33
36
|
"dependencies": {
|
|
34
37
|
"@deno/eszip": "^0.84.0",
|
|
35
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
36
|
-
"@supabase/mcp-utils": "0.2.
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.11.0",
|
|
39
|
+
"@supabase/mcp-utils": "0.2.1",
|
|
37
40
|
"common-tags": "^1.8.2",
|
|
41
|
+
"graphql": "^16.11.0",
|
|
38
42
|
"openapi-fetch": "^0.13.5",
|
|
39
43
|
"zod": "^3.24.1"
|
|
40
44
|
},
|