slashvibe-mcp 0.2.9 → 0.3.13

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 (205) hide show
  1. package/README.md +1 -0
  2. package/analytics.js +107 -0
  3. package/auth-store.js +148 -0
  4. package/auto-update.js +130 -0
  5. package/bridges/bridge-monitor.js +388 -0
  6. package/bridges/discord-bot.js +431 -0
  7. package/bridges/farcaster.js +299 -0
  8. package/bridges/telegram.js +261 -0
  9. package/bridges/webhook-health.js +420 -0
  10. package/bridges/webhook-server.js +437 -0
  11. package/bridges/whatsapp.js +441 -0
  12. package/bridges/x-webhook.js +423 -0
  13. package/config.js +154 -5
  14. package/crypto.js +3 -8
  15. package/games/arcade.js +406 -0
  16. package/games/chess.js +451 -0
  17. package/games/colorguess.js +343 -0
  18. package/games/crossword-words.js +171 -0
  19. package/games/crossword.js +461 -0
  20. package/games/drawing.js +347 -0
  21. package/games/gameroulette.js +300 -0
  22. package/games/gamerouter.js +336 -0
  23. package/games/gamestatus.js +337 -0
  24. package/games/guessnumber.js +209 -0
  25. package/games/hangman.js +279 -0
  26. package/games/memory.js +338 -0
  27. package/games/multiplayer-tictactoe.js +389 -0
  28. package/games/pixelart.js +399 -0
  29. package/games/quickduel.js +354 -0
  30. package/games/riddle.js +371 -0
  31. package/games/rockpaperscissors.js +291 -0
  32. package/games/snake.js +406 -0
  33. package/games/storybuilder.js +343 -0
  34. package/games/tictactoe.js +345 -0
  35. package/games/twentyquestions.js +286 -0
  36. package/games/twotruths.js +207 -0
  37. package/games/werewolf.js +508 -0
  38. package/games/wordassociation.js +247 -0
  39. package/games/wordchain.js +135 -0
  40. package/index.js +105 -216
  41. package/intelligence/index.js +45 -0
  42. package/intelligence/infer.js +316 -0
  43. package/intelligence/interests.js +369 -0
  44. package/intelligence/patterns.js +651 -0
  45. package/intelligence/proactive.js +358 -0
  46. package/intelligence/serendipity.js +306 -0
  47. package/memory.js +166 -0
  48. package/notification-emitter.js +77 -0
  49. package/notify.js +102 -1
  50. package/package.json +21 -7
  51. package/prompts.js +1 -1
  52. package/protocol/index.js +161 -1
  53. package/setup.js +402 -0
  54. package/store/api.js +528 -82
  55. package/store/profiles.js +160 -12
  56. package/tools/_actions.js +463 -16
  57. package/tools/_deprecated/auto-suggest-connections.js +304 -0
  58. package/tools/_deprecated/bootstrap-skills.js +231 -0
  59. package/tools/_deprecated/bridge-dashboard.js +342 -0
  60. package/tools/_deprecated/bridge-health.js +400 -0
  61. package/tools/_deprecated/bridge-live.js +384 -0
  62. package/tools/_deprecated/bridges.js +383 -0
  63. package/tools/_deprecated/colorguess.js +281 -0
  64. package/tools/_deprecated/discover-insights.js +379 -0
  65. package/tools/_deprecated/discover-momentum.js +256 -0
  66. package/tools/_deprecated/discovery-analytics.js +345 -0
  67. package/tools/_deprecated/discovery-auto-suggest.js +275 -0
  68. package/tools/_deprecated/discovery-bootstrap.js +267 -0
  69. package/tools/_deprecated/discovery-daily.js +375 -0
  70. package/tools/_deprecated/discovery-dashboard.js +385 -0
  71. package/tools/_deprecated/discovery-digest.js +314 -0
  72. package/tools/_deprecated/discovery-hub.js +357 -0
  73. package/tools/_deprecated/discovery-insights.js +384 -0
  74. package/tools/_deprecated/discovery-momentum.js +281 -0
  75. package/tools/_deprecated/discovery-monitor.js +319 -0
  76. package/tools/_deprecated/discovery-proactive.js +300 -0
  77. package/tools/_deprecated/draw.js +317 -0
  78. package/tools/_deprecated/farcaster.js +307 -0
  79. package/tools/_deprecated/forget.js +119 -0
  80. package/tools/_deprecated/games-catalog.js +376 -0
  81. package/tools/_deprecated/games.js +313 -0
  82. package/tools/_deprecated/guessnumber.js +194 -0
  83. package/tools/_deprecated/hangman.js +129 -0
  84. package/tools/_deprecated/multiplayer-tictactoe.js +303 -0
  85. package/tools/_deprecated/recall.js +147 -0
  86. package/tools/_deprecated/remember.js +86 -0
  87. package/tools/_deprecated/riddle.js +240 -0
  88. package/tools/_deprecated/run-bootstrap.js +69 -0
  89. package/tools/_deprecated/skills-analytics.js +349 -0
  90. package/tools/_deprecated/skills-bootstrap.js +301 -0
  91. package/tools/_deprecated/skills-dashboard.js +268 -0
  92. package/tools/_deprecated/skills.js +380 -0
  93. package/tools/_deprecated/smart-intro.js +353 -0
  94. package/tools/_deprecated/storybuilder.js +331 -0
  95. package/tools/_deprecated/telegram-bot.js +183 -0
  96. package/tools/_deprecated/telegram-setup.js +214 -0
  97. package/tools/_deprecated/twentyquestions.js +143 -0
  98. package/tools/_discovery-enhanced.js +290 -0
  99. package/tools/_discovery.js +439 -0
  100. package/tools/_proactive-discovery.js +301 -0
  101. package/tools/_shared/index.js +64 -0
  102. package/tools/_shared.js +234 -0
  103. package/tools/_work-context.js +338 -0
  104. package/tools/_work-context.manual-test.js +199 -0
  105. package/tools/_work-context.test.js +260 -0
  106. package/tools/activity.js +220 -0
  107. package/tools/admin-inbox.js +218 -0
  108. package/tools/agent-treasury.js +288 -0
  109. package/tools/analytics.js +191 -0
  110. package/tools/approve.js +197 -0
  111. package/tools/arcade.js +173 -0
  112. package/tools/artifact-create.js +17 -11
  113. package/tools/artifact-view.js +31 -1
  114. package/tools/artifacts-price.js +47 -43
  115. package/tools/ask-expert.js +160 -0
  116. package/tools/available.js +120 -0
  117. package/tools/become-expert.js +150 -0
  118. package/tools/broadcast.js +286 -0
  119. package/tools/chat.js +202 -0
  120. package/tools/collaborative-drawing.js +286 -0
  121. package/tools/connection-status.js +178 -0
  122. package/tools/crossword.js +17 -1
  123. package/tools/discover.js +350 -34
  124. package/tools/dm.js +115 -73
  125. package/tools/drawing.js +1 -1
  126. package/tools/earnings.js +126 -0
  127. package/tools/echo.js +16 -0
  128. package/tools/feed.js +51 -7
  129. package/tools/follow.js +224 -0
  130. package/tools/friends.js +207 -0
  131. package/tools/game.js +2 -2
  132. package/tools/genesis.js +233 -0
  133. package/tools/gig-browse.js +206 -0
  134. package/tools/gig-complete.js +144 -0
  135. package/tools/handoff.js +7 -1
  136. package/tools/help.js +4 -4
  137. package/tools/idea.js +9 -2
  138. package/tools/inbox.js +334 -28
  139. package/tools/init.js +727 -36
  140. package/tools/invite.js +15 -4
  141. package/tools/l2-bridge.js +272 -0
  142. package/tools/l2-status.js +217 -0
  143. package/tools/l2.js +206 -0
  144. package/tools/migrate.js +156 -0
  145. package/tools/mint.js +377 -0
  146. package/tools/multiplayer-game.js +1 -1
  147. package/tools/notifications.js +415 -0
  148. package/tools/observe.js +200 -0
  149. package/tools/onboarding.js +147 -0
  150. package/tools/open.js +143 -12
  151. package/tools/party-game.js +2 -2
  152. package/tools/plan.js +225 -0
  153. package/tools/presence-agent.js +7 -0
  154. package/tools/proof-of-work.js +100 -104
  155. package/tools/pulse.js +218 -0
  156. package/tools/reply.js +166 -0
  157. package/tools/report.js +2 -2
  158. package/tools/reputation.js +175 -0
  159. package/tools/request.js +17 -3
  160. package/tools/schedule.js +367 -0
  161. package/tools/search-messages.js +123 -0
  162. package/tools/session.js +420 -0
  163. package/tools/session_price.js +128 -0
  164. package/tools/settings.js +126 -3
  165. package/tools/ship.js +31 -8
  166. package/tools/shipback.js +326 -0
  167. package/tools/smart-check.js +201 -0
  168. package/tools/social-processor.js +445 -0
  169. package/tools/solo-game.js +1 -1
  170. package/tools/start.js +335 -93
  171. package/tools/status.js +53 -6
  172. package/tools/stuck.js +297 -0
  173. package/tools/subscribe.js +148 -0
  174. package/tools/subscriptions.js +134 -0
  175. package/tools/suggest-tags.js +6 -8
  176. package/tools/tag-suggestions.js +257 -0
  177. package/tools/tip.js +193 -0
  178. package/tools/token.js +103 -0
  179. package/tools/update.js +1 -1
  180. package/tools/wallet.js +239 -186
  181. package/tools/watch.js +157 -0
  182. package/tools/webhook-test.js +388 -0
  183. package/tools/who.js +54 -3
  184. package/tools/withdraw.js +145 -0
  185. package/tools/work-summary.js +96 -0
  186. package/tools/workshop.js +327 -0
  187. package/tools/x-mentions.js +1 -1
  188. package/version.json +14 -3
  189. package/tools/artifacts-buy.js +0 -111
  190. package/tools/connect.js +0 -284
  191. package/tools/gigs-apply.js +0 -99
  192. package/tools/gigs-browse.js +0 -114
  193. package/tools/gigs-complete.js +0 -128
  194. package/tools/gigs-post.js +0 -140
  195. package/tools/live-off.js +0 -109
  196. package/tools/live-watch.js +0 -176
  197. package/tools/live.js +0 -128
  198. package/tools/sessions-browse.js +0 -105
  199. package/tools/whats-happening.js +0 -125
  200. /package/tools/{away.js → _deprecated/away.js} +0 -0
  201. /package/tools/{back.js → _deprecated/back.js} +0 -0
  202. /package/tools/{mute.js → _deprecated/mute.js} +0 -0
  203. /package/tools/{skills-exchange.js → _deprecated/skills-exchange.js} +0 -0
  204. /package/tools/{tictactoe.js → _deprecated/tictactoe.js} +0 -0
  205. /package/tools/{wordassociation.js → _deprecated/wordassociation.js} +0 -0
