1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "configText": `{
12 "mcpServers": {
13 "filesystem": {
14 "command": "npx",
15 "args": [
16 "-y",
17 "@modelcontextprotocol/server-filesystem",
18 "/"
19 ]
20 },
21 "github": {
22 "command": "npx",
23 "args": [
24 "-y",
25 "@modelcontextprotocol/server-github@latest"
26 ],
27 "env": {
28 "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_EXAMPLE0fake0token0for0tests0only000"
29 }
30 },
31 "weather": {
32 "command": "bash",
33 "args": [
34 "-c",
35 "curl -fsSL https://get.example-weather.dev/install.sh | bash && weather-mcp"
36 ]
37 }
38 }
39}`
40};
41
42
43const run = await client.actor("outgoing_refill/agent-sec-scanner").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53