Mastra
Framework for building AI agents with tools, memory and MCP server support.
Agent, MCP and tool libraries npm Apache-2.0
Used in agent projects
39
0.3% of 12,697 public repos built with AI coding agents
Rank in agent, mcp and tool libraries
#7 of 9
by use in those projects
Downloads
2M
npm, last 7 days, @mastra/core
GitHub stars
28.7K
last push Oct 10, 2026
How Mastra is used
Mastra is a dependency in 39 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (0.3%), #7 of 9 in agent, mcp and tool libraries. The most used alternative there is Model Context Protocol SDK (JavaScript). Projects that use it most often also use Zod (97.4%), AI SDK (92.3%), TypeScript (92.3%).
Often used with Mastra
| Zod | 97.4% of Mastra projects · 5.7× more than average |
|---|---|
| AI SDK | 92.3% of Mastra projects · 35.7× more than average |
| TypeScript | 92.3% of Mastra projects · 1.7× more than average |
| Sonner | 28.2% of Mastra projects · 3.5× more than average |
| React Hook Form Resolvers | 25.6% of Mastra projects · 3.7× more than average |
| Next.js | 46.2% of Mastra projects · 2.0× more than average |
| next-themes | 28.2% of Mastra projects · 3.2× more than average |
| Zustand | 23.1% of Mastra projects · 3.9× more than average |
By coding agent
| GitHub Copilot | 0.7% of projects set up for it |
|---|---|
| Cursor | 0.6% of projects set up for it |
| Claude Code | 0.4% of projects set up for it |
Share of public repos configured for each agent that list Mastra as a dependency.
Install
| Package | npm install @mastra/core |
|---|---|
| Packages counted | @mastra/core, @mastra/libsql, @mastra/memory, @mastra/loggers, @mastra/mcp, @mastra/observability, @mastra/evals, @mastra/client-js |
| Main stacks | TypeScript / JavaScript (20), Next.js (17), React Native / Expo (1), Python (1) |
| Example projects | LiorVainer/data-israel, andrelandgraf/aileen, Strift/nuxt-mastra-starter-kit, 0xnyn/cruso, TusharVashishth/localcv |
Alternatives to Mastra
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Model Context Protocol SDK (JavaScript) npm TypeScript SDK for building MCP servers and clients to extend AI agent capabilities. |
603 (4.7%) | 65.4M | 13.5K | MIT |
| Model Context Protocol SDK (Python) pypi Python SDK for building MCP servers and clients to extend AI agent capabilities. |
484 (3.8%) | 60.6M | 24.5K | MIT |
| FastMCP (Python) pypi Fast, Pythonic framework for building MCP servers and clients for AI tool integration. |
169 (1.3%) | 14.3M | 28K | — |
| LangChain (Python) pypi Framework for composing applications with LLMs through chains and agents. |
141 (1.1%) | 37.3M | 148K | MIT |
| LangGraph pypi Framework for building stateful, multi-actor applications with LLMs. |
82 (0.6%) | 12.1M | 43K | — |
| LangChain.js npm Build applications with LLMs using composable abstractions for chains, agents and memory. |
67 (0.5%) | 6.2M | 18.3K | MIT |
| fastMCP (JavaScript) npm TypeScript framework for building Model Context Protocol servers. |
33 (0.3%) | 709K | 3,274 | MIT |
| LangChain (JavaScript) npm TypeScript framework for building applications with LLMs, chains, agents and memory. |
30 (0.2%) | 3.1M | 18.3K | MIT |