Mastra Docs Server

official

Provides AI assistants with direct access to Mastra.ai's complete knowledge base.

What can you do with Mastra Docs MCP?

  • Fetch docs by path — Ask for a specific Mastra guide or API reference via mastraDocs, e.g., "show me the agents guide."
  • Explore installed packages — List local @mastra/* packages with listMastraPackages and inspect their exports, types, and source via getMastraExports and getMastraExportDetails.
  • Search embedded documentation — Run full-text queries across all docs with searchMastraDocs, or read topic-based guides like tools and workflows via readMastraDocs.
  • Navigate version migrations — Use mastraMigration to browse migration guides, list sections, or search keywords for upgrading between versions.
  • Track interactive course progress — Start or resume the Mastra course with startMastraCourse, check status via getMastraCourseStatus, and advance through lessons with startMastraCourseLesson and nextMastraCourseStep.
  • Get guided upgrade workflows — Trigger the upgrade-to-v1 prompt for a step-by-step v0.x-to-v1.0 migration, or request the migration-checklist for all breaking changes.

Documentation

@mastra/mcp-docs-server

Access Mastra's documentation via Model Context Protocol (MCP). Works with Cursor, Windsurf, Cline, Claude Code, VS Code, Codex, or any MCP-compatible tool.

Usage

Follow the official installation instructions.

Tools

mastraDocs

Fetch documentation from mastra.ai by path. Supports guides and API references.

mastraMigration

Navigate migration guides for version upgrades. Supports directory browsing, section listing, and keyword search.

Read docs from installed @mastra/* packages in node_modules. All tools require projectPath parameter.

getMastraHelp

Entry point showing all available documentation tools and recommended workflows.

listMastraPackages

List installed @mastra/* packages with embedded documentation.

getMastraExports

Explore package API surface - all classes, functions, types, and constants.

getMastraExportDetails

Get TypeScript type definitions and optionally implementation source code for a specific export.

readMastraDocs

Read topic-based guides and examples (agents, tools, workflows, memory, etc.).

searchMastraDocs

Full-text search across all embedded documentation.

Interactive Course

startMastraCourse

Start or resume the interactive Mastra course. Requires email registration.

getMastraCourseStatus

View course progress including completed lessons and steps.

startMastraCourseLesson

Jump to a specific lesson by name.

nextMastraCourseStep

Advance to the next step in the current lesson.

clearMastraCourseHistory

Reset all course progress.

Prompts

upgrade-to-v1

Guided migration workflow from Mastra v0.x to v1.0. Optionally focus on a specific area (agent, tools, workflows, etc.).

migration-checklist

Comprehensive checklist of all breaking changes for v1.0 migration.