# Mastra

> Source: https://agentsindex.ai/mastra

Open-source TypeScript agent framework with built-in memory, workflows, evals and tracing, plus a hosted platform.

- Best for: TypeScript developers who need to build and deploy AI agents with observability.

Starting price

Free

From [mastra.ai/pricing](https://mastra.ai/pricing), checked 2 November 2026

- MCP server Yes
- API Yes
- Open source Yes
- Self-host Yes

- GitHub stars: 28.8k

[Docs](https://mastra.ai/docs) [GitHub](https://github.com/mastra-ai/mastra)

What we checked

- Pages last read: 2 November 2026
- Facts checked: 5 facts From 4 sources
- AI answers: Not named in any of 62 Buyer questions, our November check

[How we check](https://agentsindex.ai/methodology) [Editorial policy](https://agentsindex.ai/editorial-policy#not-for-sale)

[Visit Mastra](https://agentsindex.ai/go/mastra) [Compare](https://agentsindex.ai/compare?cat=agent-tools-and-integrations&products=mastra)

## At a glance

- Categories: [Agent tools and integrations](https://agentsindex.ai/categories/agent-tools-and-integrations) [Agent frameworks](https://agentsindex.ai/categories/agent-frameworks)
- Tags: Open source, Self-hosted

### Code

- Last push: 15 October 2026

## What is Mastra?

Mastra is an open-source TypeScript framework for developers and teams building AI-powered applications and agents without switching to Python. It combines FrameworkTS, AI Orchestration, Observability, Studio, Collaborative Studio, Server, Memory Gateway, and Cloud Deployment, with REST API access and integrations like Next.js, Express, Hono, GitHub, Slack, Zapier, Discord, YouTube, and X (Twitter). Pricing runs Free, Pro custom, and Enterprise custom.

## A TypeScript framework for agents, with a hosted platform beside it

Mastra's docs open by calling it [a TypeScript framework for building AI agents and applications](https://mastra.ai/docs). A project starts from `npm create mastra@latest`, which scaffolds an agent harness with a local workspace, shell tools, memory, task tracking, web access and recurring schedules, and opens Studio, a local UI for the project.

The [homepage](https://mastra.ai/) groups the framework into agents, workflows ("typed steps, retries, and branches"), a harness for multi-mode agents, memory with observational memory and semantic recall, a server that registers agents and workflows and deploys "the same app to Mastra Cloud", and Factory, "a system of specialized AI agents that takes software from issue to production." Observability covers traces, metrics, logs, evals and datasets.

MCP works in both directions.

## Hosted plans charge a base fee, then meter about ten resources

The [pricing page](https://mastra.ai/pricing) has two tabs, Mastra Platform and Self-Hosted, and no monthly/annual billing switch.

On the platform, Starter is $0 a month with 100K observability events (then $10/100K), 24 CPU hours (then $0.35/hr), 15 days of retention and unlimited users, deployments and projects. Teams is $250 a month with 1M events (then $8/100K), 250 CPU hours (then $0.25/hr), 6 months of retention, and "Multiple teams, SSO, and SOC 2 docs". Enterprise is custom priced, with RBAC, audit logs, uptime SLAs and a dedicated support engineer.

The base fee is only part of the bill. The comparison table also meters data egress (10GB on Starter, 100GB on Teams, then $0.10/GB), a persistent 24/7 server at $100 per project, gateway tokens at "Market Rate + 5.5%", memory tokens at $10/1M past the allowance, retrieval storage at $20/GB, and LibSQL rows, Postgres compute hours and database storage, each with its own overage rate. No cost calculator is published.

On the Self-Hosted tab, the framework is free and "Apache 2.0 licensed".

## Open source, except the features a larger team needs in production

The [license page](https://mastra.ai/docs/license) describes a dual model: Apache 2.0 for most of the codebase, and the Mastra Enterprise License for anything under an `ee/` directory, including `@mastra/core/auth/ee`, `@mastra/core/agent-builder/ee` and `@mastra/editor/ee`. That code is source-available and free for development and testing.

The page lists exactly what needs a license in production. Authentication on API routes with any provider (Auth0, Clerk, Okta, WorkOS and others) does not. A Studio sign-in screen with a third-party provider, role-based access control, fine-grained authorization and Agent Builder do. A team that plans to give non-engineers Studio access through its identity provider is buying the Enterprise license.

## SOC 2 Type II is published, and so is a 2026 supply-chain attack

The [trust center](https://trust.mastra.ai/) says Mastra "received our SOC 2 Type II Report in October 2025" and offers the report on request.

The same trust center carries Mastra's incident report for June 16, 2026. Anyone who installed `@mastra` packages in that window was exposed to the credential theft.

## A 45-person company from the team behind Gatsby

The [about page](https://mastra.ai/about) says Mastra started in 2024, has 45 people working remotely and is based in San Francisco. It names Sam Bhagwat (founder and CEO), Abhi Aiyer (CTO) and Shane Thomas (Chief Product Officer), and says the team previously built Gatsby. It states $35m raised from investors including Spark Capital, Gradient, basecase and Y Combinator, and the founders' video caption refers to a $22m Series A.

The homepage links customer stories from Salesforce, Sanity, WorkOS, MongoDB and Range, all hosted on Mastra's own site.

## Engineering teams in TypeScript, and nobody else

The getting started pages show no Python SDK and no route for a team that does not write TypeScript, so a Python shop or a non-technical buyer gets nothing from the framework directly. Agent Builder, the closest thing to a no-code surface, is an Enterprise-licensed feature in production.

Teams that need predictable spend should model the platform's metered lines before committing, since CPU time, egress, gateway tokens and databases are each billed separately above the plan allowance. Teams that want to avoid metering entirely can self-host the Apache 2.0 framework, or pay the flat annual Self-Hosted Enterprise fee once they need SSO, RBAC or Agent Builder.

Our take

Check whether your deployment needs self-hosted or VPC-based controls before committing. Those enterprise controls exist, but pricing is custom, so confirm the security and infrastructure requirements that trigger the Enterprise path.

## Mastra price and terms

### Terms

- Free plan: Yes · The terms in full · Starter platform plan is $0/month with 100K observability events (then $10/100K), 24 CPU hours (then $0.35/hr), 15 days data retention, unlimited users, deployments and projects. The self-hosted framework is free under Apache 2.0.

## For AI agents

- MCP server: Yes
- API: Yes

[Developer docs](https://mastra.ai/docs)

[![Mastra](https://agentsindex.ai/img/1024/screenshots/mastra/pricing.webp)](https://agentsindex.ai/img/1920/screenshots/mastra/pricing.webp)

Pricing page, captured 19 October 2026

[mastra.ai/pricing](https://mastra.ai/pricing), checked 2 November 2026

### All plans and limits

| Plan | Price | Data Egress | Memory Token Usage | Compute Hours (Postgres) |
| --- | --- | --- | --- | --- |
| Free | $0 a month | Not stated | Not stated | Not stated |
| Starter | $0 a month | 10GB | 100,000 | 5 hours |
| Teams | $250 a month | 100GB | 1M | 5 hours |
| Enterprise | Price on request | 100GB | 1M | Not stated |

Read 6 November 2026 from [mastra.ai/pricing](https://mastra.ai/pricing).

## What we checked on Mastra

Yes Partly No

What it costs to start Yes

### What the price counts

The hosted platform charges a flat monthly plan fee with included observability events and CPU hours, then meters overages per 100K events and per CPU hour; Enterprise is quote-only.

> Teams For growing teams $250 / month Observability events 1M events + $8/100K CPU time 250 CPU hours + $0.25/hr

Pricing page, Mastra Platform tab, Teams plan card [mastra.ai/pricing](https://mastra.ai/pricing) Checked 2 November 2026

What it costs to start Yes

### Free tier

A standing $0 Starter plan on the hosted platform includes 100K observability events, 24 CPU hours and 15-day retention with unlimited users, and the self-hosted framework is Apache 2.0 at $0 a month, so no sales call is needed.

> Starter Free for everyone $0/ month

Mastra Platform plan cards, Starter column heading and price cell [mastra.ai/pricing](https://mastra.ai/pricing) Checked 28 October 2026

How you build with it Yes

### Public API

Every registered agent and workflow is exposed as an HTTP endpoint, with OpenAPI/Swagger, a typed client SDK and OpenAI-compatible Responses routes.

> Mastra runs as an HTTP server that exposes your agents, workflows, and other functionality as API endpoints.

Server page, opening paragraph [mastra.ai/docs/server/overview](https://mastra.ai/docs/server/overview) Checked 2 September 2026

How you build with it Yes

### MCP server

Both directions: MCPClient consumes external MCP servers, and MCPServer publishes your agents, tools and workflows to other MCP clients over stdio or HTTP.

> Use MCPServer to expose Mastra agents, tools, workflows, prompts, and resources to other MCP-compatible systems.

MCP page, second paragraph [mastra.ai/docs/connections/mcp](https://mastra.ai/docs/connections/mcp) Checked 2 September 2026

How you build with it Yes

### Open source

The framework (Community Edition) is Apache 2.0 on GitHub; enterprise features sit in a separately licensed Enterprise Edition.

> Mastra is fully open source under the Apache 2.0 license, so you control your source code and infrastructure.

Frequently asked questions, 'Can I deploy Mastra agents to my existing infrastructure?' answer [mastra.ai/ai-agent-framework](https://mastra.ai/ai-agent-framework) Checked 2 September 2026

## Mastra alternatives

- [Dify](https://agentsindex.ai/dify) · Open-source platform for building agents, agentic workflows and RAG pipelines, on cloud or self-hosted. · Free, then $59 a month Checked 22 Oct · Freemium · [Visit](https://agentsindex.ai/go/dify)
  - MCP server
  - API
  - Open source
  - Self-host
- [TinyFish](https://agentsindex.ai/tinyfish) · The team behind TinyFish runs this listing · One web layer for agents: free search and fetch, plus hosted browsers and goal-driven web automation. · Free, then $0.002 per minute Checked 11 Nov · ISO 27001 · [Visit](https://agentsindex.ai/go/tinyfish)
  - MCP server
  - API
  - Open source
  - Self-host
- Mastra and its 2 alternatives · All 2 publish a price.
  | Mastra | Free, then $250 a month | 2 Nov |
  | --- | --- | --- |
  | [Dify](https://agentsindex.ai/dify) | Free, then $59 a month | 22 Oct |
  | [TinyFish](https://agentsindex.ai/tinyfish) | Free, then $0.002 per minute | 11 Nov |

## Questions about Mastra

- How much does Mastra cost?: Mastra has a free plan. Its paid plans are Teams at $250 a month and Enterprise. From mastra.ai/pricing, checked 2 November 2026.
- Does Mastra have an API or an MCP server?: It has an API. It has an MCP server.
- Is Mastra open source, and can you host it yourself?: It is open source. You can host it yourself.
- What have we checked on Mastra?: 5 facts, under these headings: What it costs to start, how you build with it.
- How do we check Mastra?: We hold 5 facts on Mastra, quoted from 4 pages. Facts and price last checked 2 November 2026.

[How we check every listing](https://agentsindex.ai/methodology)

## Sources and changes

Last changed 2 November 2026

Sources on mastra.ai 4

- Read 2 November 2026 · [/pricing](https://mastra.ai/pricing)
- Read 2 September 2026 · [/ai-agent-framework](https://mastra.ai/ai-agent-framework)
- Read 2 September 2026 · [/docs/connections/mcp](https://mastra.ai/docs/connections/mcp)
- Read 2 September 2026 · [/docs/server/overview](https://mastra.ai/docs/server/overview)

Repository

- Stars: 28,835
- Last push: 15 October 2026

## Similar in Agent tools and integrations

[See all in Agent tools and integrations](https://agentsindex.ai/categories/agent-tools-and-integrations)

- [ERIUS PHONE](https://agentsindex.ai/eriusphone) A dedicated virtual Android phone per AI agent, with Google Play apps and sign-ins that persist between sessions. From about $45 a month
- [ClineFlow](https://agentsindex.ai/clineflow) Git-native project memory and handoffs for coding agents. Free plan
- [UI Discovery](https://agentsindex.ai/uidiscovery) Library of real website and app UI sections, queryable by AI assistants over MCP and a REST API. Free plan, then $15 a month
- [AgentMail](https://agentsindex.ai/agentmail) Email inbox API that gives each AI agent its own address, threads, webhooks and MCP server. Free plan, then $20 a month

## From our research

[All research](https://agentsindex.ai/blog)

- [Comparison](https://agentsindex.ai/blog/daytona-vs-e2b-vs-modal) 16 Oct 2026 Daytona vs E2B vs Modal: which sandbox for agent code? Daytona, E2B and Modal compared on sandbox pricing, concurrency, GPU support and open-source status, plus why Daytona's flagship repo is now archived.
- [Buyer's guide](https://agentsindex.ai/blog/erius-phone-ai-agent-android-device) 9 Oct 2026 ERIUS PHONE review (2026): pricing, pros and cons ERIUS PHONE rents AI agents real cloud Android phones they drive by API, priced monthly per phone in euros, but it offers no webhooks.
- [Buyer's guide](https://agentsindex.ai/blog/hyper-review-autonomous-coding-agent) 13 Oct 2026 Hyper review (2026): an autonomous coding agent that ships verified pull requests Hyper plans, tests and delivers pull requests to your GitHub repository from an isolated cloud sandbox, with a verification check on each one and a hard spending cap on every run.

## Is this yours?

Claim it free, then see who reads this page and carry the verified owner mark. You confirm it with an email at mastra.ai.

[Claim this listing](https://agentsindex.ai/claim/mastra?from=owner-line) [Get Featured](https://agentsindex.ai/claim/mastra?from=owner-line&next=featured)

[Report an error](mailto:hello@agentsindex.ai?subject=Report%20an%20error%3A%20Mastra%20(mastra)&body=What%20is%20wrong%20on%20the%20page%2C%20and%20where%20on%20the%20product) if a fact is wrong.
