@artyfacts/claude 1.3.15 → 1.3.17

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/dist/cli.js CHANGED
@@ -902,31 +902,26 @@ var McpHandler = class {
902
902
  if (oauthServer) {
903
903
  const result = addMcpServer({
904
904
  name: serverName,
905
- transport: "http",
906
- url: oauthServer.url
905
+ transport: "stdio",
906
+ command: "npx",
907
+ args: ["-y", "mcp-remote", oauthServer.url]
907
908
  });
908
909
  if (!result.success) {
909
910
  throw new Error(`Failed to add ${platform} MCP: ${result.error}`);
910
911
  }
911
- console.log(`[MCP] Added ${serverName} \u2192 ${oauthServer.url}`);
912
- console.log(`[MCP] Triggering OAuth flow for ${platform}...`);
913
- const oauthResult = (0, import_child_process2.spawnSync)("claude", [
914
- "-p",
915
- `List the available tools from the ${platform} MCP server`,
916
- "--allowedTools",
917
- `mcp__${serverName}__*`,
918
- "--max-budget-usd",
919
- "0.01"
920
- ], {
912
+ console.log(`[MCP] Added ${serverName} via mcp-remote`);
913
+ console.log(`[MCP] Triggering ${platform} OAuth...`);
914
+ const oauthProcess = (0, import_child_process2.spawnSync)("npx", ["-y", "mcp-remote", oauthServer.url], {
921
915
  encoding: "utf-8",
922
- stdio: ["pipe", "pipe", "pipe"],
923
- timeout: 6e4
924
- // 60 second timeout for OAuth
916
+ stdio: "inherit",
917
+ // Show output and allow browser to open
918
+ timeout: 12e4
919
+ // 2 minute timeout for user to complete OAuth
925
920
  });
926
- if (oauthResult.status === 0) {
927
- console.log(`[MCP] OAuth completed for ${platform}`);
921
+ if (oauthProcess.status === 0) {
922
+ console.log(`[MCP] ${platform} OAuth completed!`);
928
923
  } else {
929
- console.log(`[MCP] OAuth may still be pending - use ${platform} tools to complete login`);
924
+ console.log(`[MCP] OAuth process ended - check browser for login`);
930
925
  }
931
926
  } else {
932
927
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];
@@ -1311,7 +1306,7 @@ async function runAgent(options) {
1311
1306
  onConfigured: (connectionId, platform) => {
1312
1307
  console.log(`
1313
1308
  \u{1F527} [MCP] Configured ${platform} connection: ${connectionId}`);
1314
- console.log(" \u{1F4A1} Try using the tools now - OAuth prompts once on first use");
1309
+ console.log(" \u2728 MCP server configured! Follow the OAuth instructions above.");
1315
1310
  },
1316
1311
  onError: (error, connectionId) => {
1317
1312
  console.error(`
package/dist/cli.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getCredentials,
8
8
  loadCredentials,
9
9
  promptForApiKey
10
- } from "./chunk-AYBVMTRQ.mjs";
10
+ } from "./chunk-GZQ2C7RT.mjs";
11
11
 
12
12
  // src/cli.ts
13
13
  import { Command } from "commander";
@@ -287,7 +287,7 @@ async function runAgent(options) {
287
287
  onConfigured: (connectionId, platform) => {
288
288
  console.log(`
289
289
  \u{1F527} [MCP] Configured ${platform} connection: ${connectionId}`);
290
- console.log(" \u{1F4A1} Try using the tools now - OAuth prompts once on first use");
290
+ console.log(" \u2728 MCP server configured! Follow the OAuth instructions above.");
291
291
  },
292
292
  onError: (error, connectionId) => {
293
293
  console.error(`
package/dist/index.js CHANGED
@@ -6095,31 +6095,26 @@ var McpHandler = class {
6095
6095
  if (oauthServer) {
6096
6096
  const result = addMcpServer({
6097
6097
  name: serverName,
6098
- transport: "http",
6099
- url: oauthServer.url
6098
+ transport: "stdio",
6099
+ command: "npx",
6100
+ args: ["-y", "mcp-remote", oauthServer.url]
6100
6101
  });
6101
6102
  if (!result.success) {
6102
6103
  throw new Error(`Failed to add ${platform} MCP: ${result.error}`);
6103
6104
  }
6104
- console.log(`[MCP] Added ${serverName} \u2192 ${oauthServer.url}`);
6105
- console.log(`[MCP] Triggering OAuth flow for ${platform}...`);
6106
- const oauthResult = (0, import_child_process2.spawnSync)("claude", [
6107
- "-p",
6108
- `List the available tools from the ${platform} MCP server`,
6109
- "--allowedTools",
6110
- `mcp__${serverName}__*`,
6111
- "--max-budget-usd",
6112
- "0.01"
6113
- ], {
6105
+ console.log(`[MCP] Added ${serverName} via mcp-remote`);
6106
+ console.log(`[MCP] Triggering ${platform} OAuth...`);
6107
+ const oauthProcess = (0, import_child_process2.spawnSync)("npx", ["-y", "mcp-remote", oauthServer.url], {
6114
6108
  encoding: "utf-8",
6115
- stdio: ["pipe", "pipe", "pipe"],
6116
- timeout: 6e4
6117
- // 60 second timeout for OAuth
6109
+ stdio: "inherit",
6110
+ // Show output and allow browser to open
6111
+ timeout: 12e4
6112
+ // 2 minute timeout for user to complete OAuth
6118
6113
  });
6119
- if (oauthResult.status === 0) {
6120
- console.log(`[MCP] OAuth completed for ${platform}`);
6114
+ if (oauthProcess.status === 0) {
6115
+ console.log(`[MCP] ${platform} OAuth completed!`);
6121
6116
  } else {
6122
- console.log(`[MCP] OAuth may still be pending - use ${platform} tools to complete login`);
6117
+ console.log(`[MCP] OAuth process ended - check browser for login`);
6123
6118
  }
6124
6119
  } else {
6125
6120
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  promptForApiKey,
15
15
  runDeviceAuth,
16
16
  saveCredentials
17
- } from "./chunk-AYBVMTRQ.mjs";
17
+ } from "./chunk-GZQ2C7RT.mjs";
18
18
 
19
19
  // node_modules/@anthropic-ai/sdk/internal/tslib.mjs
20
20
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artyfacts/claude",
3
- "version": "1.3.15",
3
+ "version": "1.3.17",
4
4
  "description": "Claude adapter for Artyfacts - Execute tasks using Claude Code CLI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/cli.ts CHANGED
@@ -438,7 +438,7 @@ async function runAgent(options: {
438
438
  baseUrl: options.baseUrl,
439
439
  onConfigured: (connectionId, platform) => {
440
440
  console.log(`\nšŸ”§ [MCP] Configured ${platform} connection: ${connectionId}`);
441
- console.log(' šŸ’” Try using the tools now - OAuth prompts once on first use');
441
+ console.log(' ✨ MCP server configured! Follow the OAuth instructions above.');
442
442
  },
443
443
  onError: (error, connectionId) => {
444
444
  console.error(`\nāŒ [MCP] Failed to configure connection ${connectionId}:`, error.message);
package/src/mcp.ts CHANGED
@@ -46,9 +46,8 @@ const DEFAULT_BASE_URL = 'https://artyfacts.dev/api/v1';
46
46
  // ============================================================================
47
47
 
48
48
  /**
49
- * URL-based MCP servers with built-in OAuth
50
- * These open a browser for authentication automatically - no credentials needed!
51
- * Uses `claude mcp add --transport http <name> <url>`
49
+ * URL-based MCP servers with OAuth support
50
+ * Uses `npx mcp-remote <url>` which handles OAuth automatically
52
51
  */
53
52
  const OAUTH_MCP_SERVERS: Record<string, { url: string; name: string }> = {
54
53
  supabase: {
@@ -171,38 +170,35 @@ export class McpHandler {
171
170
  try {
172
171
  const serverName = mcpConfig?.server_name || platform;
173
172
 
174
- // Check if this is an OAuth-based server (no credentials needed!)
173
+ // Check if this is an OAuth-based server
175
174
  const oauthServer = OAUTH_MCP_SERVERS[platform];
176
175
  if (oauthServer) {
177
- // URL-based MCP server with built-in OAuth
176
+ // Use mcp-remote for OAuth handling - it opens browser automatically
178
177
  const result = addMcpServer({
179
178
  name: serverName,
180
- transport: 'http',
181
- url: oauthServer.url,
179
+ transport: 'stdio',
180
+ command: 'npx',
181
+ args: ['-y', 'mcp-remote', oauthServer.url],
182
182
  });
183
183
 
184
184
  if (!result.success) {
185
185
  throw new Error(`Failed to add ${platform} MCP: ${result.error}`);
186
186
  }
187
187
 
188
- console.log(`[MCP] Added ${serverName} → ${oauthServer.url}`);
188
+ console.log(`[MCP] Added ${serverName} via mcp-remote`);
189
189
 
190
- // Trigger OAuth immediately by making Claude use the MCP server
191
- console.log(`[MCP] Triggering OAuth flow for ${platform}...`);
192
- const oauthResult = spawnSync('claude', [
193
- '-p', `List the available tools from the ${platform} MCP server`,
194
- '--allowedTools', `mcp__${serverName}__*`,
195
- '--max-budget-usd', '0.01',
196
- ], {
190
+ // Trigger OAuth by running the MCP server - mcp-remote will open browser
191
+ console.log(`[MCP] Triggering ${platform} OAuth...`);
192
+ const oauthProcess = spawnSync('npx', ['-y', 'mcp-remote', oauthServer.url], {
197
193
  encoding: 'utf-8',
198
- stdio: ['pipe', 'pipe', 'pipe'],
199
- timeout: 60000, // 60 second timeout for OAuth
194
+ stdio: 'inherit', // Show output and allow browser to open
195
+ timeout: 120000, // 2 minute timeout for user to complete OAuth
200
196
  });
201
197
 
202
- if (oauthResult.status === 0) {
203
- console.log(`[MCP] OAuth completed for ${platform}`);
198
+ if (oauthProcess.status === 0) {
199
+ console.log(`[MCP] ${platform} OAuth completed!`);
204
200
  } else {
205
- console.log(`[MCP] OAuth may still be pending - use ${platform} tools to complete login`);
201
+ console.log(`[MCP] OAuth process ended - check browser for login`);
206
202
  }
207
203
  } else {
208
204
  // Command-based MCP server - needs credentials