---
title: "Mastra: features, version and quickstart · DotsAgent"
description: "Mastra by Mastra: licence, latest version, MCP support, durable runs, human approval, tracing and evals, plus a quickstart to copy."
url: https://dotsagent.io/frameworks/mastra
---

Framework · Mastra

# Mastra at a glance

A TypeScript framework that bundles agents, workflows with suspend and resume, memory, evals and the Studio UI in one package. It drops into Next.js, Express or Hono apps; the core is Apache-2.0, while ee/ directories use an enterprise licence.

**Best for:**  TypeScript teams that want a single stack for agents, workflows, memory and evals.

## Key facts

- **Maintainer**: Mastra
- **Languages**: TypeScript
- **Licence**: Apache-2.0 (core)
- **Latest version**: `@mastra/core 1.73.0` · October 1, 2026
- **Repository**: [mastra-ai/mastra](https://github.com/mastra-ai/mastra) · 28,467 stars
- **Hosted option**: [Mastra Cloud / Mastra Platform](https://mastra.ai/docs)mastra deploy builds and deploys a Docker image.

## Quickstart

Install the package, set the credentials, then run the smallest agent from the official docs. Model IDs are the ones the docs use and may not be enabled on your account.

`Install`

```
npm install @mastra/core@latest zod@latest typescript@latest @types/node@latest mastra@latest  (or scaffold: npm create mastra@latest)
```

Needs OPENAI_API_KEY

`TypeScript`

```
// src/mastra/agents/weather-agent.ts
import { Agent } from '@mastra/core/agent'
import { weatherTool } from '../tools/weather-tool.ts'

export const weatherAgent = new Agent({
  id: 'weather-agent',
  name: 'Weather Agent',
  instructions: `
      You are a helpful weather assistant that provides accurate weather information.

      Your primary function is to help users get weather details for specific locations. When responding:
      - Include relevant details like humidity, wind conditions, and precipitation
      - Keep responses concise but informative

      Use the weatherTool to fetch current weather data.
`,
  // Use a string in provider/model format, not provider:model or a provider object.
  model: 'openai/gpt-5.6-sol',
  tools: { weatherTool },
})

// run.mjs (after registering the agent in src/mastra/index.ts)
import { mastra } from './src/mastra/index.ts'

const agent = mastra.getAgentById('weather-agent')
const response = await agent.generate('Weather in SF')
console.log(response.text)
```

[Quickstart source](https://mastra.ai/docs)

## Features

| Any model | — | Model router strings in provider/model form |
| --- | --- | --- |
| MCP client | — | — |
| MCP server | — | MCPServer exposes agents, tools, workflows, prompts and resources |
| Multi-agent | — | Agents can act as tools for other agents |
| Durable runs | — | Suspend and resume with snapshots in libSQL, Postgres and others |
| Human approval | — | suspend() and resume() collect human input |
| Tracing | — | OTel exporters to Langfuse, Braintrust, Datadog and LangSmith |
| Evals | — | Scorers run live with sampling, or offline in CI |

## Recent changes

- npm create mastra now scaffolds a general-purpose harness with workspace, shell tools, memory and schedules.
- Mastra Factory targets software factories built from coding agents.

## Alternatives in the same language

- [OpenAI Agents SDK (JS)](https://dotsagent.io/frameworks/openai-agents-js)

- [Claude Agent SDK](https://dotsagent.io/frameworks/claude-agent-sdk)

- [Google ADK](https://dotsagent.io/frameworks/google-adk)

- [LangGraph](https://dotsagent.io/frameworks/langgraph)

- [LlamaIndex](https://dotsagent.io/frameworks/llamaindex)

- [Vercel AI SDK](https://dotsagent.io/frameworks/vercel-ai-sdk)

## Sources

1. [mastra.ai](https://mastra.ai/docs)/docs
2. [mastra.ai](https://mastra.ai/docs/connections/mcp)/docs/connections/mcp
3. [mastra.ai](https://mastra.ai/reference/tools/mcp-server)/reference/tools/mcp-server
4. [mastra.ai](https://mastra.ai/docs/workflows/suspend-and-resume)/docs/workflows/suspend-and-resume
5. [mastra.ai](https://mastra.ai/docs/workflows/snapshots)/docs/workflows/snapshots
6. [mastra.ai](https://mastra.ai/ai-agent-observability)/ai-agent-observability
7. [github.com](https://github.com/mastra-ai/mastra/blob/main/LICENSE.md)/mastra-ai/mastra/blob/main/LICENSE.md
8. [registry.npmjs.org](https://registry.npmjs.org/@mastra%2fcore)/@mastra%2fcore

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026
