@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/chunk-GZQ2C7RT.mjs +1018 -0
- package/dist/chunk-SKROECYN.mjs +1024 -0
- package/dist/cli.js +20 -10
- package/dist/cli.mjs +1 -1
- package/dist/index.js +20 -10
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/mcp.ts +23 -15
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
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
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
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
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
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-
|
|
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
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,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
|
|
173
|
+
// Check if this is an OAuth-based server
|
|
175
174
|
const oauthServer = OAUTH_MCP_SERVERS[platform];
|
|
176
175
|
if (oauthServer) {
|
|
177
|
-
//
|
|
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
|
-
|
|
190
|
-
|
|
191
|
-
console.log(`
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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];
|