Skip to content
Agents tracked: 378 Downloads (7d): 244M down 5.7% GitHub stars: 8.4M VS Code installs: 151M Releases (7d): 407 Agent status: 1 with issues Updated Oct 10, 2026

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

Zod97.4% of Mastra projects · 5.7× more than average
AI SDK92.3% of Mastra projects · 35.7× more than average
TypeScript92.3% of Mastra projects · 1.7× more than average
Sonner28.2% of Mastra projects · 3.5× more than average
React Hook Form Resolvers25.6% of Mastra projects · 3.7× more than average
Next.js46.2% of Mastra projects · 2.0× more than average
next-themes28.2% of Mastra projects · 3.2× more than average
Zustand23.1% of Mastra projects · 3.9× more than average

By coding agent

GitHub Copilot0.7% of projects set up for it
Cursor0.6% of projects set up for it
Claude Code0.4% of projects set up for it

Share of public repos configured for each agent that list Mastra as a dependency.

Install

Packagenpm install @mastra/core
Packages counted@mastra/core, @mastra/libsql, @mastra/memory, @mastra/loggers, @mastra/mcp, @mastra/observability, @mastra/evals, @mastra/client-js
Main stacksTypeScript / JavaScript (20), Next.js (17), React Native / Expo (1), Python (1)
Example projectsLiorVainer/data-israel, andrelandgraf/aileen, Strift/nuxt-mastra-starter-kit, 0xnyn/cruso, TusharVashishth/localcv

Alternatives to Mastra

All agent, mcp and tool libraries

Tool Used in agent projectsDownloads / wk GitHub starsLicense
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
Is Mastra right for your project? Ask AgentGid →