You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/platform/integrations/ai/mastra.md
+5-12Lines changed: 5 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,16 +26,10 @@ A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server exposes
26
26
27
27
This guide demonstrates how to integrate Apify Actors with Mastra by building an agent that uses the [RAG Web Browser](https://apify.com/apify/rag-web-browser) Actor to search Google for TikTok profiles and the [TikTok Data Extractor](https://apify.com/clockworks/free-tiktok-scraper) Actor to extract and analyze data from the TikTok profiles via MCP.
28
28
29
-
:::note MCP tools
30
-
31
-
Since we are using the MCP server, we do not have to make any code changes and can dynamically change the Actors provided to the agent by modifying the startup request to the MCP server.
32
-
33
-
:::
34
-
35
29
### Prerequisites
36
30
37
-
-**Apify API token**: To use Apify Actors in CrewAI, you need an Apify API token. Learn how to obtain it in the [Apify documentation](https://docs.apify.com/platform/integrations/api).
38
-
-**OpenAI API key**: To power the agents in CrewAI, you need an OpenAI API key. Get one from the [OpenAI platform](https://platform.openai.com/account/api-keys).
31
+
-**Apify API token**: To use Apify Actors, you need an Apify API token. Learn how to obtain it in the [Apify documentation](https://docs.apify.com/platform/integrations/api).
32
+
-**OpenAI API key**: To power the agents, you need an OpenAI API key. Get one from the [OpenAI platform](https://platform.openai.com/account/api-keys).
39
33
-**Node.js**: Ensure you have Node.js installed.
40
34
-**Packages**: Install the following packages:
41
35
@@ -120,7 +114,7 @@ console.log(response.text);
120
114
awaitmcpClient.disconnect();
121
115
```
122
116
123
-
Before running the agent, we need to start the Apify MCP Server by sending a request:
117
+
Before running the agent, we need to start the [Actors MCP Server](https://apify.com/apify/actors-mcp-server) by sending a request:
@@ -130,7 +124,7 @@ Replace `YOUR_APIFY_TOKEN` with your Apify API token. You can also open the URL
130
124
131
125
:::note Use any Apify Actor
132
126
133
-
Since it uses the MCP Server, swap in any Apify Actor from the [Apify Store](https://apify.com/store) by updating the startup request’s `actors` parameter.
127
+
Since it uses the [Actors MCP Server](https://apify.com/apify/actors-mcp-server), swap in any Apify Actor from the [Apify Store](https://apify.com/store) by updating the startup request’s `actors` parameter. No other changes are needed in the agent code.
134
128
135
129
:::
136
130
@@ -151,8 +145,7 @@ You will see the agent’s output in the console, showing the results of the sea
151
145
```text
152
146
Connecting to Mastra MCP server...
153
147
Fetching tools...
154
-
Generating response for prompt: Search the web for the OpenAI TikTok profile URL, then extr
155
-
act and summarize its data.
148
+
Generating response for prompt: Search the web for the OpenAI TikTok profile URL, then extract and summarize its data.
156
149
### OpenAI TikTok Profile Summary
157
150
- **Profile URL**: [OpenAI on TikTok](https://www.tiktok.com/@openai?lang=en) - **Followers**: 608,100
0 commit comments