# mastra

> mastra is a freemium agent framework for ai models and llm tooling. TypeScript framework for building AI agents, workflows and MCP servers. It is available on Web, API, CLI and Self-hosted.

- **Kind:** Agent
- **Pricing:** Freemium
- **Starting price:** $25 a month
- **Platforms:** Web, API, CLI, Self-hosted
- **Website:** https://mastra.ai
- **Repository:** https://github.com/mastra-ai/mastra
- **GitHub stars:** 29,977
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [multi-agent frameworks](https://ai-powered.com/categories/multi-agent-frameworks), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

Mastra gives TypeScript teams a set of building blocks for AI features: agents that choose their own tools, graph-based workflows with explicit control flow, and memory that keeps conversation history and retrieved data available across calls. Model access goes through one interface that covers a large number of providers, so switching between OpenAI, Anthropic, Gemini and others does not require rewriting application code.

Apps can be bundled into an existing React, Next.js or Node project, or run as a standalone server built on Hono. Workflows can suspend and wait for a person to approve or supply input, with execution state kept in storage so a paused run resumes where it stopped. Built-in evals and tracing show how agent runs behave, and agents can also be published as MCP servers for other clients to call.

The framework suits developers who want to stay in TypeScript rather than Python, from prototype to production deployment. The core is Apache 2.0 licensed, while code in ee/ directories falls under a separate enterprise license.

## Features

- **Autonomous agents:** Agents use LLMs and tools to work through open-ended tasks and decide which tool to call next.
- **Graph-based workflows:** Multi-step processes are chained with then, branch and parallel controls, with explicit execution order.
- **Human-in-the-loop pauses:** Workflows can suspend for user input or approval and resume later from stored state.
- **Memory and context:** Conversation history and data retrieved from APIs, databases and files are supplied to agents as context.
- **Evals and observability:** Agent runs can be scored against checks and traced, including token usage, with external platform support.
- **MCP server authoring:** Agents and tools can be exposed as Model Context Protocol servers for other AI clients.

## Good for

- Building a customer-facing chat assistant inside an existing Next.js app
- Automating multi-step business processes with approval steps
- Creating a domain copilot for research, legal or finance teams
- Exposing internal tools to Claude Code or Cursor through an MCP server
- Running scored test suites against agent behaviour before release

## FAQ

### Is Mastra open source?

The core framework is licensed under Apache 2.0. Enterprise features in ee/ directories are source-available under the Mastra Enterprise License and need a license for production use.

### How many model providers does mastra support?

Model routing connects to a large set of providers through one standard interface, including OpenAI, Anthropic and Gemini.

### Can I deploy Mastra apps to serverless platforms?

Yes. Apps can run on any Node.js-compatible environment, with optional built-in deployers for Vercel, Netlify and Cloudflare.

### Does mastra support MCP?

Yes, you can author MCP servers that expose agents, tools and other structured resources to any MCP-compatible client.

### Is mastra free?

mastra has a free plan, with paid plans for more usage or features. Paid plans start at $25 a month.

### What are the best alternatives to mastra?

The closest alternatives to mastra are typedai, maestro-orchestrate, OpenProgram, voltagent and automatos-ai.

## Where this comes from

- Description: written from the project's README and the project's website.

## Alternatives

- [typedai](https://ai-powered.com/agents/typedai): typedai is an open-source agent framework for multi-agent frameworks.
- [maestro-orchestrate](https://ai-powered.com/agents/maestro-orchestrate): maestro-orchestrate is an open-source agent for security.
- [OpenProgram](https://ai-powered.com/agents/openprogram): OpenProgram is an open-source agent framework for ai models and llm tooling.
- [voltagent](https://ai-powered.com/agents/voltagent): voltagent is a freemium agent framework for developer tools.
- [automatos-ai](https://ai-powered.com/agents/automatos-ai): automatos-ai is an open-source agent for ai models and llm tooling.
- [swarmclaw](https://ai-powered.com/agents/swarmclaw): swarmclaw is an open-source agent for ai models and llm tooling.
- [AgentDock](https://ai-powered.com/agents/agentdock): AgentDock is an open-source agent framework for ai models and llm tooling.
- [agno](https://ai-powered.com/agents/agno): agno is an open-source agent framework for multi-agent frameworks.

---
Source: https://ai-powered.com/agents/mastra
