by Kepler Software Inc.

Mastra pricing, free plan and limits

Open-source TypeScript framework for building AI agents and workflows, routing to 90+ model providers through one interface.

Best for
Backend/full-stack engineers building AI features into an existing Node.js or Next.js app
Not for
Data science teams whose existing tooling and notebooks are Python-only

Should you use Mastra?

Mastra fits TypeScript teams who want durable agent workflows without adopting LangChain's Python-derived mental model. Built by the team that built and sold Gatsby to Netlify, it backs a 6,173-member Discord community, ships Studio for testing agents and inspecting traces, and reports production use at companies including Replit and WorkOS.

Bundling agents, durable workflows, memory, RAG, and evals in one TypeScript package with native MCP server/client support, instead of stitching several single-purpose libraries together.

Fast GitHub star growth and MCP-native design create developer mindshare, but the framework layer is easy to fork under Apache 2.0 and Vercel AI SDK plus LangGraph both compete for the same TypeScript agent developer.

Also for

  • Startup engineering teams that want to self-host rather than pay a hosted agent platform
  • TypeScript and JavaScript backend developers building production AI agents
Show 3 more
  • Teams deploying to Vercel, Cloudflare Workers, or Netlify who want serverless-native agent tooling
  • Startups that want workflow durability and eval tracking without adopting LangChain's Python-derived abstractions
  • Developers building MCP-compatible tools that need to be callable from Cursor, Windsurf, or Claude Desktop

Also not for

  • No-code operators who need a visual builder rather than a code-first SDK

Main trade-off

No Python support, so teams with mixed-language ML stacks still need a second framework for Python-side agents.

Mastra pricing

PlanMonthly price
Framework (self-hosted)Free
Cloud StarterFree
Cloud Team$250/mo
Cloud EnterpriseCustom
How the pricing works, in full

Self-hosting the framework is free of charge, with no per-seat charges or usage caps. The optional Mastra Cloud platform runs pay-as-you-go: Starter is free with 100K observability events (then $10/100K), 24 CPU hours (then $0.35/hour), 10GB egress (then $0.10/GB) and 15-day retention. Team is $250/month with 1M events (then $8/100K), 250 CPU hours (then $0.25/hour), 100GB egress (then $0.08/GB), 6-month retention, SSO, and SOC 2 documentation. A $100/project Server Always-On add-on keeps servers warm, and Enterprise is custom-priced with RBAC, audit logs, and SLAs.

Before you commit

  • Mastra Cloud CPU hours and observability events bill per-unit past the free allowance, which can surprise teams that leave tracing on in high-traffic agents
  • Server Always-On add-on ($100/project) is needed to avoid cold starts on the hosted platform

What Mastra does

Mastra is an open-source TypeScript framework for building AI agents, workflows, and RAG applications, backed by more than 27,000 GitHub stars as of August 2026. It bundles agent orchestration, durable multi-step workflows, persistent memory, and evals into one TypeScript-first package with native Model Context Protocol server support.

  • Agent primitives

    Agents combine an LLM, instructions, and a set of tools in one typed definition, then reason over a goal and decide which tools to call and when to stop.

  • Graph-based workflows

    The workflow engine uses .then(), .branch(), and .parallel() to chain and fan out steps with explicit control flow and built-in retries, so multi-step processes survive a restart.

  • Model routing across 90+ providers

    One standard interface connects to OpenAI, Anthropic, Google, and more than 90 other model providers, so switching providers does not mean rewriting agent code.

  • Persistent memory

    Agents keep conversation history and semantic recall across sessions instead of resetting context on every new request.

Show all 7 features
  • Native MCP server and client support

    The MCPServer class exposes Mastra agents, tools, and workflows to any Model Context Protocol client such as Cursor or Claude Desktop, and MCPClient lets a Mastra agent call external MCP servers.

  • Studio dev dashboard

    A local playground at localhost:4111 lets developers chat with an agent, run RAG queries, and inspect traces of every model call and tool execution before deploying.

  • Serverless and self-hosted deployment

    Server adapters ship for Express, Hono, Fastify, and Koa, plus deployer packages for Vercel, Cloudflare Workers, and Netlify, so the same agent code runs serverless or on a long-running process.

