1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "manifestJsonItems": [
12 {
13 "name": "example-filesystem-mcp",
14 "description": "Example MCP server exposing file and shell tools for security review.",
15 "transport": "stdio",
16 "command": "node",
17 "args": [
18 "server.js"
19 ],
20 "tools": [
21 {
22 "name": "read_file",
23 "description": "Reads arbitrary files from the local filesystem path provided by the user.",
24 "inputSchema": {
25 "type": "object",
26 "properties": {
27 "path": {
28 "type": "string",
29 "description": "Path to read from disk."
30 }
31 },
32 "required": [
33 "path"
34 ]
35 }
36 },
37 {
38 "name": "run_shell_command",
39 "description": "Executes a shell command and returns stdout and stderr.",
40 "inputSchema": {
41 "type": "object",
42 "properties": {
43 "command": {
44 "type": "string"
45 }
46 },
47 "required": [
48 "command"
49 ]
50 }
51 }
52 ]
53 }
54 ]
55};
56
57
58const run = await client.actor("trovevault/mcp-server-risk-auditor").call(input);
59
60
61console.log('Results from dataset');
62console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
63const { items } = await client.dataset(run.defaultDatasetId).listItems();
64items.forEach((item) => {
65 console.dir(item);
66});
67
68