Mastra.ai MCP Agent avatar
Mastra.ai MCP Agent

Pricing

Pay per event

Go to Store
Mastra.ai MCP Agent

Mastra.ai MCP Agent

jakub.kopecky/actor-mastra-mcp-agent

Developed by

Jakub Kopecký

Maintained by Community

🤖 AI agent using mastra.ai with Apify MCP Server. 🚀 Runs queries via OpenAI models, taps Apify Actors for web data, and outputs to datasets. 🛠️

0.0 (0)

Pricing

Pay per event

0

Monthly users

1

Runs succeeded

91%

Last modified

5 days ago

You can access the Mastra.ai MCP Agent programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "0.0",
5    "x-build-id": "aIzdoiTBbtJ7M08wj"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/jakub.kopecky~actor-mastra-mcp-agent/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-jakub.kopecky-actor-mastra-mcp-agent",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/jakub.kopecky~actor-mastra-mcp-agent/runs": {
50      "post": {
51        "operationId": "runs-sync-jakub.kopecky-actor-mastra-mcp-agent",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/jakub.kopecky~actor-mastra-mcp-agent/run-sync": {
93      "post": {
94        "operationId": "run-sync-jakub.kopecky-actor-mastra-mcp-agent",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "required": [
134          "prompt",
135          "modelName",
136          "actors"
137        ],
138        "properties": {
139          "prompt": {
140            "title": "Prompt",
141            "type": "string",
142            "description": "Prompt for the agent."
143          },
144          "agentName": {
145            "title": "Agent name",
146            "type": "string",
147            "description": "Name of the agent.",
148            "default": "Helpful Assistant Agent"
149          },
150          "agentInstructions": {
151            "title": "Agent instructions",
152            "type": "string",
153            "description": "Instructions for the agent. Defines who the agent is and what it does.",
154            "default": "You are a helpful assistant who aims to help users with their questions and tasks. You provide clear, accurate information and guidance while maintaining a friendly and professional attitude."
155          },
156          "modelName": {
157            "title": "OpenAI model",
158            "enum": [
159              "gpt-4o",
160              "gpt-4o-mini"
161            ],
162            "type": "string",
163            "description": "The OpenAI model to use. Currently supported models are gpt-4o and gpt-4o-mini.",
164            "default": "gpt-4o-mini"
165          },
166          "actors": {
167            "title": "Actors included",
168            "type": "array",
169            "description": "List of Apify Actor names to be available to the agent.",
170            "default": [],
171            "items": {
172              "type": "string"
173            }
174          },
175          "toolTimeout": {
176            "title": "MCP tool call timeout (s)",
177            "type": "integer",
178            "description": "Maximum time in seconds to wait for a tool call to complete.",
179            "default": 300
180          },
181          "debug": {
182            "title": "Debug",
183            "type": "boolean",
184            "description": "If enabled, Actor provides detailed information with tool calls and reasoning.",
185            "default": false
186          }
187        }
188      },
189      "runsResponseSchema": {
190        "type": "object",
191        "properties": {
192          "data": {
193            "type": "object",
194            "properties": {
195              "id": {
196                "type": "string"
197              },
198              "actId": {
199                "type": "string"
200              },
201              "userId": {
202                "type": "string"
203              },
204              "startedAt": {
205                "type": "string",
206                "format": "date-time",
207                "example": "2025-01-08T00:00:00.000Z"
208              },
209              "finishedAt": {
210                "type": "string",
211                "format": "date-time",
212                "example": "2025-01-08T00:00:00.000Z"
213              },
214              "status": {
215                "type": "string",
216                "example": "READY"
217              },
218              "meta": {
219                "type": "object",
220                "properties": {
221                  "origin": {
222                    "type": "string",
223                    "example": "API"
224                  },
225                  "userAgent": {
226                    "type": "string"
227                  }
228                }
229              },
230              "stats": {
231                "type": "object",
232                "properties": {
233                  "inputBodyLen": {
234                    "type": "integer",
235                    "example": 2000
236                  },
237                  "rebootCount": {
238                    "type": "integer",
239                    "example": 0
240                  },
241                  "restartCount": {
242                    "type": "integer",
243                    "example": 0
244                  },
245                  "resurrectCount": {
246                    "type": "integer",
247                    "example": 0
248                  },
249                  "computeUnits": {
250                    "type": "integer",
251                    "example": 0
252                  }
253                }
254              },
255              "options": {
256                "type": "object",
257                "properties": {
258                  "build": {
259                    "type": "string",
260                    "example": "latest"
261                  },
262                  "timeoutSecs": {
263                    "type": "integer",
264                    "example": 300
265                  },
266                  "memoryMbytes": {
267                    "type": "integer",
268                    "example": 1024
269                  },
270                  "diskMbytes": {
271                    "type": "integer",
272                    "example": 2048
273                  }
274                }
275              },
276              "buildId": {
277                "type": "string"
278              },
279              "defaultKeyValueStoreId": {
280                "type": "string"
281              },
282              "defaultDatasetId": {
283                "type": "string"
284              },
285              "defaultRequestQueueId": {
286                "type": "string"
287              },
288              "buildNumber": {
289                "type": "string",
290                "example": "1.0.0"
291              },
292              "containerUrl": {
293                "type": "string"
294              },
295              "usage": {
296                "type": "object",
297                "properties": {
298                  "ACTOR_COMPUTE_UNITS": {
299                    "type": "integer",
300                    "example": 0
301                  },
302                  "DATASET_READS": {
303                    "type": "integer",
304                    "example": 0
305                  },
306                  "DATASET_WRITES": {
307                    "type": "integer",
308                    "example": 0
309                  },
310                  "KEY_VALUE_STORE_READS": {
311                    "type": "integer",
312                    "example": 0
313                  },
314                  "KEY_VALUE_STORE_WRITES": {
315                    "type": "integer",
316                    "example": 1
317                  },
318                  "KEY_VALUE_STORE_LISTS": {
319                    "type": "integer",
320                    "example": 0
321                  },
322                  "REQUEST_QUEUE_READS": {
323                    "type": "integer",
324                    "example": 0
325                  },
326                  "REQUEST_QUEUE_WRITES": {
327                    "type": "integer",
328                    "example": 0
329                  },
330                  "DATA_TRANSFER_INTERNAL_GBYTES": {
331                    "type": "integer",
332                    "example": 0
333                  },
334                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
335                    "type": "integer",
336                    "example": 0
337                  },
338                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
339                    "type": "integer",
340                    "example": 0
341                  },
342                  "PROXY_SERPS": {
343                    "type": "integer",
344                    "example": 0
345                  }
346                }
347              },
348              "usageTotalUsd": {
349                "type": "number",
350                "example": 0.00005
351              },
352              "usageUsd": {
353                "type": "object",
354                "properties": {
355                  "ACTOR_COMPUTE_UNITS": {
356                    "type": "integer",
357                    "example": 0
358                  },
359                  "DATASET_READS": {
360                    "type": "integer",
361                    "example": 0
362                  },
363                  "DATASET_WRITES": {
364                    "type": "integer",
365                    "example": 0
366                  },
367                  "KEY_VALUE_STORE_READS": {
368                    "type": "integer",
369                    "example": 0
370                  },
371                  "KEY_VALUE_STORE_WRITES": {
372                    "type": "number",
373                    "example": 0.00005
374                  },
375                  "KEY_VALUE_STORE_LISTS": {
376                    "type": "integer",
377                    "example": 0
378                  },
379                  "REQUEST_QUEUE_READS": {
380                    "type": "integer",
381                    "example": 0
382                  },
383                  "REQUEST_QUEUE_WRITES": {
384                    "type": "integer",
385                    "example": 0
386                  },
387                  "DATA_TRANSFER_INTERNAL_GBYTES": {
388                    "type": "integer",
389                    "example": 0
390                  },
391                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
392                    "type": "integer",
393                    "example": 0
394                  },
395                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
396                    "type": "integer",
397                    "example": 0
398                  },
399                  "PROXY_SERPS": {
400                    "type": "integer",
401                    "example": 0
402                  }
403                }
404              }
405            }
406          }
407        }
408      }
409    }
410  }
411}

Mastra.ai MCP Agent OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for Mastra.ai MCP Agent from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Pricing

Pricing model

Pay per event 

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for each dataset of 1,000 items in the Actor outputs.

Price for Actor start

$0.100

Flat fee for starting an Actor run.

Price for completing the task

$0.400

Flat fee for completing the task.