Skip to content
Back to search

mastra

Mastra is the modern TypeScript framework for AI-powered applications and agents.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/mastra-ai/mastra with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/mastra-ai/mastra'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mastra-ai--mastra/badge.svg)](/listings/mastra-ai--mastra)

HTML

<a href="/listings/mastra-ai--mastra"><img src="/api/listings/mastra-ai--mastra/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 105 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Mastra
  2. [![npm version](https://badge.fury.io/js/@mastra%2Fcore.svg)](https://www.npmjs.com/package/@mastra/core)
  3. [![CodeQl](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql)
  4. [![GitHub Repo stars](https://img.shields.io/github/stars/mastra-ai/mastra)](https://github.com/mastra-ai/mastra/stargazers)
  5. [![Discord](https://img.shields.io/discord/1309558646228779139?logo=discord&label=Discord&labelColor=white&color=7289DA)](https://discord.gg/mastra-ai)
  6. [![Twitter Follow](https://img.shields.io/twitter/follow/mastra?style=social)](https://x.com/mastra)
  7. [![NPM Downloads](https://img.shields.io/npm/dm/%40mastra%252Fcore)](https://www.npmjs.com/package/@mastra/core)
  8. [![Static Badge](https://img.shields.io/badge/Y%20Combinator-W25-orange)](https://www.ycombinator.com/companies?batch=W25)
  9. Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
  10. It includes everything you need to go from early prototypes to production-ready applications. Mastra integrates with frontend and backend frameworks like React, Next.js, and Node, or you can deploy it anywhere as a standalone server. It's the easiest way to build, tune, and scale reliable AI products.
  11. ## Why Mastra?
  12. Purpose-built for TypeScript and designed around established AI patterns, Mastra gives you everything you need to build great AI applications out-of-the-box.
  13. Some highlights include:
  14. - [**Model routing**](https://mastra.ai/models): Connect to 40+ providers through one standard interface. Use models from OpenAI, Anthropic, Gemini, and more.
  15. - [**Agents**](https://mastra.ai/docs/agents/overview): Build autonomous agents that use LLMs and tools to solve open-ended tasks. Agents reason about goals, decide which tools to use, and iterate internally until the model emits a final answer or an optional stopping condition is met.
  16. - [**Workflows**](https://mastra.ai/docs/workflows/overview): When you need explicit control over execution, use Mastra's graph-based workflow engine to orchestrate complex multi-step processes. Mastra workflows use an intuitive syntax for control flow (`.then()`, `.branch()`, `.parallel()`).
  17. - [**Human-in-the-loop**](https://mastra.ai/docs/workflows/suspend-and-resume): Suspend an agent or workflow and await user input or approval before resuming. Mastra uses [storage](https://mastra.ai/docs/server-db/storage) to remember execution state, so you can pause indefinitely and resume where you left off.
  18. - **Context management**: Give your agents the right context at the right time. Provide [conversation history](https://mastra.ai/docs/memory/conversation-history), [retrieve](https://mastra.ai/docs/rag/overview) data from your sources (APIs, databases, files), and add human-like memory with [Observational Memory](https://mastra.ai/docs/memory/observational-memory) so your agents behave coherently.
  19. - **Integrations**: Bundle agents and workflows into existing React, Next.js, or Node.js apps, or ship them as standalone endpoints. When building UIs, integrate with agentic libraries like Vercel's AI SDK UI and CopilotKit to bring your AI assistant to life on the web.
  20. - [**MCP servers**](https://mastra.ai/docs/tools-mcp/mcp-overview): Author Model Context Protocol servers, exposing agents, tools, and other structured resources via the MCP interface. These can then be accessed by any system or agent that supports the protocol.
  21. - **Production essentials**: Shipping reliable agents takes ongoing insight, evaluation, and iteration. With built-in [evals](https://mastra.ai/docs/evals/overview) and [observability](https://mastra.ai/docs/observability/overview), Mastra gives you the tools to observe, measure, and refine continuously.
  22. ## Get started
  23. The **recommended** way to get started with Mastra is by running the command below:
  24. ```shell
  25. npm create mastra@latest
  26. ```
  27. Follow the [Installation guide](https://mastra.ai/docs) for step-by-step setup with the CLI or a manual install.
  28. If you're new to AI agents, check out our [templates](https://mastra.ai/docs/getting-started/templates), [course](https://mastra.ai/course), and [YouTube videos](https://youtube.com/@mastra-ai) to start building with Mastra today.
  29. <details>
  30. <summary><strong>Alternative:</strong> Use this pre-built prompt to get started</summary>
  31. ```md
  32. Create a new Mastra project. Mastra is a framework for AI applications and agents on a modern TypeScript stack. Before running the command, ask these questions one at a time and wait for each answer unless it was already provided:
  33. 1. Project name? (default: "my-mastra-app")
  34. 2. Provider? (required; options: "openai", "anthropic", "google", "xai")
  35. If the provider isn't supported, ask again and list the supported values.
  36. Run: `npm create mastra@latest <project-name> -- --llm <provider>`
  37. The command creates a default Mastra project, installs Mastra skills for detected coding assistants, and initializes Git when appropriate.
  38. After creation, enter the project directory and start the dev server: `npx bgproc start -n <project-name> -w -- npm run dev`
  39. Open Mastra Studio at `http://localhost:4111`. Studio is the interface for building, testing, and managing agents, workflows, and tools.
  40. Also mention that the Mastra model router provides access to thousands of models: https://mastra.ai/models
  41. ```
  42. </details>
  43. ## Documentation
  44. Visit our [official documentation](https://mastra.ai/docs).
  45. ## Build with AI
  46. Learn how to make your agent a Mastra expert by following the [Build with AI guide](https://mastra.ai/reference/build-with-ai).
  47. ## Contributing
  48. Looking to contribute? Pull requests are limited to collaborators only. Therefore you can _best_ help by creating high-quality issues with good reproductions and descriptions. Mastra will then verify your report and prioritize it accordingly.
  49. If you want to run Mastra or its tests locally, refer to the [development documentation](./DEVELOPMENT.md)
  50. ## Support
  51. We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
  52. It's also super helpful if you leave the project a star here, at the [top of the page](https://github.com/mastra-ai/mastra)
  53. ## Licensing
  54. This repository uses a dual-license model:
  55. - **Apache License 2.0**: The core framework and the vast majority of this codebase is open source under Apache-2.0.
  56. - **Mastra Enterprise License**: Code in any directory named `ee/` (e.g., `packages/core/src/auth/ee/`) is source-available under the Mastra Enterprise License. These features require a valid enterprise license for production use but can be freely used for development and testing.
  57. See [LICENSE.md](./LICENSE.md) for the full license mapping and [ee/LICENSE](./ee/LICENSE) for the enterprise license terms.
  58. ## Security
  59. We are committed to maintaining the security of this repo and of Mastra as a whole. If you discover a security finding we ask you to please responsibly disclose this to us at [security@mastra.ai](mailto:security@mastra.ai) and we will get back to you.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.