Works with

  • Vercel
  • Cloudflare Workers
  • Netlify
  • Express
  • Hono
  • Fastify
  • Koa

Missing integrations

  • No first-party Python SDK
  • No native no-code visual workflow builder

Most users expect these and they are not currently supported.

Capabilities

  • AI agent framework
  • TypeScript
  • Workflows
  • RAG
  • Multi-agent orchestration
  • Open source
  • MCP

Strengths and limits

Strengths

  • Apache 2.0 core with full source access, so teams can self-host the entire framework without a vendor lock-in point.
  • Bundles agents, durable workflows, memory, RAG, and evals in one TypeScript-first package instead of stitching together separate libraries the way a raw LangChain.js setup requires.
  • Native Model Context Protocol server and client support, so agents built in Mastra can be called from Cursor or Claude Desktop, and Mastra agents can call other MCP servers, without a bridging layer.
  • Deploys the same agent code to Vercel, Cloudflare Workers, or Netlify without a bridging layer, covering serverless targets that LangChain's Python-first tooling does not reach directly.

Limits

  • TypeScript/JavaScript only; teams standardized on a Python stack get better first-party support from LangChain or LlamaIndex.
  • Third-party review volume is thin for a framework this size; its Product Hunt listing carries only 6 reviews as of August 2026, so independent sentiment data beyond GitHub activity is limited.
  • The hosted Mastra Cloud platform bills CPU hours, observability events, and egress separately once free allowances are exceeded, which takes deliberate monitoring to avoid surprise overages on the Starter tier.
  • Only reached a stable 1.0 API in January 2026, so codebases built against earlier 0.x releases needed a migration pass.

Mastra alternatives

ToolPrice fromFree planRuns onRating
Mastra This page$250/moYesWeb · Mac · Windows--
LangChainPick Mastra if your stack is TypeScript and you want serverless-native deployment; pick LangChain if your team is Python-first or needs its wider library of niche integrations.$39/moYesWeb · Mac · Windows--
LlamaIndexPick Mastra if you need agents and durable workflows alongside RAG; pick LlamaIndex if retrieval and document indexing is the whole job.FreeYesWeb--
TemporalPick Mastra if you want AI-native primitives like agents and evals built in; pick Temporal if you need a battle-tested general workflow engine and are willing to add AI tooling yourself.$500/moYesWeb3.8

Also compared

  • n8nPick Mastra if your team codes agents directly in TypeScript; choose n8n when a no-code visual canvas fits your workflow better than writing code.

Mastra facts

Works offline
Yes
Minimum skill level
Intermediate
Price band
Budget
Maker founded
2024
Training-data policy
Not applicable: Mastra is a self-hostable framework, not a hosted model, and does not train on customer data. The Mastra Cloud platform stores observability traces per its own retention settings (15 days on Starter, 6 months on Team).
Total funding
~$35M ($13M seed 2025 backed by Y Combinator, Paul Graham and 120+ others; $22M Series A led by Spark Capital)

Data and privacy

Apache License 2.0 for the core framework; Mastra Enterprise License (source-available) for ee/ directories

Questions about Mastra

How much does Mastra cost in 2026?

The framework itself is free to self-host under an open-source license. Mastra Cloud, the optional hosted platform, is pay-as-you-go with a free Starter allowance, a $250/month Team tier covering 1M observability events, 250 CPU hours, and 100GB egress before overage charges apply, and custom Enterprise pricing for RBAC, audit logs, and SLAs.

Is Mastra free to use?

Yes. The core framework is free to self-host under an open-source license, with no seat or usage limits. The optional Mastra Cloud Starter tier is also free, capped at 100K observability events, 24 CPU hours, 10GB of data egress, and 15 days of trace retention before pay-per-unit overage rates apply.

Which tools compete with Mastra in 2026?

