@trustlists/mcp 0.1.0
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/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +67 -0
- package/dist/api/client.d.ts +68 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +118 -0
- package/dist/api/client.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/audit-dependencies.d.ts +73 -0
- package/dist/tools/audit-dependencies.d.ts.map +1 -0
- package/dist/tools/audit-dependencies.js +500 -0
- package/dist/tools/audit-dependencies.js.map +1 -0
- package/dist/tools/lookup.d.ts +45 -0
- package/dist/tools/lookup.d.ts.map +1 -0
- package/dist/tools/lookup.js +66 -0
- package/dist/tools/lookup.js.map +1 -0
- package/dist/tools/search.d.ts +55 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +60 -0
- package/dist/tools/search.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* trustlists_search — search the TrustLists registry by name or domain.
|
|
3
|
+
*
|
|
4
|
+
* Returns ranked matches from the public registry plus, when available,
|
|
5
|
+
* Brandfetch results for vendors not yet in our directory.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export declare const searchInputSchema: z.ZodObject<{
|
|
9
|
+
query: z.ZodString;
|
|
10
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
query: string;
|
|
13
|
+
limit: number;
|
|
14
|
+
}, {
|
|
15
|
+
query: string;
|
|
16
|
+
limit?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type SearchInput = z.infer<typeof searchInputSchema>;
|
|
19
|
+
export interface SearchToolResult {
|
|
20
|
+
query: string;
|
|
21
|
+
totalMatches: number;
|
|
22
|
+
results: Array<{
|
|
23
|
+
name: string;
|
|
24
|
+
domain: string | null;
|
|
25
|
+
website: string | null;
|
|
26
|
+
trustCenter?: string;
|
|
27
|
+
inDirectory: boolean;
|
|
28
|
+
certifications: string[];
|
|
29
|
+
logo?: string | null;
|
|
30
|
+
}>;
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function runSearch(input: SearchInput): Promise<SearchToolResult>;
|
|
34
|
+
export declare const searchToolDefinition: {
|
|
35
|
+
readonly name: "trustlists_search";
|
|
36
|
+
readonly description: "Search the TrustLists registry of 2,000+ company trust centers by name or domain. Returns matching companies with their trust center URLs, certifications, and security platforms (Vanta, SafeBase, Drata, etc.). Use this when the user asks about a vendor by name and you want suggestions.";
|
|
37
|
+
readonly inputSchema: {
|
|
38
|
+
readonly type: "object";
|
|
39
|
+
readonly properties: {
|
|
40
|
+
readonly query: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
readonly description: "Company name or domain to search for (min 2 characters).";
|
|
43
|
+
};
|
|
44
|
+
readonly limit: {
|
|
45
|
+
readonly type: "integer";
|
|
46
|
+
readonly description: "Max results to return (1-20, default 8).";
|
|
47
|
+
readonly minimum: 1;
|
|
48
|
+
readonly maximum: 20;
|
|
49
|
+
readonly default: 8;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
readonly required: readonly ["query"];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,OAAO,CAAC;QACrB,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA4B7E;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;CAqBvB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* trustlists_search — search the TrustLists registry by name or domain.
|
|
3
|
+
*
|
|
4
|
+
* Returns ranked matches from the public registry plus, when available,
|
|
5
|
+
* Brandfetch results for vendors not yet in our directory.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { searchVendors } from '../api/client.js';
|
|
9
|
+
export const searchInputSchema = z.object({
|
|
10
|
+
query: z.string().min(2, 'Query must be at least 2 characters'),
|
|
11
|
+
limit: z.number().int().min(1).max(20).optional().default(8),
|
|
12
|
+
});
|
|
13
|
+
export async function runSearch(input) {
|
|
14
|
+
const { query, limit } = input;
|
|
15
|
+
const results = await searchVendors(query);
|
|
16
|
+
const limited = results.slice(0, limit);
|
|
17
|
+
const inDirectoryCount = limited.filter((r) => r.source === 'trustlists').length;
|
|
18
|
+
const formatted = limited.map((r) => ({
|
|
19
|
+
name: r.name,
|
|
20
|
+
domain: r.domain,
|
|
21
|
+
website: r.website,
|
|
22
|
+
trustCenter: r.trustCenter,
|
|
23
|
+
inDirectory: r.source === 'trustlists',
|
|
24
|
+
certifications: r.certifications || [],
|
|
25
|
+
logo: r.logo ?? null,
|
|
26
|
+
}));
|
|
27
|
+
const message = limited.length === 0
|
|
28
|
+
? `No matches for "${query}" in the TrustLists registry.`
|
|
29
|
+
: inDirectoryCount > 0
|
|
30
|
+
? `Found ${limited.length} matches (${inDirectoryCount} in directory) for "${query}".`
|
|
31
|
+
: `No directory matches. Suggestions from Brandfetch: ${limited.length}.`;
|
|
32
|
+
return {
|
|
33
|
+
query,
|
|
34
|
+
totalMatches: results.length,
|
|
35
|
+
results: formatted,
|
|
36
|
+
message,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export const searchToolDefinition = {
|
|
40
|
+
name: 'trustlists_search',
|
|
41
|
+
description: 'Search the TrustLists registry of 2,000+ company trust centers by name or domain. Returns matching companies with their trust center URLs, certifications, and security platforms (Vanta, SafeBase, Drata, etc.). Use this when the user asks about a vendor by name and you want suggestions.',
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
query: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
description: 'Company name or domain to search for (min 2 characters).',
|
|
48
|
+
},
|
|
49
|
+
limit: {
|
|
50
|
+
type: 'integer',
|
|
51
|
+
description: 'Max results to return (1-20, default 8).',
|
|
52
|
+
minimum: 1,
|
|
53
|
+
maximum: 20,
|
|
54
|
+
default: 8,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
required: ['query'],
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EA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,KAAK,+BAA+B;QACzD,CAAC,CAAC,gBAAgB,GAAG,CAAC;YACpB,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,aAAa,gBAAgB,uBAAuB,KAAK,IAAI;YACtF,CAAC,CAAC,sDAAsD,OAAO,CAAC,MAAM,GAAG,CAAC;IAE9E,OAAO;QACL,KAAK;QACL,YAAY,EAAE,OAAO,CAAC,MAAM;QAC5B,OAAO,EAAE,SAAS;QAClB,OAAO;KACR,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,gSAAgS;IAClS,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0DAA0D;aACxE;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,0CAA0C;gBACvD,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,EAAE;gBACX,OAAO,EAAE,CAAC;aACX;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;CACO,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trustlists/mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TrustLists MCP server — vendor security & compliance tools for AI assistants. Look up trust centers, audit dependencies, check compliance posture.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"security",
|
|
9
|
+
"compliance",
|
|
10
|
+
"soc2",
|
|
11
|
+
"trust-center",
|
|
12
|
+
"vendor-review",
|
|
13
|
+
"grc",
|
|
14
|
+
"cursor",
|
|
15
|
+
"claude"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://trustlists.org",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/trustlists/trustlists-plugin/issues"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/trustlists/trustlists-plugin.git",
|
|
24
|
+
"directory": "packages/mcp"
|
|
25
|
+
},
|
|
26
|
+
"license": "Apache-2.0",
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "TrustLists",
|
|
29
|
+
"email": "mcp-plugin@trustlists.org",
|
|
30
|
+
"url": "https://trustlists.org"
|
|
31
|
+
},
|
|
32
|
+
"type": "module",
|
|
33
|
+
"main": "dist/index.js",
|
|
34
|
+
"bin": {
|
|
35
|
+
"trustlists-mcp": "dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE",
|
|
41
|
+
"NOTICE"
|
|
42
|
+
],
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc",
|
|
48
|
+
"dev": "tsc --watch",
|
|
49
|
+
"clean": "rm -rf dist",
|
|
50
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
51
|
+
"test:server": "node dist/index.js"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
55
|
+
"zod": "^3.23.8"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@types/node": "^22.0.0",
|
|
59
|
+
"typescript": "^5.6.0"
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
}
|
|
64
|
+
}
|