@nado-language/mcp 0.1.9 → 0.1.10

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
@@ -136,7 +136,17 @@ export NADO_MCP_AUTH_RELAY_URL='https://language.nado.ai.kr/auth/mcp-callback'
136
136
 
137
137
  ## Client Registration
138
138
 
139
- Installed package, one-command setup plus browser login:
139
+ Installed package auto-registers the supported local config writers during install/update. It writes Codex Desktop, Claude Desktop, and OpenCode config entries when possible. It does not open browser login during install, and it does not force an already-open AI chat to reload tools.
140
+
141
+ After install, run browser login once:
142
+
143
+ ```bash
144
+ nado-mcp login
145
+ ```
146
+
147
+ Then fully restart the AI desktop app and start a new chat/session.
148
+
149
+ Manual one-command setup plus browser login remains available:
140
150
 
141
151
  ```bash
142
152
  nado-mcp connect
@@ -148,6 +158,12 @@ To force every supported local config writer:
148
158
  nado-mcp connect all
149
159
  ```
150
160
 
161
+ To skip install-time auto-registration, install with:
162
+
163
+ ```bash
164
+ NADO_MCP_SKIP_POSTINSTALL=1 npm install --global @nado-language/mcp
165
+ ```
166
+
151
167
  Client-specific setup remains available:
152
168
 
153
169
  ```bash
@@ -161,9 +177,9 @@ For Codex, the command uses the Codex CLI when it is on `PATH`. If the user only
161
177
  - macOS/Linux: `~/.codex/config.toml`
162
178
  - Windows: `%USERPROFILE%\.codex\config.toml`
163
179
 
164
- Restart Codex Desktop after login completes.
180
+ Restart Codex Desktop after install/login completes.
165
181
  If a client was already open, start a new chat/session after restart. Most local MCP clients load tool definitions when the session starts, so a config that was just written may not appear inside an already-running conversation.
166
- For Codex, confirm the server is active from the chat/TUI with `/mcp`. A server can appear in Settings while still failing to start for the current session.
182
+ For Codex, `/mcp` is an optional diagnostic check to confirm the server is active in the current chat/TUI. Normal users should not need it once install-time registration, login, restart, and new chat have completed. A server can appear in Settings while still failing to start for the current session.
167
183
  On Windows, leave the Codex MCP working directory/cwd empty unless it is an existing absolute path. The Nado server does not need a working directory, and a value such as `~/code` can prevent the stdio process from starting if the client does not expand it.
168
184
 
169
185
  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.
@@ -269,7 +285,15 @@ npm run mcp:nado:probe -- save-nado-ai "serendipity"
269
285
 
270
286
  ## Package CLI
271
287
 
272
- Install/register/login flow:
288
+ Install/update auto-registers supported local config writers for Codex Desktop, Claude Desktop, and OpenCode. It does not open browser login during install.
289
+
290
+ Login flow:
291
+
292
+ ```bash
293
+ nado-mcp login
294
+ ```
295
+
296
+ Manual register/login flow:
273
297
 
274
298
  ```bash
275
299
  nado-mcp connect
