@toolsdk.ai/registry 1.0.105 → 1.0.106
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.dev.md
CHANGED
|
@@ -46,6 +46,8 @@ This project has two main purposes:
|
|
|
46
46
|
1. **MCP Registry** - Collects and indexes various MCP servers, providing search functionality
|
|
47
47
|
2. **MCP Server** - Deployed as a server to remotely call various MCP servers
|
|
48
48
|
|
|
49
|
+
Additionally, we have deployed a website [ToolSDK.ai](https://toolsdk.ai) that can search for and run MCP Servers. We also provide a tool called `toolsdk` to help integrate these MCP Servers.
|
|
50
|
+
|
|
49
51
|
## 4. 🚀 Quick Start
|
|
50
52
|
|
|
51
53
|
### 4.1 Install Dependencies
|
package/dist/api/index.js
CHANGED
|
@@ -59,11 +59,15 @@ app.doc("/api/v1/doc", {
|
|
|
59
59
|
});
|
|
60
60
|
app.get("/swagger", swaggerUI({ url: "/api/v1/doc" }));
|
|
61
61
|
app.notFound((c) => {
|
|
62
|
-
return c.json({ success: false, code: 404, message: "Route not found" }, 404);
|
|
62
|
+
return c.json({ success: false, code: 404, message: "[Registry API] Route not found" }, 404);
|
|
63
63
|
});
|
|
64
64
|
app.onError((err, c) => {
|
|
65
65
|
console.error("Server Error:", err);
|
|
66
|
-
return c.json({
|
|
66
|
+
return c.json({
|
|
67
|
+
success: false,
|
|
68
|
+
code: 500,
|
|
69
|
+
message: `[Registry API] Internal server error, errMsg: ${err.message}`,
|
|
70
|
+
}, 500);
|
|
67
71
|
});
|
|
68
72
|
const port = process.env.MCP_SERVER_PORT ? parseInt(process.env.MCP_SERVER_PORT, 10) : 3003;
|
|
69
73
|
console.log(`Server is running on: http://localhost:${port}`);
|
|
@@ -1,122 +1,18 @@
|
|
|
1
1
|
import type { Context } from "hono";
|
|
2
2
|
export declare const packageHandler: {
|
|
3
|
-
executeTool: (c: Context) => Promise<
|
|
3
|
+
executeTool: (c: Context) => Promise<globalThis.Response & import("hono").TypedResponse<{
|
|
4
4
|
success: boolean;
|
|
5
5
|
code: number;
|
|
6
6
|
message: string;
|
|
7
|
-
},
|
|
8
|
-
getPackageDetail: (c: Context) => Promise<
|
|
7
|
+
}, 200, "json">>;
|
|
8
|
+
getPackageDetail: (c: Context) => Promise<globalThis.Response & import("hono").TypedResponse<{
|
|
9
9
|
success: boolean;
|
|
10
10
|
code: number;
|
|
11
11
|
message: string;
|
|
12
|
-
},
|
|
12
|
+
}, 200, "json">>;
|
|
13
|
+
listTools: (c: Context) => Promise<globalThis.Response & import("hono").TypedResponse<{
|
|
13
14
|
success: boolean;
|
|
14
15
|
code: number;
|
|
15
16
|
message: string;
|
|
16
|
-
},
|
|
17
|
-
success: boolean;
|
|
18
|
-
code: number;
|
|
19
|
-
message: string;
|
|
20
|
-
data?: {
|
|
21
|
-
type: "mcp-server";
|
|
22
|
-
packageName: string;
|
|
23
|
-
runtime: "node" | "python" | "java" | "go";
|
|
24
|
-
description?: string | undefined;
|
|
25
|
-
name?: string | undefined;
|
|
26
|
-
key?: string | undefined;
|
|
27
|
-
packageVersion?: string | undefined;
|
|
28
|
-
bin?: string | undefined;
|
|
29
|
-
binArgs?: string[] | undefined;
|
|
30
|
-
readme?: string | undefined;
|
|
31
|
-
url?: string | undefined;
|
|
32
|
-
license?: string | undefined;
|
|
33
|
-
logo?: string | undefined;
|
|
34
|
-
author?: string | undefined;
|
|
35
|
-
env?: {
|
|
36
|
-
[x: string]: {
|
|
37
|
-
description: string;
|
|
38
|
-
required: boolean;
|
|
39
|
-
};
|
|
40
|
-
} | undefined;
|
|
41
|
-
tools?: {
|
|
42
|
-
[x: string]: never;
|
|
43
|
-
name: string;
|
|
44
|
-
inputSchema: {
|
|
45
|
-
[x: string]: never;
|
|
46
|
-
type: "object";
|
|
47
|
-
properties?: {
|
|
48
|
-
[x: string]: never;
|
|
49
|
-
} | undefined;
|
|
50
|
-
required?: string[] | undefined;
|
|
51
|
-
};
|
|
52
|
-
description?: string | undefined;
|
|
53
|
-
title?: string | undefined;
|
|
54
|
-
outputSchema?: {
|
|
55
|
-
[x: string]: never;
|
|
56
|
-
type: "object";
|
|
57
|
-
properties?: {
|
|
58
|
-
[x: string]: never;
|
|
59
|
-
} | undefined;
|
|
60
|
-
required?: string[] | undefined;
|
|
61
|
-
} | undefined;
|
|
62
|
-
annotations?: {
|
|
63
|
-
[x: string]: never;
|
|
64
|
-
title?: string | undefined;
|
|
65
|
-
readOnlyHint?: boolean | undefined;
|
|
66
|
-
destructiveHint?: boolean | undefined;
|
|
67
|
-
idempotentHint?: boolean | undefined;
|
|
68
|
-
openWorldHint?: boolean | undefined;
|
|
69
|
-
} | undefined;
|
|
70
|
-
_meta?: {
|
|
71
|
-
[x: string]: never;
|
|
72
|
-
} | undefined;
|
|
73
|
-
}[] | undefined;
|
|
74
|
-
} | undefined;
|
|
75
|
-
}, 200, "json">)>;
|
|
76
|
-
listTools: (c: Context) => Promise<(globalThis.Response & import("hono").TypedResponse<{
|
|
77
|
-
success: boolean;
|
|
78
|
-
code: number;
|
|
79
|
-
message: string;
|
|
80
|
-
}, 400, "json">) | (globalThis.Response & import("hono").TypedResponse<{
|
|
81
|
-
success: boolean;
|
|
82
|
-
code: number;
|
|
83
|
-
message: string;
|
|
84
|
-
}, 404, "json">) | (globalThis.Response & import("hono").TypedResponse<{
|
|
85
|
-
success: boolean;
|
|
86
|
-
code: number;
|
|
87
|
-
message: string;
|
|
88
|
-
data?: {
|
|
89
|
-
[x: string]: never;
|
|
90
|
-
name: string;
|
|
91
|
-
inputSchema: {
|
|
92
|
-
[x: string]: never;
|
|
93
|
-
type: "object";
|
|
94
|
-
properties?: {
|
|
95
|
-
[x: string]: never;
|
|
96
|
-
} | undefined;
|
|
97
|
-
required?: string[] | undefined;
|
|
98
|
-
};
|
|
99
|
-
description?: string | undefined;
|
|
100
|
-
title?: string | undefined;
|
|
101
|
-
outputSchema?: {
|
|
102
|
-
[x: string]: never;
|
|
103
|
-
type: "object";
|
|
104
|
-
properties?: {
|
|
105
|
-
[x: string]: never;
|
|
106
|
-
} | undefined;
|
|
107
|
-
required?: string[] | undefined;
|
|
108
|
-
} | undefined;
|
|
109
|
-
annotations?: {
|
|
110
|
-
[x: string]: never;
|
|
111
|
-
title?: string | undefined;
|
|
112
|
-
readOnlyHint?: boolean | undefined;
|
|
113
|
-
destructiveHint?: boolean | undefined;
|
|
114
|
-
idempotentHint?: boolean | undefined;
|
|
115
|
-
openWorldHint?: boolean | undefined;
|
|
116
|
-
} | undefined;
|
|
117
|
-
_meta?: {
|
|
118
|
-
[x: string]: never;
|
|
119
|
-
} | undefined;
|
|
120
|
-
}[] | undefined;
|
|
121
|
-
}, 200, "json">)>;
|
|
17
|
+
}, 200, "json">>;
|
|
122
18
|
};
|
|
@@ -13,12 +13,14 @@ export const packageHandler = {
|
|
|
13
13
|
if (error instanceof Error) {
|
|
14
14
|
if (error.message.includes("not found")) {
|
|
15
15
|
const errorResponse = createErrorResponse(`Package '${requestBody.packageName}' not found`, 404);
|
|
16
|
-
return c.json(errorResponse,
|
|
16
|
+
return c.json(errorResponse, 200);
|
|
17
17
|
}
|
|
18
18
|
if (error.message.includes("Unknown tool")) {
|
|
19
19
|
const errorResponse = createErrorResponse(`Tool '${requestBody.toolKey}' not found in package '${requestBody.packageName}`, 404);
|
|
20
|
-
return c.json(errorResponse,
|
|
20
|
+
return c.json(errorResponse, 200);
|
|
21
21
|
}
|
|
22
|
+
const errorResponse = createErrorResponse(`[executeTool] Error executing tool: ${error.message}`, 500);
|
|
23
|
+
return c.json(errorResponse, 200);
|
|
22
24
|
}
|
|
23
25
|
// Other errors are still thrown
|
|
24
26
|
throw error;
|
|
@@ -28,7 +30,7 @@ export const packageHandler = {
|
|
|
28
30
|
const packageName = c.req.query("packageName");
|
|
29
31
|
if (!packageName) {
|
|
30
32
|
const errorResponse = createErrorResponse("Missing packageName query parameter", 400);
|
|
31
|
-
return c.json(errorResponse,
|
|
33
|
+
return c.json(errorResponse, 200);
|
|
32
34
|
}
|
|
33
35
|
try {
|
|
34
36
|
const toolSO = new PackageSO();
|
|
@@ -39,7 +41,7 @@ export const packageHandler = {
|
|
|
39
41
|
catch (error) {
|
|
40
42
|
if (error instanceof Error && error.message.includes("not found")) {
|
|
41
43
|
const errorResponse = createErrorResponse(`Package '${packageName}' not found`, 404);
|
|
42
|
-
return c.json(errorResponse,
|
|
44
|
+
return c.json(errorResponse, 200);
|
|
43
45
|
}
|
|
44
46
|
throw error;
|
|
45
47
|
}
|
|
@@ -48,7 +50,7 @@ export const packageHandler = {
|
|
|
48
50
|
const packageName = c.req.query("packageName");
|
|
49
51
|
if (!packageName) {
|
|
50
52
|
const errorResponse = createErrorResponse("Missing packageName query parameter", 400);
|
|
51
|
-
return c.json(errorResponse,
|
|
53
|
+
return c.json(errorResponse, 200);
|
|
52
54
|
}
|
|
53
55
|
try {
|
|
54
56
|
const toolSO = new PackageSO();
|
|
@@ -59,7 +61,7 @@ export const packageHandler = {
|
|
|
59
61
|
catch (error) {
|
|
60
62
|
if (error instanceof Error && error.message.includes("not found")) {
|
|
61
63
|
const errorResponse = createErrorResponse(`Package '${packageName}' not found`, 404);
|
|
62
|
-
return c.json(errorResponse,
|
|
64
|
+
return c.json(errorResponse, 200);
|
|
63
65
|
}
|
|
64
66
|
throw error;
|
|
65
67
|
}
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"AITABLE_BASE_URL": {
|
|
14
14
|
"description": "The base URL of the AITable API. You can set it to your custom base URL if using APITable (the open-source version of AITable)",
|
|
15
|
-
"required":
|
|
15
|
+
"required": false
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"name": "AITable MCP Server"
|