@nado-language/mcp 0.1.1 → 0.1.2

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 CHANGED
@@ -115,6 +115,18 @@ export NADO_MCP_AUTH_RELAY_URL='https://language.nado.ai.kr/auth/mcp-callback'
115
115
 
116
116
  Installed package, one-command setup plus browser login:
117
117
 
118
+ ```bash
119
+ nado-mcp connect
120
+ ```
121
+
122
+ To force every supported local config writer:
123
+
124
+ ```bash
125
+ nado-mcp connect all
126
+ ```
127
+
128
+ Client-specific setup remains available:
129
+
118
130
  ```bash
119
131
  nado-mcp connect codex
120
132
  nado-mcp connect claude
@@ -128,6 +140,8 @@ For Codex, the command uses the Codex CLI when it is on `PATH`. If the user only
128
140
 
129
141
  Restart Codex Desktop after login completes.
130
142
 
143
+ ChatGPT is different: it uses hosted/remote MCP apps configured from ChatGPT Apps settings, not local stdio config files. The local package can prepare local clients such as Codex, Claude Desktop, OpenCode, and generic JSON-based MCP clients.
144
+
131
145
  Setup without login:
132
146
 
133
147
  ```bash
@@ -48,8 +48,8 @@ try {
48
48
  await setup(parsed.client, parsed.setupOptions);
49
49
  } else if (command === 'connect' || command === 'install') {
50
50
  const parsed = splitClientAndSetupOptions(args);
51
- await setup(parsed.client, parsed.setupOptions, { loginAfter: true });
52
- await runAuth(['login', ...parsed.rest]);
51
+ const didRegister = await setup(parsed.client, parsed.setupOptions, { loginAfter: true });
52
+ if (didRegister) await runAuth(['login', ...parsed.rest]);
53
53
  } else if (command === 'config') {
54
54
  printConfig(args[0] || 'all');
55
55
  } else if (command === 'doctor') {
@@ -72,6 +72,16 @@ async function runAuth(authArgs) {
72
72
 
73
73
  async function setup(client, options = {}, flow = {}) {
74
74
  const normalized = String(client || '').toLowerCase();
75
+ if (normalized === 'auto') {
76
+ return setupAutoLocalClients(options, flow);
77
+ }
78
+ if (normalized === 'all') {
79
+ return setupAllLocalClients(options, flow);
80
+ }
81
+ if (normalized === 'chatgpt' || normalized === 'openai' || normalized === 'chatgpt-app') {
82
+ printChatGptSetup();
83
+ return false;
84
+ }
75
85
  if (normalized === 'codex') {
76
86
  setupCodex(flow);
77
87
  return true;
@@ -111,6 +121,33 @@ async function setup(client, options = {}, flow = {}) {
111
121
  return false;
112
122
  }
113
123
 
124
+ function setupAutoLocalClients(options = {}, flow = {}) {
125
+ const targets = [];
126
+ if (isCodexAvailable()) targets.push(['codex', () => setupCodex(flow)]);
127
+ if (isClaudeDesktopAvailable(options)) targets.push(['claude', () => setupClaudeDesktop(options, flow)]);
128
+ if (isOpenCodeAvailable(options)) targets.push(['opencode', () => setupOpenCode(options, flow)]);
129
+
130
+ if (targets.length === 0) {
131
+ console.log('No supported local MCP client was detected.');
132
+ printGenericSetup();
133
+ return false;
134
+ }
135
+
136
+ console.log(`Detected local MCP client${targets.length === 1 ? '' : 's'}: ${targets.map(([name]) => name).join(', ')}`);
137
+ for (const [, register] of targets) register();
138
+ printChatGptLocalLimit();
139
+ return true;
140
+ }
141
+
142
+ function setupAllLocalClients(options = {}, flow = {}) {
143
+ console.log('Registering Nado Language MCP with every supported local config writer.');
144
+ setupCodexDesktopConfig(flow);
145
+ setupClaudeDesktop(options, flow);
146
+ setupOpenCode(options, flow);
147
+ printChatGptLocalLimit();
148
+ return true;
149
+ }
150
+
114
151
  function setupCodex(flow = {}) {
115
152
  const check = spawnSync('codex', ['--version'], { stdio: 'ignore' });
116
153
  if (check.error || check.status !== 0) {
@@ -211,7 +248,7 @@ function splitClientAndSetupOptions(values) {
211
248
  const rawClient = hasClient ? values[0] : '';
212
249
  const optionValues = hasClient ? values.slice(1) : values;
213
250
  const parsed = takeSetupOptions(optionValues);
214
- const client = rawClient || (parsed.setupOptions.configFile ? 'mcp-json' : 'generic');
251
+ const client = rawClient || (parsed.setupOptions.configFile ? 'mcp-json' : 'auto');
215
252
  return { client, setupOptions: parsed.setupOptions, rest: parsed.rest };
216
253
  }
217
254
 
@@ -290,6 +327,36 @@ function opencodeConfig() {
290
327
  };
291
328
  }
292
329
 
330
+ function isCodexAvailable() {
331
+ if (process.env.NADO_MCP_CODEX_CONFIG_FILE) return true;
332
+ if (commandExists('codex')) return true;
333
+ return existsSync(path.dirname(codexDesktopConfigPath()));
334
+ }
335
+
336
+ function isClaudeDesktopAvailable(options = {}) {
337
+ if (options.configFile) return true;
338
+ if (existsSync(claudeDesktopConfigPath())) return true;
339
+ if (process.platform === 'darwin') {
340
+ return existsSync('/Applications/Claude.app') || existsSync(path.join(os.homedir(), 'Applications', 'Claude.app'));
341
+ }
342
+ if (process.platform === 'win32') {
343
+ const localAppData = process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local');
344
+ return existsSync(path.join(localAppData, 'Programs', 'Claude', 'Claude.exe'));
345
+ }
346
+ return commandExists('claude');
347
+ }
348
+
349
+ function isOpenCodeAvailable(options = {}) {
350
+ if (options.configFile || process.env.OPENCODE_CONFIG) return true;
351
+ if (existsSync(opencodeConfigPath())) return true;
352
+ return commandExists('opencode');
353
+ }
354
+
355
+ function commandExists(commandName) {
356
+ const result = spawnSync(commandName, ['--version'], { stdio: 'ignore' });
357
+ return !result.error && result.status === 0;
358
+ }
359
+
293
360
  function codexDesktopTomlSection() {
294
361
  const spec = stdioServerSpec();
295
362
  return [
@@ -363,6 +430,16 @@ function printGenericSetup() {
363
430
  console.log('Then run `nado-mcp login`.');
364
431
  }
365
432
 
433
+ function printChatGptSetup() {
434
+ console.log('ChatGPT does not use local stdio MCP config files.');
435
+ console.log('Use a hosted/remote MCP endpoint in ChatGPT Apps settings, then scan tools in ChatGPT.');
436
+ console.log('Nado local package setup can configure Codex, Claude Desktop, OpenCode, and generic local MCP JSON clients.');
437
+ }
438
+
439
+ function printChatGptLocalLimit() {
440
+ console.log('Note: ChatGPT requires a hosted/remote MCP app registration in ChatGPT settings; local package setup cannot install into ChatGPT directly.');
441
+ }
442
+
366
443
  function printMcpServersSetup(client) {
367
444
  console.log(`No config file path was provided for ${client}.`);
368
445
  console.log('Pass `--config-file /path/to/mcp.json`, or paste this into the client MCP config:');
@@ -545,6 +622,8 @@ function printHelp() {
545
622
  console.log(`Nado Language MCP
546
623
 
547
624
  Usage:
625
+ nado-mcp connect Auto-register detected local MCP clients, then log in
626
+ nado-mcp connect all Register all supported local config writers, then log in
548
627
  nado-mcp connect codex Register in Codex CLI/Desktop, then log in
549
628
  nado-mcp connect claude Register in Claude Desktop, then log in
550
629
  nado-mcp connect opencode Register in OpenCode, then log in
@@ -567,7 +646,7 @@ Universal fallback:
567
646
 
568
647
  AI-agent friendly flow:
569
648
  1. Install the package
570
- 2. Run: nado-mcp connect <client>
571
- 3. If the client is unknown, paste the JSON from nado-mcp config
649
+ 2. Run: nado-mcp connect
650
+ 3. If the client is unknown or remote-only, paste the JSON from nado-mcp config
572
651
  `);
573
652
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nado-language/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Nado Language MCP server for saving AI-generated English flashcards and practicing saved materials.",
5
5
  "type": "module",
6
6
  "private": false,