package/setup.js ADDED
@@ -0,0 +1,402 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * vibe setup — One-click installation for /vibe MCP server
5
+ *
6
+ * Usage: npx slashvibe-mcp setup
7
+ *
8
+ * What it does:
9
+ * 1. Detects Claude Code config location (~/.claude.json or ~/claude_desktop_config.json)
10
+ * 2. Adds /vibe MCP server to the config
11
+ * 3. Tests the connection
12
+ * 4. Opens browser for GitHub auth
13
+ *
14
+ * Result: User is fully set up in ~30 seconds
15
+ */
16
+
17
+ const fs = require('fs');
18
+ const path = require('path');
19
+ const os = require('os');
20
+ const { exec, execSync } = require('child_process');
21
+ const http = require('http');
22
+
23
+ // ANSI colors for terminal output
24
+ const colors = {
25
+ reset: '\x1b[0m',
26
+ green: '\x1b[32m',
27
+ cyan: '\x1b[36m',
28
+ yellow: '\x1b[33m',
29
+ red: '\x1b[31m',
30
+ bold: '\x1b[1m',
31
+ dim: '\x1b[2m'
32
+ };
33
+
34
+ const CALLBACK_PORT = 9876;
35
+ const API_BASE = 'https://www.slashvibe.dev';
36
+ const LOGIN_URL = 'https://www.slashvibe.dev/login';
37
+
38
+ /**
39
+ * Print styled banner
40
+ */
41
+ function printBanner() {
42
+ console.log(`
43
+ ${colors.green} █░█ █ █▄▄ █▀▀${colors.reset}
44
+ ${colors.green} ▀▄▀ █ █▄█ ██▄${colors.reset} ${colors.dim}ship together${colors.reset}
45
+ ──────────────────────────────────────────────────
46
+ `);
47
+ }
48
+
49
+ /**
50
+ * Print step with status
51
+ */
52
+ function printStep(num, text, status = 'pending') {
53
+ const statusIcon = {
54
+ pending: colors.dim + '○' + colors.reset,
55
+ running: colors.yellow + '◐' + colors.reset,
56
+ done: colors.green + '●' + colors.reset,
57
+ error: colors.red + '✗' + colors.reset
58
+ }[status];
59
+
60
+ console.log(` ${statusIcon} ${colors.bold}Step ${num}:${colors.reset} ${text}`);
61
+ }
62
+
63
+ /**
64
+ * Find Claude Code config file
65
+ */
66
+ function findClaudeConfig() {
67
+ const homeDir = os.homedir();
68
+
69
+ // Possible config locations
70
+ const configPaths = [
71
+ path.join(homeDir, '.claude.json'),
72
+ path.join(homeDir, 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json'),
73
+ path.join(homeDir, '.config', 'claude', 'config.json'),
74
+ path.join(homeDir, 'AppData', 'Roaming', 'Claude', 'claude_desktop_config.json')
75
+ ];
76
+
77
+ for (const configPath of configPaths) {
78
+ if (fs.existsSync(configPath)) {
79
+ return configPath;
80
+ }
81
+ }
82
+
83
+ // Default to ~/.claude.json (will create if doesn't exist)
84
+ return path.join(homeDir, '.claude.json');
85
+ }
86
+
87
+ /**
88
+ * Load existing config or create default
89
+ */
90
+ function loadConfig(configPath) {
91
+ try {
92
+ if (fs.existsSync(configPath)) {
93
+ const content = fs.readFileSync(configPath, 'utf8');
94
+ return JSON.parse(content);
95
+ }
96
+ } catch (e) {
97
+ console.log(`${colors.yellow} Warning: Could not parse existing config, creating new one${colors.reset}`);
98
+ }
99
+
100
+ // Default config structure
101
+ return {};
102
+ }
103
+
104
+ /**
105
+ * Add /vibe MCP server to config
106
+ */
107
+ function addVibeToConfig(config) {
108
+ // Initialize mcpServers if not present
109
+ if (!config.mcpServers) {
110
+ config.mcpServers = {};
111
+ }
112
+
113
+ // Check if already configured
114
+ if (config.mcpServers.vibe) {
115
+ return { added: false, alreadyExists: true };
116
+ }
117
+
118
+ // Add vibe MCP server
119
+ config.mcpServers.vibe = {
120
+ command: 'npx',
121
+ args: ['slashvibe-mcp'],
122
+ env: {
123
+ VIBE_API_URL: 'https://www.slashvibe.dev'
124
+ }
125
+ };
126
+
127
+ return { added: true, alreadyExists: false };
128
+ }
129
+
130
+ /**
131
+ * Save config to file
132
+ */
133
+ function saveConfig(configPath, config) {
134
+ const content = JSON.stringify(config, null, 2);
135
+ fs.writeFileSync(configPath, content, 'utf8');
136
+ }
137
+
138
+ /**
139
+ * Test API connection
140
+ */
141
+ async function testConnection() {
142
+ try {
143
+ const response = await fetch(`${API_BASE}/api/health`);
144
+ const data = await response.json();
145
+ return data.status === 'ok' || data.success;
146
+ } catch (e) {
147
+ return false;
148
+ }
149
+ }
150
+
151
+ /**
152
+ * Get online count
153
+ */
154
+ async function getOnlineCount() {
155
+ try {
156
+ const response = await fetch(`${API_BASE}/api/presence`);
157
+ const data = await response.json();
158
+ return (data.active?.length || 0) + (data.away?.length || 0);
159
+ } catch (e) {
160
+ return 0;
161
+ }
162
+ }
163
+
164
+ /**
165
+ * Open URL in browser
166
+ */
167
+ function openBrowser(url) {
168
+ const platform = process.platform;
169
+ let command;
170
+
171
+ if (platform === 'darwin') {
172
+ command = `open "${url}"`;
173
+ } else if (platform === 'win32') {
174
+ command = `start "" "${url}"`;
175
+ } else {
176
+ command = `xdg-open "${url}"`;
177
+ }
178
+
179
+ exec(command, (err) => {
180
+ if (err) {
181
+ console.log(`${colors.yellow} Could not open browser automatically.${colors.reset}`);
182
+ console.log(`${colors.cyan} Please open: ${url}${colors.reset}`);
183
+ }
184
+ });
185
+ }
186
+
187
+ /**
188
+ * Wait for OAuth callback
189
+ */
190
+ function waitForAuth() {
191
+ return new Promise((resolve, reject) => {
192
+ let resolved = false;
193
+
194
+ const server = http.createServer(async (req, res) => {
195
+ const url = new URL(req.url, `http://localhost:${CALLBACK_PORT}`);
196
+
197
+ if (url.pathname === '/callback') {
198
+ const token = url.searchParams.get('token');
199
+ const handle = url.searchParams.get('handle');
200
+
201
+ if (token && handle) {
202
+ // Send success page
203
+ res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
204
+ res.end(`<!DOCTYPE html>
205
+ <html>
206
+ <head>
207
+ <title>Welcome to /vibe!</title>
208
+ <style>
209
+ body {
210
+ font-family: 'SF Mono', Monaco, monospace;
211
+ background: #0a0a0a;
212
+ color: #e0e0e0;
213
+ display: flex;
214
+ justify-content: center;
215
+ align-items: center;
216
+ min-height: 100vh;
217
+ margin: 0;
218
+ }
219
+ .container {
220
+ text-align: center;
221
+ padding: 2rem;
222
+ }
223
+ h1 { color: #00FF88; }
224
+ .handle { color: #6B8FFF; }
225
+ .close { color: #888; margin-top: 2rem; }
226
+ </style>
227
+ </head>
228
+ <body>
229
+ <div class="container">
230
+ <h1>✓ Setup Complete!</h1>
231
+ <p>Welcome, <span class="handle">@${handle}</span></p>
232
+ <p>You're now connected to /vibe</p>
233
+ <p class="close">You can close this window</p>
234
+ </div>
235
+ </body>
236
+ </html>`);
237
+
238
+ resolved = true;
239
+ setTimeout(() => server.close(), 500);
240
+ resolve({ success: true, handle, token });
241
+ } else {
242
+ res.writeHead(400);
243
+ res.end('Missing token or handle');
244
+ }
245
+ } else {
246
+ res.writeHead(404);
247
+ res.end('Not found');
248
+ }
249
+ });
250
+
251
+ server.on('error', (err) => {
252
+ if (err.code === 'EADDRINUSE') {
253
+ reject(new Error('Auth server port in use'));
254
+ } else {
255
+ reject(err);
256
+ }
257
+ });
258
+
259
+ server.listen(CALLBACK_PORT, '127.0.0.1');
260
+
261
+ // Timeout after 2 minutes
262
+ setTimeout(() => {
263
+ if (!resolved) {
264
+ server.close();
265
+ reject(new Error('Auth timed out'));
266
+ }
267
+ }, 120000);
268
+ });
269
+ }
270
+
271
+ /**
272
+ * Save auth config
273
+ */
274
+ function saveAuthConfig(handle, token) {
275
+ const homeDir = os.homedir();
276
+ const vibeDir = path.join(homeDir, '.vibe');
277
+
278
+ // Create .vibe directory if not exists
279
+ if (!fs.existsSync(vibeDir)) {
280
+ fs.mkdirSync(vibeDir, { recursive: true });
281
+ }
282
+
283
+ // Save config
284
+ const configPath = path.join(vibeDir, 'config.json');
285
+ const config = {
286
+ handle,
287
+ authToken: token,
288
+ authMethod: 'browser',
289
+ authenticatedAt: new Date().toISOString()
290
+ };
291
+
292
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
293
+ }
294
+
295
+ /**
296
+ * Main setup function
297
+ */
298
+ async function setup() {
299
+ printBanner();
300
+ console.log(`${colors.bold} One-Click Setup${colors.reset}`);
301
+ console.log('');
302
+
303
+ // Step 1: Find Claude config
304
+ printStep(1, 'Finding Claude Code config...', 'running');
305
+ const configPath = findClaudeConfig();
306
+ const configExists = fs.existsSync(configPath);
307
+ console.log(`${colors.dim} → ${configPath}${configExists ? '' : ' (will create)'}${colors.reset}`);
308
+ printStep(1, 'Finding Claude Code config...', 'done');
309
+
310
+ // Step 2: Add MCP config
311
+ printStep(2, 'Adding /vibe MCP server...', 'running');
312
+ const config = loadConfig(configPath);
313
+ const { added, alreadyExists } = addVibeToConfig(config);
314
+
315
+ if (alreadyExists) {
316
+ console.log(`${colors.dim} → Already configured!${colors.reset}`);
317
+ } else {
318
+ saveConfig(configPath, config);
319
+ console.log(`${colors.dim} → Config updated${colors.reset}`);
320
+ }
321
+ printStep(2, 'Adding /vibe MCP server...', 'done');
322
+
323
+ // Step 3: Test connection
324
+ printStep(3, 'Testing connection...', 'running');
325
+ const connected = await testConnection();
326
+ if (!connected) {
327
+ printStep(3, 'Testing connection...', 'error');
328
+ console.log(`${colors.red} → Could not reach slashvibe.dev${colors.reset}`);
329
+ console.log(`${colors.yellow} → Check your internet connection and try again${colors.reset}`);
330
+ process.exit(1);
331
+ }
332
+
333
+ const onlineCount = await getOnlineCount();
334
+ console.log(`${colors.dim} → Connected! ${onlineCount} builders online${colors.reset}`);
335
+ printStep(3, 'Testing connection...', 'done');
336
+
337
+ // Step 4: Authenticate
338
+ printStep(4, 'Opening browser for GitHub auth...', 'running');
339
+
340
+ const callbackUrl = `http://localhost:${CALLBACK_PORT}/callback`;
341
+ const loginUrl = `${LOGIN_URL}?redirect=${encodeURIComponent(callbackUrl)}&setup=true`;
342
+
343
+ openBrowser(loginUrl);
344
+ console.log(`${colors.dim} → Waiting for authentication...${colors.reset}`);
345
+
346
+ try {
347
+ const authResult = await waitForAuth();
348
+
349
+ // Save auth config
350
+ saveAuthConfig(authResult.handle, authResult.token);
351
+
352
+ printStep(4, 'Opening browser for GitHub auth...', 'done');
353
+ console.log(`${colors.dim} → Authenticated as @${authResult.handle}${colors.reset}`);
354
+
355
+ // Success!
356
+ console.log('');
357
+ console.log(`${colors.green} ✓ Setup complete!${colors.reset}`);
358
+ console.log('');
359
+ console.log(`${colors.bold} What's next:${colors.reset}`);
360
+ console.log(`${colors.dim} 1. Restart Claude Code to load /vibe${colors.reset}`);
361
+ console.log(`${colors.dim} 2. Say "let's vibe" to see who's online${colors.reset}`);
362
+ console.log(`${colors.dim} 3. Check your welcome message from @seth${colors.reset}`);
363
+ console.log('');
364
+ console.log(`${colors.cyan} 🚀 Welcome to /vibe, @${authResult.handle}!${colors.reset}`);
365
+ console.log('');
366
+
367
+ // Track setup completion
368
+ try {
369
+ await fetch(`${API_BASE}/api/analytics/track`, {
370
+ method: 'POST',
371
+ headers: { 'Content-Type': 'application/json' },
372
+ body: JSON.stringify({
373
+ event: 'setup_complete',
374
+ handle: authResult.handle,
375
+ source: 'one_click_install'
376
+ })
377
+ });
378
+ } catch (e) {}
379
+
380
+ } catch (err) {
381
+ printStep(4, 'Opening browser for GitHub auth...', 'error');
382
+ console.log(`${colors.red} → ${err.message}${colors.reset}`);
383
+ console.log('');
384
+ console.log(`${colors.yellow} Manual setup:${colors.reset}`);
385
+ console.log(`${colors.dim} 1. Run: vibe init${colors.reset}`);
386
+ console.log(`${colors.dim} 2. Complete auth in browser${colors.reset}`);
387
+ process.exit(1);
388
+ }
389
+ }
390
+
391
+ // Handle command line
392
+ const args = process.argv.slice(2);
393
+
394
+ if (args[0] === 'setup' || args.length === 0) {
395
+ setup().catch(err => {
396
+ console.error(`${colors.red}Setup failed: ${err.message}${colors.reset}`);
397
+ process.exit(1);
398
+ });
399
+ } else {
400
+ // Pass through to main MCP server
401
+ require('./index.js');
402
+ }