@toolsdk.ai/registry 1.0.113 → 1.0.115
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 +66 -11
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +23 -25
- package/dist/domains/config/config-route.d.ts +2 -0
- package/dist/domains/config/config-route.js +31 -0
- package/dist/domains/config/config-schema.d.ts +57 -0
- package/dist/domains/config/config-schema.js +10 -0
- package/dist/domains/config/config-types.d.ts +3 -0
- package/dist/domains/executor/executor-factory.d.ts +9 -0
- package/dist/domains/executor/executor-factory.js +17 -0
- package/dist/domains/executor/executor-types.d.ts +15 -0
- package/dist/domains/executor/local-executor.d.ts +12 -0
- package/dist/domains/executor/local-executor.js +48 -0
- package/dist/domains/executor/sandbox-executor.d.ts +16 -0
- package/dist/domains/executor/sandbox-executor.js +83 -0
- package/dist/domains/package/package-handler.d.ts +17 -0
- package/dist/domains/package/package-handler.js +58 -0
- package/dist/domains/package/package-repository.d.ts +9 -0
- package/dist/domains/package/package-repository.js +26 -0
- package/dist/domains/package/package-route.d.ts +2 -0
- package/dist/{api → domains/package}/package-route.js +38 -52
- package/dist/domains/package/package-schema.d.ts +244 -0
- package/dist/domains/package/package-schema.js +52 -0
- package/dist/domains/package/package-so.d.ts +78 -0
- package/dist/domains/package/package-so.js +61 -0
- package/dist/domains/package/package-so.test.js +378 -0
- package/dist/domains/package/package-types.d.ts +9 -0
- package/dist/domains/package/package-types.js +1 -0
- package/dist/domains/sandbox/clients/daytona-client.d.ts +17 -0
- package/dist/domains/sandbox/clients/daytona-client.js +112 -0
- package/dist/domains/sandbox/clients/sandock-client.d.ts +19 -0
- package/dist/domains/sandbox/clients/sandock-client.js +178 -0
- package/dist/domains/sandbox/sandbox-factory.d.ts +8 -0
- package/dist/domains/sandbox/sandbox-factory.js +23 -0
- package/dist/domains/sandbox/sandbox-pool-so.d.ts +25 -0
- package/dist/domains/sandbox/sandbox-pool-so.js +123 -0
- package/dist/domains/sandbox/sandbox-types.d.ts +25 -0
- package/dist/domains/sandbox/sandbox-types.js +1 -0
- package/dist/domains/sandbox/sandbox-utils.d.ts +3 -0
- package/dist/domains/sandbox/sandbox-utils.js +109 -0
- package/dist/domains/search/search-handler.d.ts +47 -0
- package/dist/domains/search/search-handler.js +113 -0
- package/dist/domains/search/search-route.d.ts +2 -0
- package/dist/domains/search/search-route.js +101 -0
- package/dist/domains/search/search-schema.d.ts +384 -0
- package/dist/domains/search/search-schema.js +99 -0
- package/dist/domains/search/search-so.d.ts +55 -0
- package/dist/{search/search-service.js → domains/search/search-so.js} +200 -297
- package/dist/shared/config/environment.d.ts +16 -0
- package/dist/shared/config/environment.js +41 -0
- package/dist/shared/schemas/common-schema.d.ts +249 -0
- package/dist/{schema.js → shared/schemas/common-schema.js} +37 -80
- package/dist/shared/schemas/index.d.ts +1 -0
- package/dist/shared/schemas/index.js +1 -0
- package/dist/shared/scripts-helpers/index.d.ts +60 -0
- package/dist/shared/scripts-helpers/index.js +61 -0
- package/dist/shared/utils/file-util.d.ts +1 -0
- package/dist/shared/utils/file-util.js +5 -0
- package/dist/shared/utils/index.d.ts +5 -0
- package/dist/shared/utils/index.js +5 -0
- package/dist/shared/utils/mcp-client-util.d.ts +31 -0
- package/dist/shared/utils/mcp-client-util.js +79 -0
- package/dist/shared/utils/package-util.d.ts +6 -0
- package/dist/shared/utils/package-util.js +53 -0
- package/dist/shared/utils/promise-util.d.ts +1 -0
- package/dist/shared/utils/promise-util.js +14 -0
- package/dist/{utils.d.ts → shared/utils/response-util.d.ts} +6 -2
- package/dist/{utils.js → shared/utils/response-util.js} +1 -6
- package/dist/shared/utils/string-util.d.ts +1 -0
- package/dist/shared/utils/string-util.js +25 -0
- package/dist/shared/utils/validation-util.d.ts +12 -0
- package/dist/shared/utils/validation-util.js +99 -0
- package/indexes/categories-list.json +1 -0
- package/indexes/packages-list.json +6 -0
- package/package.json +9 -2
- package/packages/developer-tools/neurolink.json +23 -0
- package/packages/search-data-extraction/ref-tools-mcp.json +7 -2
- package/README.dev.md +0 -195
- package/dist/api/package-handler.d.ts +0 -18
- package/dist/api/package-handler.js +0 -72
- package/dist/api/package-route.d.ts +0 -2
- package/dist/api/package-so.d.ts +0 -19
- package/dist/api/package-so.js +0 -263
- package/dist/api/package.test.js +0 -19
- package/dist/helper.d.ts +0 -72
- package/dist/helper.js +0 -278
- package/dist/sandbox/mcp-sandbox-client.d.ts +0 -37
- package/dist/sandbox/mcp-sandbox-client.js +0 -428
- package/dist/schema.d.ts +0 -806
- package/dist/search/search-route.d.ts +0 -3
- package/dist/search/search-route.js +0 -305
- package/dist/search/search-service.d.ts +0 -120
- package/dist/search/search.test.js +0 -100
- package/dist/types.d.ts +0 -27
- /package/dist/{api/package.test.d.ts → domains/config/config-types.js} +0 -0
- /package/dist/{search/search.test.d.ts → domains/executor/executor-types.js} +0 -0
- /package/dist/{types.js → domains/package/package-so.test.d.ts} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
export function updatePackageJsonDependencies({ packageDeps, enableValidation = false, packagesListPath, }) {
|
|
4
|
+
var _a;
|
|
5
|
+
const packageJsonFile = "./package.json";
|
|
6
|
+
const packageJSONStr = fs.readFileSync(packageJsonFile, "utf-8");
|
|
7
|
+
const newDeps = {
|
|
8
|
+
"@daytonaio/sdk": "0.109.0",
|
|
9
|
+
"@e2b/code-interpreter": "^2.0.0",
|
|
10
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
11
|
+
"@hono/node-server": "1.15.0",
|
|
12
|
+
"@hono/swagger-ui": "^0.5.2",
|
|
13
|
+
"@hono/zod-openapi": "^0.16.4",
|
|
14
|
+
"@iarna/toml": "^2.2.5",
|
|
15
|
+
meilisearch: "^0.33.0",
|
|
16
|
+
lodash: "^4.17.21",
|
|
17
|
+
zod: "^3.23.30",
|
|
18
|
+
axios: "^1.9.0",
|
|
19
|
+
hono: "4.8.3",
|
|
20
|
+
sandock: "^0.2.2",
|
|
21
|
+
semver: "^7.5.4",
|
|
22
|
+
};
|
|
23
|
+
if (enableValidation && packagesListPath) {
|
|
24
|
+
const packagesListStr = fs.readFileSync(packagesListPath, "utf-8");
|
|
25
|
+
const packagesList = JSON.parse(packagesListStr);
|
|
26
|
+
for (const [depName, depVer] of Object.entries(packageDeps)) {
|
|
27
|
+
if ((_a = packagesList[depName]) === null || _a === void 0 ? void 0 : _a.validated) {
|
|
28
|
+
newDeps[depName] = depVer || "latest";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
Object.assign(newDeps, packageDeps);
|
|
34
|
+
}
|
|
35
|
+
const packageJSON = JSON.parse(packageJSONStr);
|
|
36
|
+
packageJSON.dependencies = newDeps;
|
|
37
|
+
fs.writeFileSync(packageJsonFile, JSON.stringify(packageJSON, null, 2), "utf-8");
|
|
38
|
+
console.log(`Generated new package.json file at ${packageJsonFile}`);
|
|
39
|
+
}
|
|
40
|
+
export function getActualVersion(packageName, configuredVersion) {
|
|
41
|
+
if (configuredVersion && configuredVersion !== "latest") {
|
|
42
|
+
return configuredVersion;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const packageJsonPath = path.join(process.cwd(), "node_modules", packageName, "package.json");
|
|
46
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
47
|
+
return packageJson.version;
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
console.warn(`Failed to read version for ${packageName}, using 'latest' by default`, e.message);
|
|
51
|
+
return "latest";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function withTimeout<T>(ms: number, promise: Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function withTimeout(ms, promise) {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
const timer = setTimeout(() => {
|
|
4
|
+
reject(new Error(`Operation timed out after ${ms}ms`));
|
|
5
|
+
}, ms);
|
|
6
|
+
promise.then((res) => {
|
|
7
|
+
clearTimeout(timer);
|
|
8
|
+
resolve(res);
|
|
9
|
+
}, (err) => {
|
|
10
|
+
clearTimeout(timer);
|
|
11
|
+
reject(err);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { z } from "@hono/zod-openapi";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface Response<T> {
|
|
3
|
+
success: boolean;
|
|
4
|
+
code: number;
|
|
5
|
+
message: string;
|
|
6
|
+
data?: T;
|
|
7
|
+
}
|
|
4
8
|
export declare const createResponse: <T>(data: T, options?: {
|
|
5
9
|
success?: boolean;
|
|
6
10
|
code?: number;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { ErrorResponseSchema } from "./schema";
|
|
4
|
-
export function getDirname(metaUrl) {
|
|
5
|
-
return dirname(fileURLToPath(metaUrl));
|
|
6
|
-
}
|
|
1
|
+
import { ErrorResponseSchema } from "../schemas";
|
|
7
2
|
export const createResponse = (data, options) => {
|
|
8
3
|
const { success = true, code = 200, message = "Success" } = options || {};
|
|
9
4
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractLastOuterJSON(str: string): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function extractLastOuterJSON(str) {
|
|
2
|
+
let braceCount = 0;
|
|
3
|
+
let end = -1;
|
|
4
|
+
let start = -1;
|
|
5
|
+
for (let i = str.length - 1; i >= 0; i--) {
|
|
6
|
+
const ch = str[i];
|
|
7
|
+
if (ch === "}") {
|
|
8
|
+
if (end === -1)
|
|
9
|
+
end = i;
|
|
10
|
+
braceCount++;
|
|
11
|
+
}
|
|
12
|
+
else if (ch === "{") {
|
|
13
|
+
braceCount--;
|
|
14
|
+
if (braceCount === 0 && end !== -1) {
|
|
15
|
+
start = i;
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (start === -1 || end === -1) {
|
|
21
|
+
throw new Error("No valid JSON found in string");
|
|
22
|
+
}
|
|
23
|
+
const jsonStr = str.slice(start, end + 1);
|
|
24
|
+
return jsonStr;
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface PyProjectToml {
|
|
2
|
+
project?: {
|
|
3
|
+
dependencies?: string[];
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function isValidNpmPackage(packageName: string): Promise<boolean>;
|
|
9
|
+
export declare function parsePyprojectToml(): PyProjectToml;
|
|
10
|
+
export declare function extractPackageName(dep: string): string;
|
|
11
|
+
export declare function getPythonDependencies(): string[];
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import toml from "@iarna/toml";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import semver from "semver";
|
|
5
|
+
function checkDependencyValidity(dependencyData, versionRange) {
|
|
6
|
+
if (versionRange === "latest") {
|
|
7
|
+
return Object.keys(dependencyData.versions).length > 0;
|
|
8
|
+
}
|
|
9
|
+
const versions = Object.keys(dependencyData.versions);
|
|
10
|
+
for (const version of versions) {
|
|
11
|
+
if (semver.satisfies(version, versionRange)) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
async function checkDependencies(dependencies) {
|
|
18
|
+
const dependencyCache = {};
|
|
19
|
+
const checkSingleDependency = async (depName, depVersionRange) => {
|
|
20
|
+
const cacheKey = `${depName}@${depVersionRange}`;
|
|
21
|
+
if (dependencyCache[cacheKey] !== undefined) {
|
|
22
|
+
return dependencyCache[cacheKey];
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const depResponse = await axios.get(`https://registry.npmjs.org/${depName}`, {
|
|
26
|
+
timeout: 5000,
|
|
27
|
+
headers: {
|
|
28
|
+
"User-Agent": "MyToolManager/1.0",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
if (depResponse.status !== 200 || !depResponse.data.versions) {
|
|
32
|
+
console.error(`Failed to fetch ${depName}`);
|
|
33
|
+
dependencyCache[cacheKey] = false;
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
const isValid = checkDependencyValidity(depResponse.data, depVersionRange);
|
|
37
|
+
dependencyCache[cacheKey] = isValid;
|
|
38
|
+
if (!isValid) {
|
|
39
|
+
console.error(`Invalid or missing: ${depName}`);
|
|
40
|
+
}
|
|
41
|
+
return isValid;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
console.error(`Error fetching ${depName}: ${error.message}`);
|
|
45
|
+
dependencyCache[cacheKey] = false;
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const promises = Object.entries(dependencies).map(([depName, depVersionRange]) => checkSingleDependency(depName, depVersionRange));
|
|
50
|
+
const results = await Promise.all(promises);
|
|
51
|
+
return results.every((result) => result);
|
|
52
|
+
}
|
|
53
|
+
export async function isValidNpmPackage(packageName) {
|
|
54
|
+
var _a, _b, _c, _d;
|
|
55
|
+
try {
|
|
56
|
+
console.log("Checking package:", packageName);
|
|
57
|
+
const response = await axios.get(`https://registry.npmjs.org/${packageName}`, {
|
|
58
|
+
timeout: 5000,
|
|
59
|
+
headers: {
|
|
60
|
+
"User-Agent": "MyToolManager/1.0",
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
if (response.status !== 200 || !((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a["dist-tags"]) === null || _b === void 0 ? void 0 : _b.latest)) {
|
|
64
|
+
console.error(`Package marked as unpublished: ${packageName}`);
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
const latestVersion = response.data["dist-tags"].latest;
|
|
68
|
+
const versionData = (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.versions) === null || _d === void 0 ? void 0 : _d[latestVersion];
|
|
69
|
+
if (!versionData) {
|
|
70
|
+
console.error(`Invalid package: ${packageName} - No version data found`);
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
console.log(`Checking dependencies for ${packageName}`);
|
|
74
|
+
const dependencies = Object.assign(Object.assign({}, versionData.dependencies), versionData.devDependencies);
|
|
75
|
+
if (!(await checkDependencies(dependencies))) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
console.log(`Valid package: ${packageName}`);
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
console.error(`Error validating package ${packageName}:`, error.message);
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export function parsePyprojectToml() {
|
|
87
|
+
const pyprojectPath = "./python-mcp/pyproject.toml";
|
|
88
|
+
const content = fs.readFileSync(pyprojectPath, "utf-8");
|
|
89
|
+
return toml.parse(content);
|
|
90
|
+
}
|
|
91
|
+
export function extractPackageName(dep) {
|
|
92
|
+
return dep.split(/[=<>!]/)[0].trim();
|
|
93
|
+
}
|
|
94
|
+
export function getPythonDependencies() {
|
|
95
|
+
var _a;
|
|
96
|
+
const data = parsePyprojectToml();
|
|
97
|
+
const deps = ((_a = data.project) === null || _a === void 0 ? void 0 : _a.dependencies) || [];
|
|
98
|
+
return deps.map(extractPackageName);
|
|
99
|
+
}
|
|
@@ -47440,5 +47440,11 @@
|
|
|
47440
47440
|
"path": "data-platforms/google-analytics.json",
|
|
47441
47441
|
"validated": false,
|
|
47442
47442
|
"tools": {}
|
|
47443
|
+
},
|
|
47444
|
+
"@juspay/neurolink": {
|
|
47445
|
+
"category": "developer-tools",
|
|
47446
|
+
"path": "developer-tools/neurolink.json",
|
|
47447
|
+
"validated": false,
|
|
47448
|
+
"tools": {}
|
|
47443
47449
|
}
|
|
47444
47450
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolsdk.ai/registry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.115",
|
|
4
4
|
"description": "An Open, Structured, and Standard Registry for MCP Servers and Packages.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,10 @@
|
|
|
31
31
|
"sort": "sort-package-json",
|
|
32
32
|
"start": "NODE_ENV=production tsx src/api/index.ts",
|
|
33
33
|
"test": "vitest run",
|
|
34
|
-
"test:
|
|
34
|
+
"test:coverage": "vitest run --coverage",
|
|
35
|
+
"test:package": "vitest run src/domains/package",
|
|
36
|
+
"test:ui": "vitest --ui",
|
|
37
|
+
"test:watch": "vitest watch"
|
|
35
38
|
},
|
|
36
39
|
"dependencies": {
|
|
37
40
|
"@0xbeedao/mcp-taskwarrior": "1.0.0",
|
|
@@ -87,6 +90,7 @@
|
|
|
87
90
|
"@cyanheads/pubmed-mcp-server": "1.2.3",
|
|
88
91
|
"@cyanheads/toolkit-mcp-server": "1.0.1",
|
|
89
92
|
"@dasheck0/face-generator": "1.0.1",
|
|
93
|
+
"@daytonaio/sdk": "0.109.0",
|
|
90
94
|
"@debugg-ai/debugg-ai-mcp": "1.0.15",
|
|
91
95
|
"@delorenj/mcp-server-ticketmaster": "0.2.5",
|
|
92
96
|
"@deventerprisesoftware/scrapi-mcp": "0.0.3",
|
|
@@ -572,6 +576,7 @@
|
|
|
572
576
|
"replicate-flux-mcp": "0.1.2",
|
|
573
577
|
"resend-mcp": "0.1.2",
|
|
574
578
|
"rss-reader-mcp": "1.0.3",
|
|
579
|
+
"sandock": "^0.2.2",
|
|
575
580
|
"scrapeless-mcp-server": "0.3.0",
|
|
576
581
|
"scraperis-mcp": "0.1.22",
|
|
577
582
|
"search-stock-news-mcp": "1.0.12",
|
|
@@ -638,6 +643,8 @@
|
|
|
638
643
|
"@types/lodash": "^4.17.17",
|
|
639
644
|
"@types/node": "^22.15.21",
|
|
640
645
|
"@types/semver": "^7.5.8",
|
|
646
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
647
|
+
"@vitest/ui": "^3.2.4",
|
|
641
648
|
"dotenv": "^17.2.1",
|
|
642
649
|
"globals": "^16.2.0",
|
|
643
650
|
"lefthook": "1.7.14",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "mcp-server",
|
|
3
|
+
"name": "Neurolink",
|
|
4
|
+
"packageName": "@juspay/neurolink",
|
|
5
|
+
"description": "Universal AI development platform unifying 12+ providers (OpenAI, Anthropic, Google, Bedrock, Azure) with built-in MCP support, multi-provider failover, and production-ready enterprise features",
|
|
6
|
+
"url": "https://github.com/juspay/neurolink",
|
|
7
|
+
"runtime": "node",
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"env": {
|
|
10
|
+
"ANTHROPIC_API_KEY": {
|
|
11
|
+
"description": "API key for Anthropic Claude models",
|
|
12
|
+
"required": false
|
|
13
|
+
},
|
|
14
|
+
"OPENAI_API_KEY": {
|
|
15
|
+
"description": "API key for OpenAI models",
|
|
16
|
+
"required": false
|
|
17
|
+
},
|
|
18
|
+
"GOOGLE_API_KEY": {
|
|
19
|
+
"description": "API key for Google Gemini models",
|
|
20
|
+
"required": false
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
"description": "Integrates with Ref.tools documentation search service to provide curated technical documentation access, web search fallback, and URL-to-markdown conversion for efficient developer reference during coding workflows.",
|
|
5
5
|
"url": "https://github.com/ref-tools/ref-tools-mcp",
|
|
6
6
|
"runtime": "node",
|
|
7
|
-
"license": "
|
|
8
|
-
"env": {
|
|
7
|
+
"license": "mit",
|
|
8
|
+
"env": {
|
|
9
|
+
"REF_API_KEY": {
|
|
10
|
+
"description": "sign up to get an API key",
|
|
11
|
+
"required": true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
9
14
|
"name": "Ref Tools MCP"
|
|
10
15
|
}
|
package/README.dev.md
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
# Awesome MCP Registry Developer Guide
|
|
2
|
-
|
|
3
|
-
This document provides developers with detailed information on how to set up, run, and develop the Awesome MCP Registry project.
|
|
4
|
-
|
|
5
|
-
- [Awesome MCP Registry Developer Guide](#awesome-mcp-registry-developer-guide)
|
|
6
|
-
- [1. 🧰 Prerequisites](#1--prerequisites)
|
|
7
|
-
- [2. 🧰 Tech Stack](#2--tech-stack)
|
|
8
|
-
- [3. 🎯 Project Purpose](#3--project-purpose)
|
|
9
|
-
- [4. 🚀 Quick Start](#4--quick-start)
|
|
10
|
-
- [4.1 Install Dependencies](#41-install-dependencies)
|
|
11
|
-
- [4.2 Build Project](#42-build-project)
|
|
12
|
-
- [4.3 Start Development Server (Without Search Function)](#43-start-development-server-without-search-function)
|
|
13
|
-
- [4.4 Start Development Server (With Search Function)](#44-start-development-server-with-search-function)
|
|
14
|
-
- [5. 🐳 Docker Usage](#5--docker-usage)
|
|
15
|
-
- [5.1 Running with Docker (Without Search Function)](#51-running-with-docker-without-search-function)
|
|
16
|
-
- [5.2 Running with Docker (With Search Function)](#52-running-with-docker-with-search-function)
|
|
17
|
-
- [6. 🛠 Common Issues and Troubleshooting](#6--common-issues-and-troubleshooting)
|
|
18
|
-
- [6.1 MCP Client Test Errors During Build Process](#61-mcp-client-test-errors-during-build-process)
|
|
19
|
-
- [7. 🗃️ Project Structure](#7-️-project-structure)
|
|
20
|
-
- [8. ⚙️ Environment Variables](#8-️-environment-variables)
|
|
21
|
-
- [9. 📝 Contribution Guide](#9--contribution-guide)
|
|
22
|
-
|
|
23
|
-
## 1. 🧰 Prerequisites
|
|
24
|
-
|
|
25
|
-
Before you begin, ensure your development environment meets the following requirements:
|
|
26
|
-
|
|
27
|
-
- **Node.js** >= 18.x (latest LTS version recommended)
|
|
28
|
-
- **pnpm** >= 8.x (package manager)
|
|
29
|
-
- **Docker** (optional, required only if search functionality is needed)
|
|
30
|
-
|
|
31
|
-
## 2. 🧰 Tech Stack
|
|
32
|
-
|
|
33
|
-
- **Runtime Environment**: Node.js (ESM modules)
|
|
34
|
-
- **Package Manager**: pnpm
|
|
35
|
-
- **Language**: TypeScript
|
|
36
|
-
- **Web Framework**: Hono.js
|
|
37
|
-
- **Search Service**: MeiliSearch (optional)
|
|
38
|
-
- **Build Tool**: TypeScript Compiler (tsc)
|
|
39
|
-
- **Code Formatting**: Biome
|
|
40
|
-
- **Testing**: Vitest
|
|
41
|
-
|
|
42
|
-
## 3. 🎯 Project Purpose
|
|
43
|
-
|
|
44
|
-
This project has two main purposes:
|
|
45
|
-
|
|
46
|
-
1. **MCP Registry** - Collects and indexes various MCP servers, providing search functionality
|
|
47
|
-
2. **MCP Server** - Deployed as a server to remotely call various MCP servers
|
|
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
|
-
|
|
51
|
-
## 4. 🚀 Quick Start
|
|
52
|
-
|
|
53
|
-
### 4.1 Install Dependencies
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
pnpm install
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 4.2 Build Project
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
make build
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
This will perform the following operations:
|
|
66
|
-
- Validate all MCP server configurations
|
|
67
|
-
- Install all necessary dependencies
|
|
68
|
-
- Build TypeScript code
|
|
69
|
-
|
|
70
|
-
### 4.3 Start Development Server (Without Search Function)
|
|
71
|
-
|
|
72
|
-
This is the simplest way to start, suitable for scenarios where only API functionality is needed:
|
|
73
|
-
|
|
74
|
-
1. Ensure `ENABLE_SEARCH=false` is set in the `.env` file:
|
|
75
|
-
|
|
76
|
-
```env
|
|
77
|
-
ENABLE_SEARCH=false
|
|
78
|
-
MCP_SERVER_PORT=3003
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
2. Start the development server:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
make dev
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
3. Access the following endpoints:
|
|
88
|
-
- API Documentation: http://localhost:3003/swagger
|
|
89
|
-
|
|
90
|
-
### 4.4 Start Development Server (With Search Function)
|
|
91
|
-
|
|
92
|
-
If you need full search functionality:
|
|
93
|
-
|
|
94
|
-
1. Set up the `.env` file:
|
|
95
|
-
|
|
96
|
-
```env
|
|
97
|
-
ENABLE_SEARCH=true
|
|
98
|
-
MCP_SERVER_PORT=3003
|
|
99
|
-
MEILI_HTTP_ADDR=http://localhost:7700
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
2. Start the MeiliSearch service:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
make db
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
3. Build the project and start the development server:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
make build
|
|
112
|
-
make dev
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
4. Initialize search indexes:
|
|
116
|
-
|
|
117
|
-
Call the following endpoints via API:
|
|
118
|
-
- `POST /api/v1/search/manage/init` - Initialize search service
|
|
119
|
-
- `POST /api/v1/search/manage/index` - Index data
|
|
120
|
-
|
|
121
|
-
5. Access:
|
|
122
|
-
- Search Page: http://localhost:3003
|
|
123
|
-
- API Documentation: http://localhost:3003/swagger
|
|
124
|
-
|
|
125
|
-
## 5. 🐳 Docker Usage
|
|
126
|
-
|
|
127
|
-
### 5.1 Running with Docker (Without Search Function)
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Build image
|
|
131
|
-
make docker-build
|
|
132
|
-
|
|
133
|
-
# Run container (ensure ENABLE_SEARCH=false)
|
|
134
|
-
make docker-run
|
|
135
|
-
|
|
136
|
-
# Visit http://localhost:3003
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### 5.2 Running with Docker (With Search Function)
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
# Set ENABLE_SEARCH=true in .env
|
|
143
|
-
# Start MeiliSearch
|
|
144
|
-
make db
|
|
145
|
-
|
|
146
|
-
# Build and run the main application
|
|
147
|
-
make docker-build
|
|
148
|
-
make docker-run
|
|
149
|
-
|
|
150
|
-
# Visit http://localhost:3003 to use search functionality and API interfaces
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## 6. 🛠 Common Issues and Troubleshooting
|
|
154
|
-
|
|
155
|
-
### 6.1 MCP Client Test Errors During Build Process
|
|
156
|
-
|
|
157
|
-
When executing the `make build` command, you may see error messages similar to the following:
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
Error reading MCP Client for package: claude-prompts... ENOENT: no such file or directory
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
**This is normal!** The reason for these errors is:
|
|
164
|
-
|
|
165
|
-
- This project includes thousands of MCP packages
|
|
166
|
-
- The build process attempts to test all packages through the [test-mcp-clients.ts](file:///root/vika/awesome-mcp-registry/scripts/test-mcp-clients.ts) script
|
|
167
|
-
- Due to the large number, the testing process may take several hours
|
|
168
|
-
- Not all packages need to be installed and tested, as most packages are not essential for running the registry
|
|
169
|
-
|
|
170
|
-
**These errors can be ignored as long as the build process continues to execute.** After the build is complete, you can still use the API and search functionality (if search is enabled) normally.
|
|
171
|
-
|
|
172
|
-
## 7. 🗃️ Project Structure
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
.
|
|
176
|
-
├── config/ # Configuration files
|
|
177
|
-
├── indexes/ # Generated index files
|
|
178
|
-
├── packages/ # MCP server configuration files (categorized)
|
|
179
|
-
├── scripts/ # Build and maintenance scripts
|
|
180
|
-
└── src/ # Source code
|
|
181
|
-
├── api/ # API routes and server entry points
|
|
182
|
-
└── search/ # Search service
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
## 8. ⚙️ Environment Variables
|
|
186
|
-
|
|
187
|
-
The project uses the following environment variables, which can be configured in `.env` or `.env.local`:
|
|
188
|
-
|
|
189
|
-
- `MCP_SERVER_PORT`: Server port (default: 3003)
|
|
190
|
-
- `ENABLE_SEARCH`: Whether to enable search service (default: false)
|
|
191
|
-
- `MEILI_HTTP_ADDR`: MeiliSearch service address (default: http://localhost:7700)
|
|
192
|
-
|
|
193
|
-
## 9. 📝 Contribution Guide
|
|
194
|
-
|
|
195
|
-
For detailed information on how to contribute code to the project, add new MCP servers, etc., please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Context } from "hono";
|
|
2
|
-
export declare const packageHandler: {
|
|
3
|
-
executeTool: (c: Context) => Promise<globalThis.Response & import("hono").TypedResponse<{
|
|
4
|
-
success: boolean;
|
|
5
|
-
code: number;
|
|
6
|
-
message: string;
|
|
7
|
-
}, 200, "json">>;
|
|
8
|
-
getPackageDetail: (c: Context) => Promise<globalThis.Response & import("hono").TypedResponse<{
|
|
9
|
-
success: boolean;
|
|
10
|
-
code: number;
|
|
11
|
-
message: string;
|
|
12
|
-
}, 200, "json">>;
|
|
13
|
-
listTools: (c: Context) => Promise<globalThis.Response & import("hono").TypedResponse<{
|
|
14
|
-
success: boolean;
|
|
15
|
-
code: number;
|
|
16
|
-
message: string;
|
|
17
|
-
}, 200, "json">>;
|
|
18
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { createErrorResponse, createResponse } from "../utils";
|
|
2
|
-
import { PackageSO } from "./package-so";
|
|
3
|
-
const shouldUseSandbox = () => {
|
|
4
|
-
return process.env.USE_MCP_SANDBOX === "true";
|
|
5
|
-
};
|
|
6
|
-
export const packageHandler = {
|
|
7
|
-
executeTool: async (c) => {
|
|
8
|
-
const requestBody = await c.req.json();
|
|
9
|
-
try {
|
|
10
|
-
const toolSO = new PackageSO(shouldUseSandbox());
|
|
11
|
-
const result = await toolSO.executeTool(requestBody);
|
|
12
|
-
const response = createResponse(result);
|
|
13
|
-
return c.json(response, 200);
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
if (error instanceof Error) {
|
|
17
|
-
if (error.message.includes("not found")) {
|
|
18
|
-
const errorResponse = createErrorResponse(`Package '${requestBody.packageName}' not found`, 404);
|
|
19
|
-
return c.json(errorResponse, 200);
|
|
20
|
-
}
|
|
21
|
-
if (error.message.includes("Unknown tool")) {
|
|
22
|
-
const errorResponse = createErrorResponse(`Tool '${requestBody.toolKey}' not found in package '${requestBody.packageName}`, 404);
|
|
23
|
-
return c.json(errorResponse, 200);
|
|
24
|
-
}
|
|
25
|
-
const errorResponse = createErrorResponse(`[executeTool] Error executing tool: ${error.message}`, 500);
|
|
26
|
-
return c.json(errorResponse, 200);
|
|
27
|
-
}
|
|
28
|
-
// Other errors are still thrown
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
getPackageDetail: async (c) => {
|
|
33
|
-
const packageName = c.req.query("packageName");
|
|
34
|
-
if (!packageName) {
|
|
35
|
-
const errorResponse = createErrorResponse("Missing packageName query parameter", 400);
|
|
36
|
-
return c.json(errorResponse, 200);
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
const toolSO = new PackageSO(shouldUseSandbox());
|
|
40
|
-
const result = await toolSO.getPackageDetail(packageName);
|
|
41
|
-
const response = createResponse(result);
|
|
42
|
-
return c.json(response, 200);
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
if (error instanceof Error && error.message.includes("not found")) {
|
|
46
|
-
const errorResponse = createErrorResponse(`Package '${packageName}' not found`, 404);
|
|
47
|
-
return c.json(errorResponse, 200);
|
|
48
|
-
}
|
|
49
|
-
throw error;
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
listTools: async (c) => {
|
|
53
|
-
const packageName = c.req.query("packageName");
|
|
54
|
-
if (!packageName) {
|
|
55
|
-
const errorResponse = createErrorResponse("Missing packageName query parameter", 400);
|
|
56
|
-
return c.json(errorResponse, 200);
|
|
57
|
-
}
|
|
58
|
-
try {
|
|
59
|
-
const toolSO = new PackageSO(shouldUseSandbox());
|
|
60
|
-
const result = await toolSO.listTools(packageName);
|
|
61
|
-
const response = createResponse(result);
|
|
62
|
-
return c.json(response, 200);
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
if (error instanceof Error && error.message.includes("not found")) {
|
|
66
|
-
const errorResponse = createErrorResponse(`Package '${packageName}' not found`, 404);
|
|
67
|
-
return c.json(errorResponse, 200);
|
|
68
|
-
}
|
|
69
|
-
throw error;
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
};
|
package/dist/api/package-so.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { MCPSandboxClient } from "../sandbox/mcp-sandbox-client.js";
|
|
3
|
-
import type { MCPServerPackageConfig, ToolExecute } from "../types";
|
|
4
|
-
export declare class PackageSO {
|
|
5
|
-
private useSandbox;
|
|
6
|
-
private sandboxClient;
|
|
7
|
-
private static sandboxInstances;
|
|
8
|
-
private static MAX_SANDBOXES;
|
|
9
|
-
private static IDLE_CLOSE_MS;
|
|
10
|
-
constructor(useSandbox?: boolean);
|
|
11
|
-
static acquireSandbox(key?: string): Promise<MCPSandboxClient>;
|
|
12
|
-
static releaseSandbox(key?: string): Promise<void>;
|
|
13
|
-
static cleanupSandboxInstances(): Promise<void>;
|
|
14
|
-
executeTool(request: ToolExecute): Promise<unknown>;
|
|
15
|
-
private executeToolInSandbox;
|
|
16
|
-
listTools(packageName: string): Promise<Tool[]>;
|
|
17
|
-
private listToolsInSandbox;
|
|
18
|
-
getPackageDetail(packageName: string): Promise<MCPServerPackageConfig>;
|
|
19
|
-
}
|