@@ -44,6 +44,8 @@ try {
44
44
  await runAuth(['logout', ...args]);
45
45
  } else if (command === 'auth') {
46
46
  await runAuth(args.length > 0 ? args : ['login']);
47
+ } else if (command === 'postinstall') {
48
+ runPostinstallAutoSetup();
47
49
  } else if (command === 'probe') {
48
50
  await runNode(probePath, args, { stdio: 'inherit' });
49
51
  } else if (command === 'setup') {
@@ -155,6 +157,40 @@ function setupAllLocalClients(options = {}, flow = {}) {
155
157
  return true;
156
158
  }
157
159
 
160
+ function runPostinstallAutoSetup() {
161
+ if (process.env.NADO_MCP_SKIP_POSTINSTALL === '1' || process.env.NADO_MCP_NO_AUTO_SETUP === '1') {
162
+ console.log('Nado MCP postinstall: skipped automatic client registration.');
163
+ return;
164
+ }
165
+
166
+ try {
167
+ console.log('Nado MCP postinstall: registering supported local MCP clients.');
168
+ const registrations = [
169
+ ['Codex Desktop', () => setupCodexDesktopConfig({ postinstall: true })],
170
+ ['Claude Desktop', () => setupClaudeDesktop({}, { postinstall: true })],
171
+ ['OpenCode', () => setupOpenCode({}, { postinstall: true })],
172
+ ];
173
+ let registeredCount = 0;
174
+ for (const [label, register] of registrations) {
175
+ try {
176
+ register();
177
+ registeredCount += 1;
178
+ } catch (error) {
179
+ console.warn(`Nado MCP postinstall warning: ${label} registration failed (${error instanceof Error ? error.message : String(error)}).`);
180
+ }
181
+ }
182
+ printToolProbeSummary();
183
+ if (registeredCount > 0) {
184
+ console.log('Nado MCP postinstall: registration complete. Run `nado-mcp login` once, then restart the AI app and start a new chat.');
185
+ } else {
186
+ console.warn('Nado MCP postinstall warning: no local client config was registered. Run `nado-mcp setup all` manually, or use `nado-mcp config` for a generic MCP client.');
187
+ }
188
+ } catch (error) {
189
+ console.warn(`Nado MCP postinstall warning: automatic registration failed (${error instanceof Error ? error.message : String(error)}).`);
190
+ console.warn('Run `nado-mcp setup all` manually, or use `nado-mcp config` for a generic MCP client.');
191
+ }
192
+ }
193
+
158
194
  function setupCodex(flow = {}) {
159
195
  const check = spawnSync('codex', ['--version'], { stdio: 'ignore' });
160
196
  if (check.error || check.status !== 0) {
@@ -183,7 +219,8 @@ function setupCodexDesktopConfig(flow = {}, reason = '') {
183
219
 
184
220
  if (reason) console.log(`${reason} Falling back to Codex Desktop config.`);
185
221
  console.log(`Registered Nado Language MCP with Codex Desktop: ${configPath}`);
186
- if (flow.loginAfter) console.log('Browser login will open next. Restart Codex Desktop after login completes.');
222
+ if (flow.postinstall) console.log('Restart Codex Desktop or start a new Codex session before expecting Nado tools to appear.');
223
+ else if (flow.loginAfter) console.log('Browser login will open next. Restart Codex Desktop after login completes.');
187
224
  else console.log('Restart Codex Desktop, then run `nado-mcp login`.');
188
225
  }
189
226
 
@@ -200,7 +237,8 @@ function setupClaudeDesktop(options = {}, flow = {}) {
200
237
 
201
238
  writeFileSync(configPath, `${JSON.stringify(config, null, 2)}\n`);
202
239
  console.log(`Registered Nado Language MCP with Claude Desktop: ${configPath}`);
203
- if (flow.loginAfter) console.log('Browser login will open next. Restart Claude Desktop after login completes.');
240
+ if (flow.postinstall) console.log('Restart Claude Desktop before expecting Nado tools to appear.');
241
+ else if (flow.loginAfter) console.log('Browser login will open next. Restart Claude Desktop after login completes.');
204
242
  else console.log('Restart Claude Desktop, then run `nado-mcp login`.');
205
243
  }
206
244
 
@@ -869,6 +907,7 @@ function codexDesktopConfigPath() {
869
907
  }
870
908
 
871
909
  function claudeDesktopConfigPath() {
910
+ if (process.env.NADO_MCP_CLAUDE_CONFIG_FILE) return expandHome(process.env.NADO_MCP_CLAUDE_CONFIG_FILE);
872
911
  if (process.platform === 'win32') {
873
912
  return path.join(process.env.APPDATA || path.join(os.homedir(), 'AppData', 'Roaming'), 'Claude', 'claude_desktop_config.json');
874
913
  }
@@ -912,6 +951,7 @@ function printHelp() {
912
951
  console.log(`Nado Language MCP
913
952
 
914
953
  Usage:
954
+ nado-mcp login Open browser login and save local auth
915
955
  nado-mcp connect Auto-register detected local MCP clients, then log in
916
956
  nado-mcp connect all Register all supported local config writers, then log in
917
957
  nado-mcp connect codex Register in Codex CLI/Desktop, then log in
@@ -920,7 +960,6 @@ Usage:
920
960
  nado-mcp setup <client> Register without login
921
961
  nado-mcp setup mcp-json --file PATH Merge into a generic mcpServers JSON file
922
962
  nado-mcp config Print generic MCP config snippets
923
- nado-mcp login Open browser login and save local auth
924
963
  nado-mcp status Show local auth status
925
964
  nado-mcp logout Remove local auth tokens
926
965
  nado-mcp server Start the stdio MCP server
@@ -936,8 +975,9 @@ Universal fallback:
936
975
  nado-mcp config
937
976
 
938
977
  AI-agent friendly flow:
939
- 1. Install the package
940
- 2. Run: nado-mcp connect
941
- 3. If the client is unknown or remote-only, paste the JSON from nado-mcp config
978
+ 1. Install the package; install/update auto-registers Codex Desktop, Claude Desktop, and OpenCode
979
+ 2. Run: nado-mcp login
980
+ 3. Fully restart the AI app and start a new chat/session
981
+ 4. If the client is unknown or remote-only, paste the JSON from nado-mcp config
942
982
  `);
943
983
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nado-language/mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
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,
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "scripts": {
21
21
  "prepack": "node ../../scripts/build-nado-mcp-package.mjs",
22
+ "postinstall": "node dist/nado-mcp-cli.mjs postinstall",
22
23
  "test": "node dist/nado-mcp-cli.mjs doctor"
23
24
  },
24
25
  "keywords": [