Mastra is an open-source TypeScript framework for building AI agents, agentic workflows and RAG pipelines. It was co-founded by Sam Bhagwat, Abhi Aiyer and Shane Thomas, the team behind Gatsby, went through Y Combinator's Winter 2025 batch, and raised a $13M seed round in October 2025 and a $22M Series A led by Spark Capital in April 2026, bringing total funding to $35M. The framework reached v1.0 stable in January 2026 and has 29.4k GitHub stars.
The framework provides agents, tools and workflows for deterministic multi-step processes, plus memory, RAG, supervisor patterns for multi-agent orchestration, evals, observability and Mastra Studio for testing and debugging. Its model router gives one API to models from more than 200 providers, with automatic fallbacks. Framework integrations cover Next.js, React, Express, Hono, Astro, SvelteKit and other web frameworks.
Mastra covers both directions of the Model Context Protocol. MCPClient connects a Mastra agent out to external MCP servers, and MCPServer exposes Mastra agents, tools, workflows, prompts, and resources to other MCP-compatible systems. Both are documented in the vendor's own reference documentation and ship in the @mastra/mcp package.
Production users with published case studies include Replit (whose Agent 3 runs thousands of Mastra agent sandboxes a week), Salesforce, Sanity, SoftBank, Factorial, WorkOS, Plaid, Cedar, Counsel Health, and Medusa.
Pricing: the core framework is open source under Apache 2.0 and free for any use. Enterprise features such as RBAC and SSO sit in ee/ directories under a separate source-available license: they can be used for development and testing, and production use needs a commercial license. The Mastra Platform hosts deployed agents with observability. Starter is free at $0/month (100K observability events, 24 CPU hours, 15 days data retention, unlimited users, deployments and projects). Teams is $250/month (1M events, 250 CPU hours, 6 months retention, multiple teams, SSO, SOC 2 documentation). Enterprise is custom pricing (custom volume and retention, RBAC, audit logs, support and uptime SLAs, a dedicated support engineer). Self-hosted deployment is free, with a licensed Enterprise tier for RBAC, SSO, IAM and network policy integration that keeps data in the customer's VPC and is sold for one flat annual fee with no per-trace or per-seat metering. All published rates are USD.
What the entry price does not buy: usage beyond each plan's included allowance is billed on top, at $10 per 100K observability events and $0.35 per CPU hour on Starter, and $8 per 100K events and $0.25 per CPU hour on Teams. Forward-deployed engineering support, with a shared Slack channel, regular sessions with a Mastra engineer and a 4-hour response SLA, is quote-only.
Best fit: TypeScript and JavaScript developers building production AI agents, full-stack web teams adding agentic features to Next.js, React, Express or Hono apps, and platform companies embedding agent infrastructure in their own products.
Mastra is a code framework for TypeScript and JavaScript, so Python-first teams would need to work in TypeScript to use it, and teams that want a no-code agent builder can look at Microsoft Copilot Studio or Botpress. Teams handling regulated data should read the terms first, because Mastra's agreement prohibits submitting protected health information under HIPAA, cardholder data under PCI DSS, and data covered by the Gramm-Leach-Bliley Act unless separately agreed in an order form.
Current state Q4 2026: Mastra holds a SOC 2 Type II report received in October 2025, published on its trust center, and it is the only certification the vendor publishes. Its terms of service, last updated October 26, 2026, carry an explicit no-training clause: Mastra does not use customer inputs or outputs to train or fine-tune any foundation model, except on express opt-in instruction or as aggregated de-identified usage data. The trust center reports a supply chain attack on June 16, 2026, when a compromised maintainer token published malicious versions of Mastra npm packages, and Mastra unpublished 110 of them and deprecated the other 6 that night. On October 21, 2026, Mastra reported that a security breach at its infrastructure provider Railway may have exposed Mastra Platform users' environment variables, said it had no evidence of a breach of its users, and said the open-source framework was not affected. In October 2026 Mastra also announced Mastra Launch, enterprise access with forward-deployed engineering support, and an early-access Mastra Knowledge product. The @mastra/core package recorded about 3.0 million npm downloads in the week of October 23 to 29, 2026. The G2 profile has been claimed by Mastra and carries no reviews yet.