Skip to content

Commit 6ed4274

Browse files
committed
fix and improve
1 parent 236edd0 commit 6ed4274

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

sources/platform/integrations/ai/mastra.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,10 @@ A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server exposes
2626

2727
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.
2828

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-
3529
### Prerequisites
3630

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).
3933
- **Node.js**: Ensure you have Node.js installed.
4034
- **Packages**: Install the following packages:
4135

@@ -120,7 +114,7 @@ console.log(response.text);
120114
await mcpClient.disconnect();
121115
```
122116

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:
124118

125119
```bash
126120
curl https://actors-mcp-server.apify.actor/?token=YOUR_APIFY_TOKEN&actors=apify/rag-web-browser,clockworks/free-tiktok-scraper
@@ -130,7 +124,7 @@ Replace `YOUR_APIFY_TOKEN` with your Apify API token. You can also open the URL
130124

131125
:::note Use any Apify Actor
132126

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.
134128

135129
:::
136130

@@ -151,8 +145,7 @@ You will see the agent’s output in the console, showing the results of the sea
151145
```text
152146
Connecting to Mastra MCP server...
153147
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.
156149
### OpenAI TikTok Profile Summary
157150
- **Profile URL**: [OpenAI on TikTok](https://www.tiktok.com/@openai?lang=en) - **Followers**: 608,100
158151
- **Likes**: 3.4 million

0 commit comments

Comments
 (0)