# Mastra AI Mastra AI is a [[TypeScript]] framework for building AI applications and agents. It provides the primitives needed to build, test, and deploy AI features — workflows, agents, RAG pipelines, integrations, and memory — in a type-safe, composable way. ## Key features - **[[Mastra Agents|Agents]]**: build LLM-powered agents with tools, memory, and multi-step reasoning - **[[Mastra Workflows|Workflows]]**: define deterministic, graph-based execution flows with branching and parallelism - **[[Mastra RAG|RAG]]**: built-in retrieval-augmented generation pipeline (chunking, embedding, vector search) - **[[Mastra Tools|Tools]]**: schema-validated wrappers for API calls and actions - **Integrations**: 3rd-party service connectors (GitHub, Slack, Google Drive, etc.) - **[[Mastra Memory|Memory]]**: persistent agent memory across sessions - **[[Mastra Evals|Evals]]**: built-in evaluation framework for testing agent and LLM outputs - **[[Mastra Observability|Observability]]**: tracing, logging, and metrics across agents and workflows - **[[Mastra Studio|Studio]]**: local UI for building, testing, and visualizing agents and workflows - **[[Mastra Harness|Harness]]**: session-controller layer for long-running interactive agents - **[[Model Context Protocol (MCP)]] support**: expose tools as MCP servers or consume MCP servers ## Licensing — Apache-2.0 core plus a commercial tier Mastra is **not uniformly open source**, and the distinction matters before you build on it. The bulk of the repository is [[Apache 2.0 License|Apache-2.0]], but there is a separate `ee/` directory carrying its own **Mastra Enterprise Edition license** (copyright Kepler Software, Inc.). Under that license the code may only be used in production if you have a written agreement with Kepler. You may modify it for internal development and testing and submit patches upstream, but copying, distributing, sublicensing or selling it is forbidden, and Kepler retains title to any modifications you contribute. So the practical rule is: check which directory a feature lives in before depending on it. Apache-2.0 for the core, negotiated agreement for anything under `ee/`. ## Release cadence Mastra moves fast — roughly two `@mastra/core` minor releases per week. As of 2026-08-20 it is at **1.60.0** (1.55 shipped 2026-07-31, 1.60 on 2026-08-19: five minors in under three weeks). That pace is a feature if you want the newest primitives and a tax if you need a stable dependency surface, particularly for young subsystems like [[Mastra Harness|Harness]] where the API is still settling. Pin versions deliberately. The framework is also **Node-first**; [[Bun]] is not a supported target, which rules it out for Bun-based stacks without validation. ## MCP Docs Server Mastra ships its own documentation as an [[Model Context Protocol (MCP)|MCP]] server, so you can query Mastra docs directly from any MCP-compatible client (e.g., [[Claude Code]], [[Claude]]): ```sh npx @mastra/mcp-docs-server ``` - Course: https://mastra.ai/course - Source: https://github.com/mastra-ai/mastra/tree/main/packages/mcp-docs-server ## Quick start ```sh npm create mastra@latest ``` ## References - Official Website: https://mastra.ai/ - GitHub: https://github.com/mastra-ai/mastra - Docs: https://mastra.ai/docs ## Related - [[Mastra Harness]] - [[Mastra Agents]] - [[Mastra Workflows]] - [[Mastra Memory]] - [[Mastra RAG]] - [[Mastra Tools]] - [[Mastra Evals]] - [[Mastra Observability]] - [[Mastra Studio]] - [[TypeScript]] - [[AI Agents]] - [[AI SDKs]] - [[Vercel AI SDK]] - [[OpenAI Agents SDK]] - [[Pydantic AI]] - [[Microsoft Agent Framework]] - [[Model Context Protocol (MCP)]] - [[LangChain]] - [[AI Agent Harness]]