@jieunmarslim/server-editable-slides 0.2.8 → 0.2.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.
Files changed (2) hide show
  1. package/index.js +14 -33
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -375,18 +375,18 @@ async function runDoctor() {
375
375
  }
376
376
  }
377
377
 
378
- // If invoked from an interactive terminal directly or with doctor/auth/check args, run diagnostic
378
+ // Run doctor diagnostics only when explicitly requested via command-line arguments.
379
+ // When spawned by MCP hosts (Antigravity, Cursor, Claude Desktop), always start the MCP server directly.
379
380
  const args = process.argv.slice(2);
380
- if (
381
+ const isDoctor =
381
382
  args.includes('doctor') ||
382
- args.includes('auth') ||
383
383
  args.includes('check') ||
384
384
  args.includes('--check') ||
385
385
  args.includes('--doctor') ||
386
386
  args.includes('-h') ||
387
- args.includes('--help') ||
388
- (process.stdin.isTTY && !args.includes('--stdio'))
389
- ) {
387
+ args.includes('--help');
388
+
389
+ if (isDoctor) {
390
390
  runDoctor();
391
391
  } else {
392
392
  startMcpServer().catch((err) => {
@@ -517,27 +517,19 @@ async function assertEnvironmentOrExit() {
517
517
  const project = getProject();
518
518
 
519
519
  if (!account || !token) {
520
- console.error('\n[EditNBLM] ❌ Activation Failed: Google Cloud authentication required.');
521
- console.error('[EditNBLM] Please run `gcloud auth login --enable-gdrive-access` before activating this MCP server.');
522
- console.error('[EditNBLM] Run `npx -y @jieunmarslim/server-editable-slides doctor` to diagnose.\n');
520
+ console.error('[EditNBLM] ❌ Error: Not authenticated. Run: gcloud auth login --enable-gdrive-access');
523
521
  process.exit(1);
524
522
  }
525
523
 
526
524
  // Verify Google Drive scope
527
525
  const hasDrive = await checkDriveScope(token);
528
526
  if (!hasDrive) {
529
- console.error(`\n[EditNBLM] ❌ Activation Failed: Account [${account}] lacks Google Drive access.`);
530
- console.error('[EditNBLM] EditNBLM MCP requires Google Drive scope to automatically convert presentations into live Google Slides.');
531
- console.error('[EditNBLM] 👉 Please run in your terminal:');
532
- console.error('[EditNBLM] gcloud auth login --enable-gdrive-access\n');
533
- console.error('[EditNBLM] Run `npx -y @jieunmarslim/server-editable-slides doctor` to diagnose.\n');
527
+ console.error(`[EditNBLM] ❌ Error: Google Drive scope missing. Run: gcloud auth login --enable-gdrive-access`);
534
528
  process.exit(1);
535
529
  }
536
530
 
537
531
  if (!project) {
538
- console.error('\n[EditNBLM] ❌ Activation Failed: No GCP Project configured for GEAP billing.');
539
- console.error('[EditNBLM] Please run `gcloud config set project <PROJECT_ID>` or export EDITABLE_SLIDES_PROJECT.');
540
- console.error('[EditNBLM] Run `npx -y @jieunmarslim/server-editable-slides doctor` to diagnose.\n');
532
+ console.error('[EditNBLM] ❌ Error: No GCP project set. Run: gcloud config set project <PROJECT_ID>');
541
533
  process.exit(1);
542
534
  }
543
535
 
@@ -554,19 +546,16 @@ async function assertEnvironmentOrExit() {
554
546
  }
555
547
  } catch (err) {
556
548
  const stderr = err.stderr ? err.stderr.toString() : err.message;
557
- console.error(`\n[EditNBLM] ❌ Activation Failed: Account [${account}] does NOT have access to project [${project}].`);
558
549
  if (
559
550
  stderr.includes('does not have permission') ||
560
551
  stderr.includes('caller does not have permission')
561
552
  ) {
562
- console.error(`[EditNBLM] 👉 Solution 1: Log in with an account that has access: gcloud auth login --enable-gdrive-access`);
563
- console.error(`[EditNBLM] 👉 Solution 2: Switch to a project that [${account}] can access: gcloud config set project <PROJECT>`);
553
+ console.error(`[EditNBLM] Error: Account [${account}] lacks permission for project [${project}]. Run: gcloud config set project <PROJECT_ID>`);
564
554
  } else if (stderr.includes('not found') || stderr.includes('404')) {
565
- console.error(`[EditNBLM] 👉 Project [${project}] does not exist. Run: gcloud config set project <VALID_PROJECT_ID>`);
555
+ console.error(`[EditNBLM] Error: Project [${project}] not found. Run: gcloud config set project <VALID_PROJECT_ID>`);
566
556
  } else {
567
- console.error(`[EditNBLM] 👉 Details: ${stderr.trim()}`);
557
+ console.error(`[EditNBLM] Error: Cannot access project [${project}] (${stderr.trim().split('\n')[0]}).`);
568
558
  }
569
- console.error('[EditNBLM] Run `npx -y @jieunmarslim/server-editable-slides doctor` to diagnose.\n');
570
559
  process.exit(1);
571
560
  }
572
561
  }
@@ -988,16 +977,8 @@ async function startMcpServer() {
988
977
  );
989
978
 
990
979
  const transport = new StdioServerTransport();
991
- server.connect(transport).then(() => {
992
- const project = getProject();
993
- if (project) {
994
- console.error(`[EditNBLM] Ready. Connected to EditNBLM Cloud (Billing Project: ${project}).`);
995
- } else {
996
- console.error('[EditNBLM] ⚠️ Warning: No active GCP project detected for billing.');
997
- console.error('[EditNBLM] Run `npx @jieunmarslim/server-editable-slides doctor` to configure.');
998
- }
999
- }).catch((err) => {
1000
- console.error('[EditNBLM] Fatal error:', err);
980
+ server.connect(transport).catch((err) => {
981
+ console.error(`[EditNBLM] Fatal error: ${err.message}`);
1001
982
  process.exit(1);
1002
983
  });
1003
984
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jieunmarslim/server-editable-slides",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Model Context Protocol (MCP) client for Editable Slides Cloud",
5
5
  "type": "module",
6
6
  "bin": {