Install
$ agentstack add mcp-apify-actor-mastra-mcp-agent Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
β Flagged1 finding(s); flagged for manual review. Β· v0.1.0 How review works β
- β’ Prompt-injection patterns
- β’ Secret / credential exfiltration
- β’ Dangerous shell & filesystem operations
- β’ Untrusted network calls
- β’ Known-malicious package signatures
- high Reads credentials/environment and may exfiltrate them.
What it can access
- β Network access No
- β Filesystem access No
- β Shell / process execution No
- β Environment & secrets No
- β Dynamic code execution No
From automated source analysis of v0.1.0. βUsedβ means the capability is present in the source β more access means more to trust, not that itβs unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work βAbout
Mastra AI Agent with Apify MCP Server
[](https://apify.com/jakub.kopecky/actor-mastra-mcp-agent) [](https://github.com/apify/actor-mastra-mcp-agent/stargazers)
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:
``bash apify push ``
- Set Actor
OPENAI_API_KEYenvironment variable. - Run the Actor with your input via the Apify Console or API.
Local development
- Install dependencies:
``bash npm install ``
- Run locally:
``bash 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!
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source β we do not rehost the code.
- Author: apify
- Source: apify/actor-mastra-mcp-agent
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.