- Explore MCP Servers
- actor-mastra-mcp-agent
Actor Mastra Mcp Agent
What is Actor Mastra Mcp Agent
actor-mastra-mcp-agent is an AI agent that utilizes mastra.ai in conjunction with the Apify MCP Server. It is designed to run queries using OpenAI models, extract web data through Apify Actors, and output the results into datasets.
Use cases
Use cases include automating data collection for research projects, generating insights from web data for business intelligence, and enhancing machine learning models with real-time data inputs.
How to use
To use actor-mastra-mcp-agent, set up the Apify MCP Server and integrate it with mastra.ai. Configure the agent to run specific queries and utilize OpenAI models for processing. The agent will then fetch data from the web using Apify Actors and organize the output into datasets.
Key features
Key features include integration with OpenAI models for advanced querying, the ability to scrape web data using Apify Actors, and the capability to output results into structured datasets for further analysis.
Where to use
actor-mastra-mcp-agent can be used in various fields such as data analysis, web scraping, market research, and any application requiring automated data retrieval and processing.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Actor Mastra Mcp Agent
actor-mastra-mcp-agent is an AI agent that utilizes mastra.ai in conjunction with the Apify MCP Server. It is designed to run queries using OpenAI models, extract web data through Apify Actors, and output the results into datasets.
Use cases
Use cases include automating data collection for research projects, generating insights from web data for business intelligence, and enhancing machine learning models with real-time data inputs.
How to use
To use actor-mastra-mcp-agent, set up the Apify MCP Server and integrate it with mastra.ai. Configure the agent to run specific queries and utilize OpenAI models for processing. The agent will then fetch data from the web using Apify Actors and organize the output into datasets.
Key features
Key features include integration with OpenAI models for advanced querying, the ability to scrape web data using Apify Actors, and the capability to output results into structured datasets for further analysis.
Where to use
actor-mastra-mcp-agent can be used in various fields such as data analysis, web scraping, market research, and any application requiring automated data retrieval and processing.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Mastra AI Agent with Apify MCP Server
The Mastra AI Agent with Apify MCP Server is a generic AI agent designed to demonstrate the power of the mastra.ai framework when paired with the Apify MCP Server. This Actor leverages the Model Context Protocol (MCP) to connect AI-driven workflows with Apify’s extensive library of Actors, enabling seamless data extraction, web scraping, and task automation.
Built with TypeScript and the Apify SDK, this Actor serves as a flexible starting point for developers looking to create custom AI agents that tap into real-time web data and tools.
🛠️ Use cases
TikTok trend analysis
Scrape TikTok posts from a specific account and summarize key trends.
Example input:
{
"prompt": "Scrape the latest 10 posts from @techcrunch on TikTok and summarize key tech topics.",
"agentName": "TikTok Tech Analyzer",
"agentInstructions": "You are a tech analyst scraping TikTok posts to identify trends.",
"modelName": "gpt-4o-mini",
"actors": [
"clockworks/free-tiktok-scraper"
]
}
Example output:
{
"prompt": "Scrape the latest 10 posts from @techcrunch on TikTok and summarize key tech topics.",
"response": "Here are the latest 10 posts from TechCrunch on TikTok, along with key tech topics summarized..."
}
Web research synthesis
Search the web for a topic and distill top findings.
Example input:
{
"prompt": "Search the web for recent advances in quantum computing and explain the top 3 breakthroughs.",
"agentName": "Quantum Research Bot",
"agentInstructions": "You are a research assistant that scours the web for technical info.",
"modelName": "gpt-4o",
"actors": [
"apify/rag-web-browser"
]
}
Example output:
{
"prompt": "Search the web for recent advances in quantum computing and explain the top 3 breakthroughs.",
"response": "Here are the top three recent advances in quantum computing as of 2025..."
}
Your use case 💡
Tweak the input and create your own AI agent to tackle your use case! 🚀
🎯 Features
- 🤖 AI-powered assistance: Uses the mastra.ai framework to process prompts with OpenAI models (e.g.,
gpt-4o,gpt-4o-mini). - 🌐 Apify MCP integration: Connects to the Apify MCP Server to access tools like
clockworks/free-tiktok-scraperand more. - 💰 Pay-per-event pricing: Flexible, usage-based billing for Actor runs and task completions.
🔄 How it works
-
📥 Input
- Prompt (e.g., “Analyze posts from @openai and summarize AI trends”)
- Agent name (e.g., “Helpful Assistant Agent”) - name for the agent
- Agent instructions (e.g., “You are a helpful assistant…”) - description of the agent’s role, who the agent is and what it does
- Model selection (
gpt-4oorgpt-4o-mini) - Actors (e.g.,
["clockworks/free-tiktok-scraper"]) - list of Apify Actors to be served by the MCP server for the agent
-
🤖 Processing with Mastra
- Initializes the agent using the mastra.ai framework.
- Connects to the Apify MCP Server via Server-Sent Events (SSE).
- Fetches available tools (e.g., TikTok scrapers, web browsers) dynamically.
- Executes the prompt, leveraging MCP tools as needed.
-
📤 Output
- Returns the agent’s response as text.
- Stores results in an Apify dataset with the prompt and response.
💰 Pricing
This Actor uses the Pay Per Event (PPE) model for cost-effective, usage-based pricing.
| Event | Price (USD) |
|---|---|
| Actor start | $0.10 |
| Task completion | $0.40 |
Input example
{
"prompt": "Analyze the posts of @openai and summarize current trends in AI.",
"agentName": "Social Media Analyst",
"agentInstructions": "You are a social media analyst who specializes in analyzing posts from various social media platforms.",
"modelName": "gpt-4o-mini",
"actors": [
"clockworks/free-tiktok-scraper"
]
}
Output example
Dataset entry:
{
"prompt": "Analyze the posts of @openai and summarize current trends in AI.",
"response": "Here’s a summary of the recent posts from OpenAI's account, highlighting current trends in AI..."
}
🔧 Technical highlights
- Mastra.ai framework: Powers the AI agent.
- Apify MCP Server: Exposes Apify Actors as tools via the Model Context Protocol.
- Apify SDK: Ensures seamless integration with the Apify platform.
- TypeScript: Provides type safety and modern JavaScript features.
🤖 Under the hood with mastra.ai
This Actor uses the mastra.ai framework to create a generic AI agent that interacts with the Apify ecosystem:
🛠️ Tools
Expandable to any Apify Actor from the Apify Store via the MCP Server configuration.
⚙️ Usage
Running on Apify
- Clone the repository.
- Push the Actor to the Apify platform:
apify push - Set Actor
OPENAI_API_KEYenvironment variable. - Run the Actor with your input via the Apify Console or API.
Local development
- Install dependencies:
npm install - Run locally:
OPENAI_API_KEY=<your-openai-api-key> apify run -i '{"prompt": "Show me latest post from @openai TikTok profile", "actors": ["clockworks/free-tiktok-scraper"]}'
📖 Learn more
- Mastra.ai Framework
- Apify MCP Server
- Apify Platform
- Apify SDK Documentation
- What is MCP?
- What are AI agents?
- How to build an AI agent on Apify
🚀 Get started
Ready to build your own AI agent? Deploy this Actor on Apify, tweak the input, and explore the possibilities of mastra.ai and MCP! 🤖✨
🌐 Open source
This Actor is open-source, hosted on GitHub. Want to add features? Open an issue or submit a pull request!
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










