Skip to main content
Mastra 1.0 is available 🎉 Read announcement

Build with AI

AI agents may not have up-to-date knowledge about Mastra's APIs, patterns, and best practices. These resources give your AI tools direct access to current Mastra documentation, enabling them to generate accurate code and help you build faster.

Mastra Skills
Direct link to Mastra Skills

Agent Skills are folders of instructions, scripts, and resources that agents can discover and use to do things more accurately and efficiently. Mastra Skills contain setup instructions, best practices, and instructions on how to fetch up-to-date information from Mastra's documentation.

npx skills add mastra-ai/skills

Read the dedicated Mastra Skills guide to learn more about installation options and available skills.

tip

If you're just interested in giving your agent access to Mastra's documentation, we recommend using Skills. While the MCP Docs Server also provides this information, Skills will perform better. Use the MCP Docs Server when you need its tools, e.g. the migration tool.

MCP Docs Server
Direct link to MCP Docs Server

In addition to documentation access, the MCP Docs Server also provides tools to help you migrate to newer versions of Mastra or follow the Mastra 101 course.

Learn how to use the MCP Docs Server.

Embedded package docs
Direct link to Embedded package docs

Mastra packages ship with embedded documentation in dist/docs. When you install a Mastra package, your AI agent can read these files directly from node_modules to understand the package's APIs and patterns.

Each dist/docs includes:

  • SKILL.md: A skill file following the skills standard
  • references/: A folder with documentation files relevant to the package
  • assets/SOURCE_MAP.json: A source map file linking public exports to their location in node_modules

Context files
Direct link to Context files

Mastra provides a root llms.txt file that contains an overview of all available documentation pages.

Each documentation page also has its own llms.txt file. These files are streamlined markdown files. At the end of each docs page you'll find a link to the corresponding llms.txt file.

Add /llms.txt to any Mastra docs URL to access it. You can also request it by adding a .md extension to the end of the URL.

Examples for the introduction page:

Mastra's documentation
Direct link to Mastra's documentation

In addition to the context files each documentation page also features a "Copy markdown" button at the top of the page. It'll copy the streamlined markdown version to your clipboard. Beside it, you'll find a dropdown menu to open the page on GitHub, in ChatGPT, Claude, and others.