@artyfacts/claude 1.3.16 → 1.3.18

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
@@ -909,16 +909,26 @@ var McpHandler = class {
909
909
  throw new Error(`Failed to add ${platform} MCP: ${result.error}`);
910
910
  }
911
911
  console.log(`[MCP] Added ${serverName} \u2192 ${oauthServer.url}`);
912
- console.log("");
913
- console.log(` \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E`);
914
- console.log(` \u2502 \u{1F510} Complete ${platform.toUpperCase()} OAuth \u2502`);
915
- console.log(` \u2502 \u2502`);
916
- console.log(` \u2502 Run: claude \u2502`);
917
- console.log(` \u2502 Then ask: "List my ${platform} files" \u2502`);
918
- console.log(` \u2502 \u2502`);
919
- console.log(` \u2502 This triggers one-time login in browser. \u2502`);
920
- console.log(` \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`);
921
- console.log("");
912
+ console.log(`[MCP] Triggering ${platform} OAuth via Claude...`);
913
+ const oauthProcess = (0, import_child_process2.spawnSync)("claude", [
914
+ "-p",
915
+ `Please list the available tools from the ${platform} MCP server. Just list them briefly.`,
916
+ "--allowedTools",
917
+ `mcp__${serverName}__*`,
918
+ "--permission-mode",
919
+ "default"
920
+ ], {
921
+ encoding: "utf-8",
922
+ stdio: "inherit",
923
+ // Show output and allow browser interaction
924
+ timeout: 12e4
925
+ // 2 minute timeout for user to complete OAuth
926
+ });
927
+ if (oauthProcess.status === 0) {
928
+ console.log(`[MCP] ${platform} OAuth completed!`);
929
+ } else {
930
+ console.log(`[MCP] OAuth may need completion - try using ${platform} tools in Claude`);
931
+ }
922
932
  } else {
923
933
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];
924
934
  if (!configBuilder) {
package/dist/cli.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getCredentials,
8
8
  loadCredentials,
9
9
  promptForApiKey
10
- } from "./chunk-RQX2RXTA.mjs";
10
+ } from "./chunk-SKROECYN.mjs";
11
11
 
12
12
  // src/cli.ts
13
13
  import { Command } from "commander";
package/dist/index.js CHANGED
@@ -6102,16 +6102,26 @@ var McpHandler = class {
6102
6102
  throw new Error(`Failed to add ${platform} MCP: ${result.error}`);
6103
6103
  }
6104
6104
  console.log(`[MCP] Added ${serverName} \u2192 ${oauthServer.url}`);
6105
- console.log("");
6106
- console.log(` \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E`);
6107
- console.log(` \u2502 \u{1F510} Complete ${platform.toUpperCase()} OAuth \u2502`);
6108
- console.log(` \u2502 \u2502`);
6109
- console.log(` \u2502 Run: claude \u2502`);
6110
- console.log(` \u2502 Then ask: "List my ${platform} files" \u2502`);
6111
- console.log(` \u2502 \u2502`);
6112
- console.log(` \u2502 This triggers one-time login in browser. \u2502`);
6113
- console.log(` \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`);
6114
- console.log("");
6105
+ console.log(`[MCP] Triggering ${platform} OAuth via Claude...`);
6106
+ const oauthProcess = (0, import_child_process2.spawnSync)("claude", [
6107
+ "-p",
6108
+ `Please list the available tools from the ${platform} MCP server. Just list them briefly.`,
6109
+ "--allowedTools",
6110
+ `mcp__${serverName}__*`,
6111
+ "--permission-mode",
6112
+ "default"
6113
+ ], {
6114
+ encoding: "utf-8",
6115
+ stdio: "inherit",
6116
+ // Show output and allow browser interaction
6117
+ timeout: 12e4
6118
+ // 2 minute timeout for user to complete OAuth
6119
+ });
6120
+ if (oauthProcess.status === 0) {
6121
+ console.log(`[MCP] ${platform} OAuth completed!`);
6122
+ } else {
6123
+ console.log(`[MCP] OAuth may need completion - try using ${platform} tools in Claude`);
6124
+ }
6115
6125
  } else {
6116
6126
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];
6117
6127
  if (!configBuilder) {
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  promptForApiKey,
15
15
  runDeviceAuth,
16
16
  saveCredentials
17
- } from "./chunk-RQX2RXTA.mjs";
17
+ } from "./chunk-SKROECYN.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.16",
3
+ "version": "1.3.18",
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/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,10 +170,10 @@ 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 http transport - Claude handles OAuth natively
178
177
  const result = addMcpServer({
179
178
  name: serverName,
180
179
  transport: 'http',
@@ -186,16 +185,25 @@ export class McpHandler {
186
185
  }
187
186
 
188
187
  console.log(`[MCP] Added ${serverName} → ${oauthServer.url}`);
189
- console.log('');
190
- console.log(` ╭──────────────────────────────────────────────╮`);
191
- console.log(` │ 🔐 Complete ${platform.toUpperCase()} OAuth │`);
192
- console.log(` │ │`);
193
- console.log(` │ Run: claude │`);
194
- console.log(` │ Then ask: "List my ${platform} files" │`);
195
- console.log(` │ │`);
196
- console.log(` │ This triggers one-time login in browser. │`);
197
- console.log(` ╰──────────────────────────────────────────────╯`);
198
- console.log('');
188
+
189
+ // Trigger OAuth by asking Claude to use the MCP - this opens browser!
190
+ console.log(`[MCP] Triggering ${platform} OAuth via Claude...`);
191
+ const oauthProcess = spawnSync('claude', [
192
+ '-p',
193
+ `Please list the available tools from the ${platform} MCP server. Just list them briefly.`,
194
+ '--allowedTools', `mcp__${serverName}__*`,
195
+ '--permission-mode', 'default',
196
+ ], {
197
+ encoding: 'utf-8',
198
+ stdio: 'inherit', // Show output and allow browser interaction
199
+ timeout: 120000, // 2 minute timeout for user to complete OAuth
200
+ });
201
+
202
+ if (oauthProcess.status === 0) {
203
+ console.log(`[MCP] ${platform} OAuth completed!`);
204
+ } else {
205
+ console.log(`[MCP] OAuth may need completion - try using ${platform} tools in Claude`);
206
+ }
199
207
  } else {
200
208
  // Command-based MCP server - needs credentials
201
209
  const configBuilder = CREDENTIAL_MCP_CONFIGS[platform];