Skip to content

Commit dd93c5d

Browse files
committed
feat: cli flag to show version
1 parent b498d5c commit dd93c5d

File tree

1 file changed

+14
-1
lines changed
  • packages/mcp-server-supabase/src

1 file changed

+14
-1
lines changed

packages/mcp-server-supabase/src/stdio.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
44
import { parseArgs } from 'node:util';
5+
import { version } from '../package.json';
56
import { createSupabaseMcpServer } from './server.js';
67

78
async function main() {
89
const {
9-
values: { ['access-token']: accessToken, ['api-url']: apiUrl },
10+
values: {
11+
['access-token']: accessToken,
12+
['api-url']: apiUrl,
13+
['version']: showVersion,
14+
},
1015
} = parseArgs({
1116
options: {
1217
['access-token']: {
@@ -15,9 +20,17 @@ async function main() {
1520
['api-url']: {
1621
type: 'string',
1722
},
23+
['version']: {
24+
type: 'boolean',
25+
},
1826
},
1927
});
2028

29+
if (showVersion) {
30+
console.log(version);
31+
process.exit(0);
32+
}
33+
2134
if (!accessToken) {
2235
console.error(
2336
'Please provide a personal access token (PAT) with the --access-token flag'

0 commit comments

Comments
 (0)