What do you want to do?
3 use cases
-
Start a TypeScript agent project with Mastra Studio
Scaffold a Mastra project with one command and build and test agents in Mastra Studio.
View prompt
Create a new Mastra project with npm create mastra@latest using <provider>, start the dev server, and build an agent in it that <describe job>. Test it in Mastra Studio and show me the result.
-
Build a multi-step workflow that waits for approval
Use Mastra's graph workflows and suspend and resume to pause for a person before continuing.
View prompt
Using mastra-ai/mastra, build a workflow that <step 1>, then <step 2>, and suspends for my approval before <step 3>. Store its state so it can resume later, and test the full path in Mastra Studio.
-
Publish your agents and tools as an MCP server
Author an MCP server in Mastra so other systems and agents can use what you built.
View prompt
Using mastra-ai/mastra, expose my <agent> and <tools> as an MCP server, connect it to <MCP client>, and call each tool once to confirm it works.
Quick start with Mastra
- Check you have what it needs: Node.js and npm; An API key for a provider such as OpenAI, Anthropic, Google or xAI; Optional: storage for suspend and resume and memory.
- Open mastra-ai/mastra on GitHub and read the README and license.
- Run
npm create mastra@latestand follow the prompts - Choose a project name and a provider such as openai, anthropic, google or xai
- Enter the project directory and start the dev server
- Open Mastra Studio at http://localhost:4111 to build, test and manage agents, workflows and tools
These steps come from our top use case, Start a TypeScript agent project with Mastra Studio, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mastra-ai/mastra
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forTypeScript and JavaScript developers adding agents to React, Next.js or Node apps, or shipping them as a standalone server.
- Why it is hot29k stars, talked about in 2 AI sources we track
- LanguageTypeScript
- Sourcegithub.com/mastra-ai/mastra ยท Back to Hot repos
Requirements
- Node.js and npm
- An API key for a provider such as OpenAI, Anthropic, Google or xAI
- Optional: storage for suspend and resume and memory
Add this badge to your README
Maintain Mastra? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/mastra-ai-mastra/?utm_source=github&utm_medium=badge&utm_campaign=mastra-ai-mastra)
HTML
<a href="https://dedupedai.com/use-cases/mastra-ai-mastra/?utm_source=github&utm_medium=badge&utm_campaign=mastra-ai-mastra"><img src="https://dedupedai.com/badge/mastra-ai/mastra.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Mastra
What is Mastra?
Mastra is a TypeScript framework for building AI applications and agents. It routes to 40+ model providers through one interface, runs autonomous agents with tools, orchestrates multi-step graph workflows with then, branch and parallel, and can suspend for human approval and resume from storage. It adds memory, RAG, MCP server authoring, evals and observability, and Mastra Studio for building and testing agents locally. It is an open-source project on GitHub: https://github.com/mastra-ai/mastra.
How do I use Mastra?
Run npm create mastra@latest and follow the prompts; then choose a project name and a provider such as openai, anthropic, google or xai; Enter the project directory and start the dev server. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Mastra for?
TypeScript and JavaScript developers adding agents to React, Next.js or Node apps, or shipping them as a standalone server.
What can I do with Mastra?
3 use cases so far, for example: Start a TypeScript agent project with Mastra Studio; Build a multi-step workflow that waits for approval; Publish your agents and tools as an MCP server. Each has steps and a copy-paste agent prompt.
What do I need to run Mastra?
Node.js and npm; An API key for a provider such as OpenAI, Anthropic, Google or xAI; Optional: storage for suspend and resume and memory.
What are alternatives to Mastra?
Other hot AI repos in Software and DevOps: Deep Infer, Thinkrail, ECC, Instructor, Aider.
Is Mastra safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.