1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "type": "sse",
12 "url": "https://mcp.api.coingecko.com/sse",
13 "options": {
14 "command": "python3",
15 "args": [
16 "app.py",
17 "--port",
18 8080
19 ],
20 "env": {
21 "LOG_LEVEL": "info",
22 "API_KEY": "my_secret_key"
23 }
24 },
25 "auth": {
26 "type": "none",
27 "token": "server_token_123",
28 "username": "server_user",
29 "password": "server_pass",
30 "headers": {
31 "Authorization": "Bearer ${token}",
32 "X-API-Key": "token"
33 }
34 },
35 "testCases": [
36 {
37 "name": "get_new_coins_list",
38 "arguments": {},
39 "actions": {
40 "validate_input_schema": false,
41 "validate_output_schema": false,
42 "match_output_data": false
43 },
44 "input_schema": {},
45 "output_schema": {},
46 "expected_output": {}
47 }
48 ]
49};
50
51
52const run = await client.actor("rocketagro/mcp-validator").call(input);
53
54
55console.log('Results from dataset');
56console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
57const { items } = await client.dataset(run.defaultDatasetId).listItems();
58items.forEach((item) => {
59 console.dir(item);
60});
61
62