@ldraney/github-mcp 0.2.3 → 0.2.4
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/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
3
6
|
import { getToken, login, logout, getAuthStatus } from './auth/oauth-flow.js';
|
|
4
7
|
import { startServer } from './server.js';
|
|
5
8
|
import { ToolGenerator, PRESETS, DEFAULT_PRESET } from './tools/generator.js';
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
6
12
|
const program = new Command();
|
|
7
13
|
program
|
|
8
14
|
.name('github-mcp')
|
|
9
15
|
.description('GitHub MCP server with OAuth authentication')
|
|
10
|
-
.version(
|
|
16
|
+
.version(pkg.version);
|
|
11
17
|
// Default command: start server
|
|
12
18
|
program
|
|
13
19
|
.option('-p, --preset <preset>', `Tool preset to load (${Object.keys(PRESETS).join(', ')})`, DEFAULT_PRESET)
|