@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/chunk-GZQ2C7RT.mjs +1018 -0
- package/dist/chunk-RQX2RXTA.mjs +1014 -0
- package/dist/cli.js +14 -19
- package/dist/cli.mjs +2 -2
- package/dist/index.js +13 -18
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/cli.ts +1 -1
- package/src/mcp.ts +16 -20
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: "
|
|
906
|
-
|
|
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}
|
|
912
|
-
console.log(`[MCP] Triggering
|
|
913
|
-
const
|
|
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:
|
|
923
|
-
|
|
924
|
-
|
|
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 (
|
|
927
|
-
console.log(`[MCP]
|
|
921
|
+
if (oauthProcess.status === 0) {
|
|
922
|
+
console.log(`[MCP] ${platform} OAuth completed!`);
|
|
928
923
|
} else {
|
|
929
|
-
console.log(`[MCP] OAuth
|
|
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(" \
|
|
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-
|
|
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(" \
|
|
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: "
|
|
6099
|
-
|
|
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}
|
|
6105
|
-
console.log(`[MCP] Triggering
|
|
6106
|
-
const
|
|
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:
|
|
6116
|
-
|
|
6117
|
-
|
|
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 (
|
|
6120
|
-
console.log(`[MCP]
|
|
6114
|
+
if (oauthProcess.status === 0) {
|
|
6115
|
+
console.log(`[MCP] ${platform} OAuth completed!`);
|
|
6121
6116
|
} else {
|
|
6122
|
-
console.log(`[MCP] OAuth
|
|
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-
|
|
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
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('
|
|
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
|
|
50
|
-
*
|
|
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
|
|
173
|
+
// Check if this is an OAuth-based server
|
|
175
174
|
const oauthServer = OAUTH_MCP_SERVERS[platform];
|
|
176
175
|
if (oauthServer) {
|
|
177
|
-
//
|
|
176
|
+
// Use mcp-remote for OAuth handling - it opens browser automatically
|
|
178
177
|
const result = addMcpServer({
|
|
179
178
|
name: serverName,
|
|
180
|
-
transport: '
|
|
181
|
-
|
|
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}
|
|
188
|
+
console.log(`[MCP] Added ${serverName} via mcp-remote`);
|
|
189
189
|
|
|
190
|
-
// Trigger OAuth
|
|
191
|
-
console.log(`[MCP] Triggering
|
|
192
|
-
const
|
|
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:
|
|
199
|
-
timeout:
|
|
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 (
|
|
203
|
-
console.log(`[MCP]
|
|
198
|
+
if (oauthProcess.status === 0) {
|
|
199
|
+
console.log(`[MCP] ${platform} OAuth completed!`);
|
|
204
200
|
} else {
|
|
205
|
-
console.log(`[MCP] OAuth
|
|
201
|
+
console.log(`[MCP] OAuth process ended - check browser for login`);
|
|
206
202
|
}
|
|
207
203
|
} else {
|
|
208
204
|
// Command-based MCP server - needs credentials
|