@supabase/mcp-server-supabase 0.4.4 → 0.4.5
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-CZ7BSFIW.cjs → chunk-42U7HZZC.cjs} +2 -2
- package/dist/chunk-42U7HZZC.cjs.map +1 -0
- package/dist/chunk-OT6YGU7A.cjs +310 -0
- package/dist/chunk-OT6YGU7A.cjs.map +1 -0
- package/dist/chunk-Q2ALOOMK.js +310 -0
- package/dist/chunk-Q2ALOOMK.js.map +1 -0
- package/dist/{chunk-V755O7BY.js → chunk-TSIYIWSV.js} +2 -2
- package/dist/chunk-TSIYIWSV.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +1 -1
- package/dist/platform/index.cjs +1 -1
- package/dist/platform/index.cjs.map +1 -1
- package/dist/platform/index.d.cts +86 -6
- package/dist/platform/index.d.ts +86 -6
- package/dist/platform/index.js +1 -1
- package/dist/transports/stdio.cjs +1 -1
- package/dist/transports/stdio.cjs.map +1 -1
- package/dist/transports/stdio.js +1 -1
- package/dist/transports/stdio.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-5TNGIQMQ.cjs +0 -310
- package/dist/chunk-5TNGIQMQ.cjs.map +0 -1
- package/dist/chunk-77CHZYDZ.js +0 -310
- package/dist/chunk-77CHZYDZ.js.map +0 -1
- package/dist/chunk-CZ7BSFIW.cjs.map +0 -1
- package/dist/chunk-V755O7BY.js.map +0 -1
|
@@ -1,6 +1,81 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { InitData } from '@supabase/mcp-utils';
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
declare const storageBucketSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
owner: z.ZodString;
|
|
8
|
+
created_at: z.ZodString;
|
|
9
|
+
updated_at: z.ZodString;
|
|
10
|
+
public: z.ZodBoolean;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
public: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
id: string;
|
|
15
|
+
owner: string;
|
|
16
|
+
created_at: string;
|
|
17
|
+
updated_at: string;
|
|
18
|
+
}, {
|
|
19
|
+
public: boolean;
|
|
20
|
+
name: string;
|
|
21
|
+
id: string;
|
|
22
|
+
owner: string;
|
|
23
|
+
created_at: string;
|
|
24
|
+
updated_at: string;
|
|
25
|
+
}>;
|
|
26
|
+
declare const storageConfigSchema: z.ZodObject<{
|
|
27
|
+
fileSizeLimit: z.ZodNumber;
|
|
28
|
+
features: z.ZodObject<{
|
|
29
|
+
imageTransformation: z.ZodObject<{
|
|
30
|
+
enabled: z.ZodBoolean;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
}, {
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
s3Protocol: z.ZodObject<{
|
|
37
|
+
enabled: z.ZodBoolean;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
}, {
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
imageTransformation: {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
};
|
|
47
|
+
s3Protocol: {
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
imageTransformation: {
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
};
|
|
54
|
+
s3Protocol: {
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
fileSizeLimit: number;
|
|
60
|
+
features: {
|
|
61
|
+
imageTransformation: {
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
};
|
|
64
|
+
s3Protocol: {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
fileSizeLimit: number;
|
|
70
|
+
features: {
|
|
71
|
+
imageTransformation: {
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
};
|
|
74
|
+
s3Protocol: {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}>;
|
|
4
79
|
declare const organizationSchema: z.ZodObject<{
|
|
5
80
|
id: z.ZodString;
|
|
6
81
|
name: z.ZodString;
|
|
@@ -32,15 +107,15 @@ declare const projectSchema: z.ZodObject<{
|
|
|
32
107
|
name: string;
|
|
33
108
|
region: string;
|
|
34
109
|
id: string;
|
|
35
|
-
organization_id: string;
|
|
36
110
|
created_at: string;
|
|
111
|
+
organization_id: string;
|
|
37
112
|
}, {
|
|
38
113
|
status: string;
|
|
39
114
|
name: string;
|
|
40
115
|
region: string;
|
|
41
116
|
id: string;
|
|
42
|
-
organization_id: string;
|
|
43
117
|
created_at: string;
|
|
118
|
+
organization_id: string;
|
|
44
119
|
}>;
|
|
45
120
|
declare const branchSchema: z.ZodObject<{
|
|
46
121
|
id: z.ZodString;
|
|
@@ -60,11 +135,11 @@ declare const branchSchema: z.ZodObject<{
|
|
|
60
135
|
name: string;
|
|
61
136
|
id: string;
|
|
62
137
|
created_at: string;
|
|
138
|
+
updated_at: string;
|
|
63
139
|
project_ref: string;
|
|
64
140
|
parent_project_ref: string;
|
|
65
141
|
is_default: boolean;
|
|
66
142
|
persistent: boolean;
|
|
67
|
-
updated_at: string;
|
|
68
143
|
git_branch?: string | undefined;
|
|
69
144
|
pr_number?: number | undefined;
|
|
70
145
|
latest_check_run_id?: number | undefined;
|
|
@@ -73,11 +148,11 @@ declare const branchSchema: z.ZodObject<{
|
|
|
73
148
|
name: string;
|
|
74
149
|
id: string;
|
|
75
150
|
created_at: string;
|
|
151
|
+
updated_at: string;
|
|
76
152
|
project_ref: string;
|
|
77
153
|
parent_project_ref: string;
|
|
78
154
|
is_default: boolean;
|
|
79
155
|
persistent: boolean;
|
|
80
|
-
updated_at: string;
|
|
81
156
|
git_branch?: string | undefined;
|
|
82
157
|
pr_number?: number | undefined;
|
|
83
158
|
latest_check_run_id?: number | undefined;
|
|
@@ -262,6 +337,8 @@ type Migration = z.infer<typeof migrationSchema>;
|
|
|
262
337
|
type ListMigrationsResult = z.infer<typeof migrationSchema>;
|
|
263
338
|
type GetLogsOptions = z.infer<typeof getLogsOptionsSchema>;
|
|
264
339
|
type GenerateTypescriptTypesResult = z.infer<typeof generateTypescriptTypesResultSchema>;
|
|
340
|
+
type StorageConfig = z.infer<typeof storageConfigSchema>;
|
|
341
|
+
type StorageBucket = z.infer<typeof storageBucketSchema>;
|
|
265
342
|
type SupabasePlatform = {
|
|
266
343
|
init?(info: InitData): Promise<void>;
|
|
267
344
|
executeSql<T>(projectId: string, options: ExecuteSqlOptions): Promise<T[]>;
|
|
@@ -289,6 +366,9 @@ type SupabasePlatform = {
|
|
|
289
366
|
mergeBranch(branchId: string): Promise<void>;
|
|
290
367
|
resetBranch(branchId: string, options: ResetBranchOptions): Promise<void>;
|
|
291
368
|
rebaseBranch(branchId: string): Promise<void>;
|
|
369
|
+
getStorageConfig(projectId: string): Promise<StorageConfig>;
|
|
370
|
+
updateStorageConfig(projectId: string, config: StorageConfig): Promise<void>;
|
|
371
|
+
listAllBuckets(projectId: string): Promise<StorageBucket[]>;
|
|
292
372
|
};
|
|
293
373
|
|
|
294
|
-
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 };
|
|
374
|
+
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 StorageBucket, type StorageConfig, type SupabasePlatform, applyMigrationOptionsSchema, branchSchema, createBranchOptionsSchema, createProjectOptionsSchema, deployEdgeFunctionOptionsSchema, edgeFunctionSchema, executeSqlOptionsSchema, generateTypescriptTypesResultSchema, getLogsOptionsSchema, migrationSchema, organizationSchema, projectSchema, resetBranchOptionsSchema, storageBucketSchema, storageConfigSchema };
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,6 +1,81 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { InitData } from '@supabase/mcp-utils';
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
declare const storageBucketSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
owner: z.ZodString;
|
|
8
|
+
created_at: z.ZodString;
|
|
9
|
+
updated_at: z.ZodString;
|
|
10
|
+
public: z.ZodBoolean;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
public: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
id: string;
|
|
15
|
+
owner: string;
|
|
16
|
+
created_at: string;
|
|
17
|
+
updated_at: string;
|
|
18
|
+
}, {
|
|
19
|
+
public: boolean;
|
|
20
|
+
name: string;
|
|
21
|
+
id: string;
|
|
22
|
+
owner: string;
|
|
23
|
+
created_at: string;
|
|
24
|
+
updated_at: string;
|
|
25
|
+
}>;
|
|
26
|
+
declare const storageConfigSchema: z.ZodObject<{
|
|
27
|
+
fileSizeLimit: z.ZodNumber;
|
|
28
|
+
features: z.ZodObject<{
|
|
29
|
+
imageTransformation: z.ZodObject<{
|
|
30
|
+
enabled: z.ZodBoolean;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
}, {
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
s3Protocol: z.ZodObject<{
|
|
37
|
+
enabled: z.ZodBoolean;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
}, {
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
imageTransformation: {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
};
|
|
47
|
+
s3Protocol: {
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
imageTransformation: {
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
};
|
|
54
|
+
s3Protocol: {
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
fileSizeLimit: number;
|
|
60
|
+
features: {
|
|
61
|
+
imageTransformation: {
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
};
|
|
64
|
+
s3Protocol: {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
fileSizeLimit: number;
|
|
70
|
+
features: {
|
|
71
|
+
imageTransformation: {
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
};
|
|
74
|
+
s3Protocol: {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}>;
|
|
4
79
|
declare const organizationSchema: z.ZodObject<{
|
|
5
80
|
id: z.ZodString;
|
|
6
81
|
name: z.ZodString;
|
|
@@ -32,15 +107,15 @@ declare const projectSchema: z.ZodObject<{
|
|
|
32
107
|
name: string;
|
|
33
108
|
region: string;
|
|
34
109
|
id: string;
|
|
35
|
-
organization_id: string;
|
|
36
110
|
created_at: string;
|
|
111
|
+
organization_id: string;
|
|
37
112
|
}, {
|
|
38
113
|
status: string;
|
|
39
114
|
name: string;
|
|
40
115
|
region: string;
|
|
41
116
|
id: string;
|
|
42
|
-
organization_id: string;
|
|
43
117
|
created_at: string;
|
|
118
|
+
organization_id: string;
|
|
44
119
|
}>;
|
|
45
120
|
declare const branchSchema: z.ZodObject<{
|
|
46
121
|
id: z.ZodString;
|
|
@@ -60,11 +135,11 @@ declare const branchSchema: z.ZodObject<{
|
|
|
60
135
|
name: string;
|
|
61
136
|
id: string;
|
|
62
137
|
created_at: string;
|
|
138
|
+
updated_at: string;
|
|
63
139
|
project_ref: string;
|
|
64
140
|
parent_project_ref: string;
|
|
65
141
|
is_default: boolean;
|
|
66
142
|
persistent: boolean;
|
|
67
|
-
updated_at: string;
|
|
68
143
|
git_branch?: string | undefined;
|
|
69
144
|
pr_number?: number | undefined;
|
|
70
145
|
latest_check_run_id?: number | undefined;
|
|
@@ -73,11 +148,11 @@ declare const branchSchema: z.ZodObject<{
|
|
|
73
148
|
name: string;
|
|
74
149
|
id: string;
|
|
75
150
|
created_at: string;
|
|
151
|
+
updated_at: string;
|
|
76
152
|
project_ref: string;
|
|
77
153
|
parent_project_ref: string;
|
|
78
154
|
is_default: boolean;
|
|
79
155
|
persistent: boolean;
|
|
80
|
-
updated_at: string;
|
|
81
156
|
git_branch?: string | undefined;
|
|
82
157
|
pr_number?: number | undefined;
|
|
83
158
|
latest_check_run_id?: number | undefined;
|
|
@@ -262,6 +337,8 @@ type Migration = z.infer<typeof migrationSchema>;
|
|
|
262
337
|
type ListMigrationsResult = z.infer<typeof migrationSchema>;
|
|
263
338
|
type GetLogsOptions = z.infer<typeof getLogsOptionsSchema>;
|
|
264
339
|
type GenerateTypescriptTypesResult = z.infer<typeof generateTypescriptTypesResultSchema>;
|
|
340
|
+
type StorageConfig = z.infer<typeof storageConfigSchema>;
|
|
341
|
+
type StorageBucket = z.infer<typeof storageBucketSchema>;
|
|
265
342
|
type SupabasePlatform = {
|
|
266
343
|
init?(info: InitData): Promise<void>;
|
|
267
344
|
executeSql<T>(projectId: string, options: ExecuteSqlOptions): Promise<T[]>;
|
|
@@ -289,6 +366,9 @@ type SupabasePlatform = {
|
|
|
289
366
|
mergeBranch(branchId: string): Promise<void>;
|
|
290
367
|
resetBranch(branchId: string, options: ResetBranchOptions): Promise<void>;
|
|
291
368
|
rebaseBranch(branchId: string): Promise<void>;
|
|
369
|
+
getStorageConfig(projectId: string): Promise<StorageConfig>;
|
|
370
|
+
updateStorageConfig(projectId: string, config: StorageConfig): Promise<void>;
|
|
371
|
+
listAllBuckets(projectId: string): Promise<StorageBucket[]>;
|
|
292
372
|
};
|
|
293
373
|
|
|
294
|
-
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 };
|
|
374
|
+
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 StorageBucket, type StorageConfig, type SupabasePlatform, applyMigrationOptionsSchema, branchSchema, createBranchOptionsSchema, createProjectOptionsSchema, deployEdgeFunctionOptionsSchema, edgeFunctionSchema, executeSqlOptionsSchema, generateTypescriptTypesResultSchema, getLogsOptionsSchema, migrationSchema, organizationSchema, projectSchema, resetBranchOptionsSchema, storageBucketSchema, storageConfigSchema };
|
package/dist/platform/index.js
CHANGED
|
@@ -1,2 +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-
|
|
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,s as n,t as o}from"../chunk-TSIYIWSV.js";export{l as applyMigrationOptionsSchema,e as branchSchema,h as createBranchOptionsSchema,g as createProjectOptionsSchema,j as deployEdgeFunctionOptionsSchema,f as edgeFunctionSchema,k as executeSqlOptionsSchema,o as generateTypescriptTypesResultSchema,n as getLogsOptionsSchema,m as migrationSchema,c as organizationSchema,d as projectSchema,i 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 _chunkOT6YGU7Acjs = require('../chunk-OT6YGU7A.cjs');require('../chunk-42U7HZZC.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}=_chunkOT6YGU7Acjs.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=_chunkOT6YGU7Acjs.b.call(void 0, {accessToken:n,apiUrl:e}),u=_chunkOT6YGU7Acjs.c.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
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"sources":["/Users/grichardson/Documents/dev/supabase/mcp-server-supabase/packages/mcp-server-supabase/dist/transports/stdio.cjs","../../src/transports/stdio.ts","../../src/transports/util.ts"],"names":["parseList","list","delimiter","feature","version","package_default","main","cliAccessToken","projectId","readOnly","apiUrl","showVersion","cliFeatures","parseArgs","accessToken","features","platform","createSupabaseApiPlatform","server","createSupabaseMcpServer","transport","StdioServerTransport"],"mappings":"AAAA;AACA,0KAA6C,iCAA8B,oECCtC,4BACX,SCGVA,CAAAA,CAAUC,CAAAA,CAAcC,CAAAA,CAAY,GAAA,CAAe,CAEjE,OADcD,CAAAA,CAAK,KAAA,CAAMC,CAAS,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAYA,CAAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CACtD,MAAA,CAAQA,CAAAA,EAAYA,CAAAA,GAAY,EAAE,CACjD,CDAA,GAAM,CAAE,OAAA,CAAAC,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,CAAAA,CACb,CAAC,UAAU,CAAA,CAAGC,CAChB,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,CAAA,CACC,QAAA,CAAa,CACZ,IAAA,CAAM,QACR,CACF,CACF,CAAC,CAAA,CAEGF,CAAAA,EAAAA,CACF,OAAA,CAAQ,GAAA,CAAIP,CAAO,CAAA,CACnB,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMU,CAAAA,kBAAcP,CAAAA,SAAkB,OAAA,CAAQ,GAAA,CAAI,uBAAA,CAE7CO,CAAAA,EAAAA,CACH,OAAA,CAAQ,KAAA,CACN,iIACF,CAAA,CACA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMC,CAAAA,CAAWH,CAAAA,CAAcZ,CAAAA,CAAUY,CAAW,CAAA,CAAI,KAAA,CAAA,CAElDI,CAAAA,CAAWC,iCAAAA,CACf,WAAA,CAAAH,CAAAA,CACA,MAAA,CAAAJ,CACF,CAAC,CAAA,CAEKQ,CAAAA,CAASC,iCAAAA,CACb,QAAA,CAAAH,CAAAA,CACA,SAAA,CAAAR,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAM,CACF,CAAC,CAAA,CAEKK,CAAAA,CAAY,IAAIC,6BAAAA,CAEtB,MAAMH,CAAAA,CAAO,OAAA,CAAQE,CAAS,CAChC,CAEAd,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';\nimport { parseList } from './util.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 ['features']: cliFeatures,\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 ['features']: {\n type: 'string',\n },\n },\n });\n\n if (showVersion) {\n console.log(version);\n process.exit(0);\n }\n\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 features = cliFeatures ? parseList(cliFeatures) : undefined;\n\n const platform = createSupabaseApiPlatform({\n accessToken,\n apiUrl,\n });\n\n const server = createSupabaseMcpServer({\n platform,\n projectId,\n readOnly,\n features,\n });\n\n const transport = new StdioServerTransport();\n\n await server.connect(transport);\n}\n\nmain().catch(console.error);\n","/**\n * Parses a delimited list of items into an array,\n * trimming whitespace and filtering out empty items.\n *\n * Default delimiter is a comma (`,`).\n */\nexport function parseList(list: string, delimiter = ','): string[] {\n const items = list.split(delimiter).map((feature) => feature.trim());\n return items.filter((feature) => feature !== '');\n}\n"]}
|
package/dist/transports/stdio.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a
|
|
2
|
+
import{a,b as i,c}from"../chunk-Q2ALOOMK.js";import"../chunk-TSIYIWSV.js";import{StdioServerTransport as v}from"@modelcontextprotocol/sdk/server/stdio.js";import{parseArgs as y}from"node: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=i({accessToken:n,apiUrl:e}),u=c({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
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"sources":["../../src/transports/stdio.ts","../../src/transports/util.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';\nimport { parseList } from './util.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 ['features']: cliFeatures,\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 ['features']: {\n type: 'string',\n },\n },\n });\n\n if (showVersion) {\n console.log(version);\n process.exit(0);\n }\n\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 features = cliFeatures ? parseList(cliFeatures) : undefined;\n\n const platform = createSupabaseApiPlatform({\n accessToken,\n apiUrl,\n });\n\n const server = createSupabaseMcpServer({\n platform,\n projectId,\n readOnly,\n features,\n });\n\n const transport = new StdioServerTransport();\n\n await server.connect(transport);\n}\n\nmain().catch(console.error);\n","/**\n * Parses a delimited list of items into an array,\n * trimming whitespace and filtering out empty items.\n *\n * Default delimiter is a comma (`,`).\n */\nexport function parseList(list: string, delimiter = ','): string[] {\n const items = list.split(delimiter).map((feature) => feature.trim());\n return items.filter((feature) => feature !== '');\n}\n"],"mappings":";0EAEA,OAAS,wBAAAA,MAA4B,4CACrC,OAAS,aAAAC,MAAiB,YCGnB,SAASC,EAAUC,EAAcC,EAAY,IAAe,CAEjE,OADcD,EAAK,MAAMC,CAAS,EAAE,IAAKC,GAAYA,EAAQ,KAAK,CAAC,EACtD,OAAQA,GAAYA,IAAY,EAAE,CACjD,CDAA,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,EACb,CAAC,UAAU,EAAGC,CAChB,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,EACC,SAAa,CACZ,KAAM,QACR,CACF,CACF,CAAC,EAEGF,IACF,QAAQ,IAAIP,CAAO,EACnB,QAAQ,KAAK,CAAC,GAGhB,IAAMU,EAAcP,GAAkB,QAAQ,IAAI,sBAE7CO,IACH,QAAQ,MACN,iIACF,EACA,QAAQ,KAAK,CAAC,GAGhB,IAAMC,EAAWH,EAAcI,EAAUJ,CAAW,EAAI,OAElDK,EAAWC,EAA0B,CACzC,YAAAJ,EACA,OAAAJ,CACF,CAAC,EAEKS,EAASC,EAAwB,CACrC,SAAAH,EACA,UAAAT,EACA,SAAAC,EACA,SAAAM,CACF,CAAC,EAEKM,EAAY,IAAIC,EAEtB,MAAMH,EAAO,QAAQE,CAAS,CAChC,CAEAf,EAAK,EAAE,MAAM,QAAQ,KAAK","names":["StdioServerTransport","parseArgs","parseList","list","delimiter","feature","version","package_default","main","cliAccessToken","projectId","readOnly","apiUrl","showVersion","cliFeatures","parseArgs","accessToken","features","parseList","platform","createSupabaseApiPlatform","server","createSupabaseMcpServer","transport","StdioServerTransport"]}
|