LangChain is the default pick for Python-first teams or anyone who needs its larger catalog of niche integrations. LlamaIndex fits better when retrieval and document indexing is the entire job rather than one part of an agent. n8n is the pick for teams that want a no-code visual builder instead of writing TypeScript directly.

Is Mastra better than LangChain?

Neither is strictly better; they target different stacks. Mastra is TypeScript-only and ships serverless deployers for Vercel, Cloudflare Workers, and Netlify, while LangChain.js is a port of the original Python library and carries more integration breadth but more of the verbosity that comes with that port.

How do you set up Mastra?

Most developers report a working agent prototype within a couple of hours by installing the framework, defining an agent with instructions and tools, and running it against the local Studio dashboard. Deploying to a serverless target adds one deployer package (for example @mastra/deployer-vercel) and a build step.

About Mastra

Mastra is a TypeScript framework, released as open source, for building AI agents, workflows, and retrieval-augmented generation applications. It was built by Kepler Software Inc., founded in San Francisco in 2024 by Sam Bhagwat, Shane Thomas, and Abhi Aiyer, the team that built the Gatsby JavaScript framework and scaled it into a multi-million dollar business before selling it to Netlify. Mastra graduated from Y Combinator's Winter 2025 batch and has raised roughly $35 million, made up of a $13 million seed round backed by Paul Graham and more than 120 other investors plus a $22 million Series A led by Spark Capital.

Read the full background

The framework bundles four primitives into one TypeScript-first package: agents that reason over goals and choose which tools to call, a graph-based workflow engine with .then(), .branch(), and .parallel() methods for multi-step orchestration with retries, a memory system for persistent conversation context, and built-in evals for scoring agent output over time. Rather than porting LangChain's Python-derived abstractions into JavaScript, Mastra exposes its own agents, tools, and workflows as Model Context Protocol servers that clients such as Cursor, Windsurf, and Claude Desktop can call directly, and it connects to model providers through one standard interface instead of separate provider SDKs.

Teams shipping production agents on Vercel, Cloudflare Workers, or Netlify use Mastra's server adapters for Express, Hono, Fastify, and Koa to expose agents and workflows as HTTP endpoints without hand-rolling routing. Its local Studio dashboard lets a developer chat with an agent, feed it documents through RAG, and inspect traces of model calls and tool executions before shipping. Mastra names Replit and WorkOS among the companies running it in production.

The framework itself costs nothing to self-host, released under the Apache 2.0 license, with a separate source-available Enterprise License covering advanced features kept in its ee/ directories. Mastra Cloud, the optional hosted platform, layers a pay-as-you-go Starter tier, a Team tier, and custom Enterprise pricing on top; exact figures are in the pricing FAQ below. Because Mastra runs anywhere Node.js does, the hosted platform is opt-in rather than required to ship an agent.

Mastra reached a stable 1.0 release in January 2026, after hundreds of teams ran a beta cycle in production, and followed it with a Product Hunt launch the next day that placed third for the day.

Sources and guides

More AI Tools on Hokai

  • DBOSOpen-source durable execution library that keeps workflow state in Postgres, with SDKs for five language families and a paid Conductor console.
  • LangGraphMIT-licensed Python framework for stateful, multi-step AI agents built as graphs, with human-in-the-loop approvals. Library is free; hosted option is paid.
  • InngestInngest runs event-driven background jobs and AI workflows with no queue or worker fleet to manage. A Free plan that needs no credit card covers development and small production apps.
  • Trigger.devOpen-source TypeScript platform for durable background jobs and AI agents. Checkpoint-resume execution survives crashes and redeploys, auto-retries, real-time traces. Free tier available.
  • CrewAIOpen-source Python framework for multi-agent AI, MIT-licensed with about 59.6K GitHub stars, plus the CrewAI AMP platform for building and governing agents.
  • OpenAI Agents APIManaged API for cloud agents on the Codex runtime: hosted sandboxes, 9 sandbox partners, subagents and computer use, in public beta since Sept 2026.