@nado-language/mcp 0.1.4 → 0.1.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/README.md +9 -0
- package/dist/nado-mcp-auth.mjs +29 -1
- package/dist/nado-mcp-cli.mjs +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ http://127.0.0.1:*/callback
|
|
|
77
77
|
You can inspect or clear local MCP auth with:
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
+
nado-mcp --version
|
|
80
81
|
nado-mcp status
|
|
81
82
|
nado-mcp logout
|
|
82
83
|
```
|
|
@@ -88,6 +89,14 @@ npm run mcp:nado:auth -- status
|
|
|
88
89
|
npm run mcp:nado:auth -- logout
|
|
89
90
|
```
|
|
90
91
|
|
|
92
|
+
If the browser shows an error about an old, incomplete, truncated, or invalid PKCE login URL, close every old Nado MCP login tab, upgrade the package, and rerun login. Printed login URLs are single-run URLs and should not be reused:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm install --global @nado-language/mcp@latest
|
|
96
|
+
nado-mcp --version
|
|
97
|
+
nado-mcp login --provider google
|
|
98
|
+
```
|
|
99
|
+
|
|
91
100
|
Manual access-token option:
|
|
92
101
|
|
|
93
102
|
```bash
|
package/dist/nado-mcp-auth.mjs
CHANGED
|
@@ -16,12 +16,15 @@ const SUPPORTED_REDIRECT_MODES = new Set(['azure', 'local']);
|
|
|
16
16
|
|
|
17
17
|
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
18
18
|
const repoRoot = path.resolve(scriptDir, '..');
|
|
19
|
+
const packageVersion = readPackageVersion();
|
|
19
20
|
|
|
20
21
|
const { command, options } = parseCli(process.argv.slice(2));
|
|
21
22
|
|
|
22
23
|
try {
|
|
23
24
|
if (options.help || command === 'help') {
|
|
24
25
|
printHelp();
|
|
26
|
+
} else if (command === 'version') {
|
|
27
|
+
console.log(packageVersion);
|
|
25
28
|
} else if (command === 'login') {
|
|
26
29
|
await login(options);
|
|
27
30
|
} else if (command === 'status') {
|
|
@@ -39,7 +42,10 @@ try {
|
|
|
39
42
|
function parseCli(argv) {
|
|
40
43
|
let command = 'login';
|
|
41
44
|
let args = argv;
|
|
42
|
-
if (argv[0]
|
|
45
|
+
if (argv[0] === '--version' || argv[0] === '-v') {
|
|
46
|
+
command = 'version';
|
|
47
|
+
args = argv.slice(1);
|
|
48
|
+
} else if (argv[0] && !argv[0].startsWith('-')) {
|
|
43
49
|
command = argv[0];
|
|
44
50
|
args = argv.slice(1);
|
|
45
51
|
}
|
|
@@ -77,6 +83,7 @@ function parseCli(argv) {
|
|
|
77
83
|
else if (flag === '--timeout-ms') options.timeoutMs = Number(readValue());
|
|
78
84
|
else if (flag === '--no-open') options.noOpen = true;
|
|
79
85
|
else if (flag === '--help' || flag === '-h') options.help = true;
|
|
86
|
+
else if (flag === '--version' || flag === '-v') command = 'version';
|
|
80
87
|
else throw new Error(`Unknown option: ${arg}`);
|
|
81
88
|
}
|
|
82
89
|
|
|
@@ -249,6 +256,7 @@ function buildRelayStartUrl({ relayUrl: value, localCallbackUrl, provider, supab
|
|
|
249
256
|
relayUrl.searchParams.set('provider', provider);
|
|
250
257
|
relayUrl.searchParams.set('supabase_url', supabaseUrl);
|
|
251
258
|
relayUrl.searchParams.set('code_challenge', codeChallenge);
|
|
259
|
+
relayUrl.searchParams.set('client_version', packageVersion);
|
|
252
260
|
return relayUrl.toString();
|
|
253
261
|
}
|
|
254
262
|
|
|
@@ -456,6 +464,24 @@ function resolvePath(value) {
|
|
|
456
464
|
return path.isAbsolute(value) ? value : path.resolve(process.cwd(), value);
|
|
457
465
|
}
|
|
458
466
|
|
|
467
|
+
function readPackageVersion() {
|
|
468
|
+
const candidates = [
|
|
469
|
+
path.join(repoRoot, 'packages', 'nado-mcp', 'package.json'),
|
|
470
|
+
path.join(scriptDir, '..', 'package.json'),
|
|
471
|
+
];
|
|
472
|
+
for (const filePath of candidates) {
|
|
473
|
+
try {
|
|
474
|
+
const pkg = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
475
|
+
if (pkg?.name === '@nado-language/mcp' && typeof pkg.version === 'string') {
|
|
476
|
+
return pkg.version;
|
|
477
|
+
}
|
|
478
|
+
} catch {
|
|
479
|
+
// Continue to the next candidate.
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
return '0.0.0-dev';
|
|
483
|
+
}
|
|
484
|
+
|
|
459
485
|
function listen(server, port) {
|
|
460
486
|
return new Promise((resolve, reject) => {
|
|
461
487
|
server.once('error', reject);
|
|
@@ -497,6 +523,7 @@ Usage:
|
|
|
497
523
|
nado-mcp login [--provider google|kakao|apple]
|
|
498
524
|
nado-mcp status
|
|
499
525
|
nado-mcp logout
|
|
526
|
+
nado-mcp-auth --version
|
|
500
527
|
|
|
501
528
|
Repo checkout aliases:
|
|
502
529
|
npm run mcp:nado:auth -- [login] [--provider google|kakao|apple]
|
|
@@ -513,6 +540,7 @@ Options:
|
|
|
513
540
|
--timeout-ms <number> Login wait timeout. Default: 300000
|
|
514
541
|
--supabase-url <url> Supabase project URL
|
|
515
542
|
--anon-key <key> Supabase anon key
|
|
543
|
+
--version Print installed Nado MCP version
|
|
516
544
|
|
|
517
545
|
Default mode uses the existing Azure Static Web Apps site as a zero-new-resource
|
|
518
546
|
OAuth relay. Supabase Auth must allow this redirect URL:
|
package/dist/nado-mcp-cli.mjs
CHANGED
|
@@ -11,6 +11,7 @@ const sourceRoot = path.resolve(scriptDir, '..');
|
|
|
11
11
|
const packageDistDir = scriptDir;
|
|
12
12
|
const serverName = 'nado-language';
|
|
13
13
|
const opencodeSchema = 'https://opencode.ai/config.json';
|
|
14
|
+
const packageVersion = readPackageVersion();
|
|
14
15
|
|
|
15
16
|
const serverPath = firstExisting([
|
|
16
17
|
path.join(packageDistDir, 'nado-language-server.mjs'),
|
|
@@ -31,6 +32,8 @@ const args = process.argv.slice(3);
|
|
|
31
32
|
try {
|
|
32
33
|
if (command === 'help' || command === '--help' || command === '-h') {
|
|
33
34
|
printHelp();
|
|
35
|
+
} else if (command === 'version' || command === '--version' || command === '-v') {
|
|
36
|
+
console.log(packageVersion);
|
|
34
37
|
} else if (command === 'server') {
|
|
35
38
|
await runNode(serverPath, args, { stdio: 'inherit' });
|
|
36
39
|
} else if (command === 'login') {
|
|
@@ -240,6 +243,7 @@ async function doctor() {
|
|
|
240
243
|
const probe = probeTools();
|
|
241
244
|
|
|
242
245
|
console.log('Nado MCP doctor');
|
|
246
|
+
console.log(`Version: ${packageVersion}`);
|
|
243
247
|
console.log(`Node: ${process.version}`);
|
|
244
248
|
console.log(`Server: ${serverPath}${existsSync(serverPath) ? '' : ' (missing)'}`);
|
|
245
249
|
console.log(`Auth CLI: ${authPath}${existsSync(authPath) ? '' : ' (missing)'}`);
|
|
@@ -789,6 +793,24 @@ function expandHome(value) {
|
|
|
789
793
|
return text;
|
|
790
794
|
}
|
|
791
795
|
|
|
796
|
+
function readPackageVersion() {
|
|
797
|
+
const candidates = [
|
|
798
|
+
path.join(sourceRoot, 'packages', 'nado-mcp', 'package.json'),
|
|
799
|
+
path.join(packageDistDir, '..', 'package.json'),
|
|
800
|
+
];
|
|
801
|
+
for (const filePath of candidates) {
|
|
802
|
+
try {
|
|
803
|
+
const pkg = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
804
|
+
if (pkg?.name === '@nado-language/mcp' && typeof pkg.version === 'string') {
|
|
805
|
+
return pkg.version;
|
|
806
|
+
}
|
|
807
|
+
} catch {
|
|
808
|
+
// Continue to the next candidate.
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
return '0.0.0-dev';
|
|
812
|
+
}
|
|
813
|
+
|
|
792
814
|
function printHelp() {
|
|
793
815
|
console.log(`Nado Language MCP
|
|
794
816
|
|
|
@@ -807,6 +829,7 @@ Usage:
|
|
|
807
829
|
nado-mcp server Start the stdio MCP server
|
|
808
830
|
nado-mcp probe list List exposed MCP tools
|
|
809
831
|
nado-mcp doctor Print local paths and auth status
|
|
832
|
+
nado-mcp --version Print installed Nado MCP version
|
|
810
833
|
|
|
811
834
|
Supported automatic setup clients:
|
|
812
835
|
codex, claude, opencode
|