@yektoo/cli 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +26 -5
  2. package/dist/index.js +65 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -65,6 +65,17 @@ yektoo close <email-id> # Close the ticket
65
65
  | `yektoo login -e EMAIL -p PASS` | Log in non-interactively |
66
66
  | `yektoo logout` | Clear stored session |
67
67
  | `yektoo whoami` | Show current user and business |
68
+ | `yektoo setup-mcp --target <tool>` | Configure the MCP server for an AI tool |
69
+
70
+ #### Setup MCP
71
+
72
+ ```bash
73
+ yektoo setup-mcp --target claude-desktop # Claude Desktop
74
+ yektoo setup-mcp --target cursor # Cursor
75
+ yektoo setup-mcp --target claude-code # Claude Code (pi)
76
+ ```
77
+
78
+ This automatically adds the Yektoo MCP server to the tool's config file. Restart the AI tool after running.
68
79
 
69
80
  ### Accounts
70
81
 
@@ -216,7 +227,17 @@ The MCP server lets AI agents (Claude, Cursor, Windsurf, etc.) interact with you
216
227
  npx @yektoo/cli login
217
228
  ```
218
229
 
219
- Then add the MCP server to your AI tool:
230
+ Then configure automatically:
231
+
232
+ ```bash
233
+ npx @yektoo/cli setup-mcp --target claude-desktop # Claude Desktop
234
+ npx @yektoo/cli setup-mcp --target cursor # Cursor
235
+ npx @yektoo/cli setup-mcp --target claude-code # Claude Code (pi)
236
+ ```
237
+
238
+ Restart the AI tool after running. The Yektoo tools will be available immediately.
239
+
240
+ **Or configure manually** — add to the tool's MCP config file:
220
241
 
221
242
  #### Claude Desktop
222
243
 
@@ -227,7 +248,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
227
248
  "mcpServers": {
228
249
  "yektoo": {
229
250
  "command": "npx",
230
- "args": ["-y", "@yektoo/mcp-server"]
251
+ "args": ["-y", "@yektoo/mcp-server@latest"]
231
252
  }
232
253
  }
233
254
  }
@@ -242,7 +263,7 @@ Edit `.cursor/mcp.json` in your project root:
242
263
  "mcpServers": {
243
264
  "yektoo": {
244
265
  "command": "npx",
245
- "args": ["-y", "@yektoo/mcp-server"]
266
+ "args": ["-y", "@yektoo/mcp-server@latest"]
246
267
  }
247
268
  }
248
269
  }
@@ -257,7 +278,7 @@ Edit `.mcp.json` in your project root:
257
278
  "mcpServers": {
258
279
  "yektoo": {
259
280
  "command": "npx",
260
- "args": ["-y", "@yektoo/mcp-server"]
281
+ "args": ["-y", "@yektoo/mcp-server@latest"]
261
282
  }
262
283
  }
263
284
  }
@@ -272,7 +293,7 @@ Edit `~/.codeium/windsurf/mcp_config.json`:
272
293
  "mcpServers": {
273
294
  "yektoo": {
274
295
  "command": "npx",
275
- "args": ["-y", "@yektoo/mcp-server"]
296
+ "args": ["-y", "@yektoo/mcp-server@latest"]
276
297
  }
277
298
  }
278
299
  }
package/dist/index.js CHANGED
@@ -670,6 +670,68 @@ program.command("csat").description("View CSAT survey report").option("-d, --day
670
670
  process.exit(1);
671
671
  }
672
672
  });
673
+ program.command("setup-mcp").description("Automatically configure the Yektoo MCP server for Claude Desktop, Cursor, or Claude Code").option("--target <tool>", "Target tool: claude-desktop, cursor, claude-code (required)").action(async (opts) => {
674
+ try {
675
+ if (!opts.target) {
676
+ printError("Please specify a target tool with --target <claude-desktop|cursor|claude-code>");
677
+ process.exit(1);
678
+ }
679
+ const fs = await import("fs");
680
+ const path = await import("path");
681
+ const os = await import("os");
682
+ const mcpEntry = {
683
+ command: "npx",
684
+ args: ["-y", "@yektoo/mcp-server@latest"]
685
+ };
686
+ let configPath;
687
+ let configKey;
688
+ switch (opts.target) {
689
+ case "cursor":
690
+ configPath = path.default.join(process.cwd(), ".cursor", "mcp.json");
691
+ configKey = "mcpServers";
692
+ break;
693
+ case "claude-code":
694
+ configPath = path.default.join(process.cwd(), ".mcp.json");
695
+ configKey = "mcpServers";
696
+ break;
697
+ case "claude-desktop":
698
+ const platform = os.default.platform();
699
+ if (platform === "darwin") {
700
+ configPath = path.default.join(os.default.homedir(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
701
+ } else if (platform === "win32") {
702
+ configPath = path.default.join(process.env.APPDATA || "", "Claude", "claude_desktop_config.json");
703
+ } else {
704
+ configPath = path.default.join(os.default.homedir(), ".config", "Claude", "claude_desktop_config.json");
705
+ }
706
+ configKey = "mcpServers";
707
+ break;
708
+ default:
709
+ printError(`Unknown target "${opts.target}". Use: claude-desktop, cursor, or claude-code`);
710
+ process.exit(1);
711
+ }
712
+ let config2 = {};
713
+ try {
714
+ const existing = fs.default.readFileSync(configPath, "utf-8");
715
+ config2 = JSON.parse(existing);
716
+ } catch {
717
+ }
718
+ if (!config2[configKey]) config2[configKey] = {};
719
+ if (config2[configKey].yektoo) {
720
+ printSuccess(`Yektoo MCP server already configured in ${configPath}`);
721
+ return;
722
+ }
723
+ config2[configKey].yektoo = mcpEntry;
724
+ const dir = path.default.dirname(configPath);
725
+ fs.default.mkdirSync(dir, { recursive: true });
726
+ fs.default.writeFileSync(configPath, JSON.stringify(config2, null, 2) + "\n");
727
+ printSuccess(`Yektoo MCP server added to ${configPath}`);
728
+ console.log(chalk2.gray(` Restart ${opts.target === "cursor" ? "Cursor" : opts.target === "claude-code" ? "Claude Code" : "Claude Desktop"} to activate the 16 helpdesk tools.`));
729
+ console.log();
730
+ } catch (err) {
731
+ printError(err.message);
732
+ process.exit(1);
733
+ }
734
+ });
673
735
  program.command("guide").description("Show detailed usage guide with examples").action(() => {
674
736
  const guide = `
675
737
  ${chalk2.bold("Yektoo CLI \u2014 Customer Support Helpdesk")}
@@ -680,6 +742,9 @@ ${chalk2.bold.underline("Authentication")}
680
742
  ${chalk2.cyan("yektoo login -e you@co.com -p pass")} Non-interactive login
681
743
  ${chalk2.cyan("yektoo logout")} Clear stored session
682
744
  ${chalk2.cyan("yektoo whoami")} Show current user and business
745
+ ${chalk2.cyan("yektoo setup-mcp --target claude-desktop")} Configure MCP for Claude Desktop
746
+ ${chalk2.cyan("yektoo setup-mcp --target cursor")} Configure MCP for Cursor
747
+ ${chalk2.cyan("yektoo setup-mcp --target claude-code")} Configure MCP for Claude Code
683
748
 
684
749
  ${chalk2.bold.underline("Accounts")}
685
750
  ${chalk2.cyan("yektoo email-accounts")} List connected IMAP / Outlook accounts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yektoo/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.4",
4
4
  "description": "Yekto CLI — manage your customer support helpdesk from the terminal",
5
5
  "type": "module",
6
6
  "bin": {