architectgbt-mcp 0.1.0 → 0.1.1
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/README.md +3 -3
- package/dist/tools/get-recommendation.js +12 -1
- package/dist/tools/list-models.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Add to your `~/.cursor/mcp.json`:
|
|
|
21
21
|
"mcpServers": {
|
|
22
22
|
"architectgbt": {
|
|
23
23
|
"command": "npx",
|
|
24
|
-
"args": ["
|
|
24
|
+
"args": ["architectgbt-mcp"]
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -36,7 +36,7 @@ Add to your Claude Desktop config (`%APPDATA%\Claude\claude_desktop_config.json`
|
|
|
36
36
|
"mcpServers": {
|
|
37
37
|
"architectgbt": {
|
|
38
38
|
"command": "npx",
|
|
39
|
-
"args": ["
|
|
39
|
+
"args": ["architectgbt-mcp"]
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -51,7 +51,7 @@ Add to your MCP configuration:
|
|
|
51
51
|
"mcpServers": {
|
|
52
52
|
"architectgbt": {
|
|
53
53
|
"command": "npx",
|
|
54
|
-
"args": ["
|
|
54
|
+
"args": ["architectgbt-mcp"]
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
const API_BASE = process.env.ARCHITECTGBT_API_URL || "https://architectgbt.com";
|
|
3
3
|
export const getRecommendationTool = {
|
|
4
4
|
name: "get_ai_recommendation",
|
|
5
|
-
description: "Analyze a project description and recommend the best AI model with pricing, reasoning, and alternatives. Use this when someone asks which AI model to use for their project.",
|
|
5
|
+
description: "Analyze a project description and recommend the best AI model with pricing, reasoning, and alternatives. Use this when someone asks which AI model to use for their project. Note: This uses the public ArchitectGBT website - users should visit architectgbt.com and sign up for full API access.",
|
|
6
6
|
inputSchema: {
|
|
7
7
|
type: "object",
|
|
8
8
|
properties: {
|
|
@@ -44,6 +44,17 @@ export async function handleGetRecommendation(args) {
|
|
|
44
44
|
}),
|
|
45
45
|
});
|
|
46
46
|
if (!response.ok) {
|
|
47
|
+
// Handle authentication requirement
|
|
48
|
+
if (response.status === 401) {
|
|
49
|
+
return {
|
|
50
|
+
content: [
|
|
51
|
+
{
|
|
52
|
+
type: "text",
|
|
53
|
+
text: `❌ **Authentication Required**\n\nThe ArchitectGBT API requires authentication. To get AI model recommendations:\n\n1. Visit https://architectgbt.com\n2. Sign up for a free account\n3. Use the website directly for personalized recommendations\n\nAlternatively, you can:\n- Use \`list_models\` to browse available models\n- Use \`get_code_template\` to get integration code for any model\n\nFor your query: "${input.prompt}"\nI recommend visiting the website for a personalized analysis.`,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
47
58
|
throw new Error(`API error: ${response.status}`);
|
|
48
59
|
}
|
|
49
60
|
const data = await response.json();
|
|
@@ -32,7 +32,16 @@ export async function handleListModels(args) {
|
|
|
32
32
|
if (!response.ok) {
|
|
33
33
|
throw new Error(`API error: ${response.status}`);
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
const responseData = await response.json();
|
|
36
|
+
// Handle the API response structure: { success: true, data: [...] }
|
|
37
|
+
let models = responseData.success && Array.isArray(responseData.data)
|
|
38
|
+
? responseData.data
|
|
39
|
+
: Array.isArray(responseData)
|
|
40
|
+
? responseData
|
|
41
|
+
: [];
|
|
42
|
+
if (!Array.isArray(models)) {
|
|
43
|
+
throw new Error(`Expected array but got ${typeof models}. API might have changed.`);
|
|
44
|
+
}
|
|
36
45
|
// Filter by provider if specified
|
|
37
46
|
if (input.provider && input.provider !== "all") {
|
|
38
47
|
models = models.filter((m) => m.provider?.toLowerCase() === input.provider?.toLowerCase());
|