Skip to content

Commit 236edd0

Browse files
committed
fix typos, unify
1 parent 20b455d commit 236edd0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

sources/platform/integrations/ai/mastra.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Mastra integration
33
sidebar_label: Mastra
4-
description: Learn how to build AI Agents Mastra using Apify MCP server
4+
description: Learn how to build AI Agents with Mastra using Apify MCP server
55
sidebar_position: 1
66
slug: /integrations/mastra
77
---
@@ -18,9 +18,9 @@ slug: /integrations/mastra
1818
See the [Mastra docs](https://mastra.ai/docs) for more.
1919
:::
2020

21-
## What MCP server
21+
## What is MCP server
2222

23-
An [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server exposes specific data sources or tools to agents via a standardized protocol. It acts as a bridge, connecting large language models (LLMs) to external systems like databases, APIs, or local filesystems. Built on a client-server architecture, MCP servers enable secure, real-time interaction, allowing agents to fetch context or execute actions without custom integrations. Think of it as a modular plugin system for agents, simplifying how they access and process data. Apify provides [Actors MCP Server](https://apify.com/apify/actors-mcp-server) to expose [Apify Actors](https://docs.apify.com/platform/actors) from the [Apify Store](https://apify.com/store) as tools via the MCP protocol.
23+
A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server exposes specific data sources or tools to agents via a standardized protocol. It acts as a bridge, connecting large language models (LLMs) to external systems like databases, APIs, or local filesystems. Built on a client-server architecture, MCP servers enable secure, real-time interaction, allowing agents to fetch context or execute actions without custom integrations. Think of it as a modular plugin system for agents, simplifying how they access and process data. Apify provides [Actors MCP Server](https://apify.com/apify/actors-mcp-server) to expose [Apify Actors](https://docs.apify.com/platform/actors) from the [Apify Store](https://apify.com/store) as tools via the MCP protocol.
2424

2525
## How to use Apify with Mastra via MCP
2626

@@ -45,7 +45,7 @@ Since we are using the MCP server, we do not have to make any code changes and c
4545

4646
### Building the TikTok profile search and analysis agent
4747

48-
First import all required packages:
48+
First, import all required packages:
4949

5050
```typescript
5151
import { Agent } from '@mastra/core/agent';
@@ -97,7 +97,7 @@ Instantiate the agent with the OpenAI model:
9797

9898
```typescript
9999
const agent = new Agent({
100-
name: 'TikTokAnalyzer',
100+
name: 'Social Media Agent',
101101
instructions: 'You’re a social media data extractor. Find TikTok URLs and analyze profiles with precision.',
102102
model: openai('gpt-4o-mini')
103103
});
@@ -120,7 +120,7 @@ console.log(response.text);
120120
await mcpClient.disconnect();
121121
```
122122

123-
Before running the agent we need to start the Apify MCP Server by sending a request:
123+
Before running the agent, we need to start the Apify MCP Server by sending a request:
124124

125125
```bash
126126
curl https://actors-mcp-server.apify.actor/?token=YOUR_APIFY_TOKEN&actors=apify/rag-web-browser,clockworks/free-tiktok-scraper
@@ -140,9 +140,9 @@ Run the agent:
140140
npx tsx mastra-agent.ts
141141
```
142142

143-
:::note Execution Time
143+
:::note Search and analysis may take some time
144144

145-
Web searches and TikTok scraping might take a minute—depends on the Actors and network.
145+
The agent tasks may take some time as they search the web for the OpenAI TikTok profile and extract data from it.
146146

147147
:::
148148

@@ -197,8 +197,8 @@ console.log('Fetching tools...');
197197
const tools = await mcpClient.tools();
198198

199199
const agent = new Agent({
200-
name: 'TikTokAnalyzer',
201-
instructions: 'You’re a data extractor. Find TikTok URLs and analyze profiles with precision.',
200+
name: 'Social Media Agent',
201+
instructions: 'You’re a social media data extractor. Find TikTok URLs and analyze profiles with precision.',
202202
model: openai('gpt-4o-mini')
203203
});
204204

0 commit comments

Comments
 (0)