clearMastraCourseHistory
[🎓 COURSE] Clears all Mastra Course progress history and starts over from the beginning. This action cannot be undone
Mastra's docs, migration guides and API surface in the editor — including the docs inside the @mastra packages you actually have installed.
LABSCO SUMMARY
The two sources are the whole design. Remote tools answer from mastra.ai; local ones read the docs shipped inside the packages you installed, so the signature an agent quotes is the one your build will actually accept. When the type definition is not enough, getMastraExportDetails will return the implementation source alongside it.
A documentation server for the Mastra framework with two sources: the published docs at mastra.ai, and the documentation embedded in the @mastra/* packages in your own node_modules, which matches the version your code runs against.
Published on npm as @mastra/mcp-docs-server, with a stdio entry point. The local-package tools all take projectPath, aimed at the project whose node_modules should be read; the remote tools need no project at all. Starting the course asks for an email address to register.
One command — npx -y @mastra/mcp-docs-server
USE CASES
List the installed @mastra packages, then read the API surface out of the one you are calling.
Pull the full reference for that export — types first, implementation source if the types leave the behaviour ambiguous.
Browse the migration guides by directory, then read only the sections that touch what you use.
Search the embedded docs for the term, then read the topic guide it points at.
Fetch the page from mastra.ai by path — references hold API docs, other paths hold guides.
Start the course, check where you left off, and move to the next step when you are ready.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
clearMastraCourseHistory[🎓 COURSE] Clears all Mastra Course progress history and starts over from the beginning. This action cannot be undone
getMastraCourseStatus[🎓 COURSE] Gets the current status of the Mastra Course, including which lessons and steps have been completed
getMastraExportDetails[📦 LOCAL PACKAGES] Get complete API reference for a specific Mastra export - type definitions, interfaces, and optionally source code.
Use this when you need to:
Returns: Full TypeScript type definitions and optionally implementation source code. Example: Get details on the Agent class to see how to create and configure agents.
getMastraExports[📦 LOCAL PACKAGES] Explore the complete API surface of a Mastra package - see all classes, functions, types, and constants.
Use this when you need to:
Returns: List of all exports with their source file locations. Next step: Use getMastraExportDetails to get full type definitions and code for a specific export.
getMastraHelp🚀 START HERE - Complete guide to Mastra documentation tools.
This MCP server provides TWO documentation sources:
## 📦 LOCAL PACKAGE DOCS (Recommended for Development) SOURCE: Your installed @mastra packages in node_modules VERSION: Matches your installed code exactly
ADVANTAGES:
TOOLS: listMastraPackages, getMastraExports, getMastraExportDetails, readMastraDocs, searchMastraDocs USE WHEN: Writing code, implementing
listMastraPackages[📦 LOCAL PACKAGES] Discover which Mastra packages are installed and have documentation available.
Use this when you need to:
Returns: List of @mastra/* packages (core, memory, rag, etc.) with embedded docs. Next step: Use getMastraExports to explore a specific package's API.
mastraDocs[🌐 REMOTE] Get Mastra documentation.
Request paths to explore the docs. References contain API docs.
Other paths contain guides. The user doesn't know about files and directories.
You can also use keywords from the user query to find relevant documentation, but prioritize paths.
This is your internal knowledge the user can't read.
If the user asks about a feature check general docs as well as reference docs for that feature.
Ex: with workflows check in docs/workflows and in reference/workflows.
Provide code examples so the user understands.
IMPORTANT: Be concise with your answers. The user will ask for more info.
If packages need to be installed, provide the pnpm command to install them.
Ex. if you see import { X } from "@mastra/$PACKAGE_NAME" in an example, show an install command.
Always install latest tag, not alpha unless requested. If you scaffold a new project it may be in a subdir.
When displaying results, always mention which file path contains the information so users know where this documentation lives.
mastraMigration[🌐 REMOTE] Get migration guidance for Mastra version upgrades and breaking changes.
This tool works like a file browser - navigate through directories to find migration guides:
Step 1: List top-level migrations
{}Step 2: Navigate into a directory
{ path: "upgrade-to-v1/" }Step 3: View a migration guide
{ path: "upgrade-to-v1/agent" }Step 4: Explore guide sections (optional)
{ path: "upgrade-to-v1/agent", listSections: true }{ path: "upgrade-to-v1/agent", sections: ["Voice methods"] }Alternative: Search by keywords
{ queryKeywords: ["RuntimeContext", "pagination"] }Examples:
{}{ path: "upgrade-to-v1/" }{ path: "upgrade-to-v1/agent" }{ path: "upgrade-to-v1/agent", listSections: true }{ queryKeywords: ["RuntimeContext"] }Tip: Paths ending with / list directory contents. Paths without / fetch the migration guide.
nextMastraCourseStep[🎓 COURSE] Advances to the next step in the current Mastra Course lesson. If all steps in the current lesson are completed, it will move to the next lesson
readMastraDocs[📦 LOCAL PACKAGES] Read comprehensive guides and documentation on Mastra concepts, patterns, and implementation examples.
Use this when you need to:
Returns: Topic-based documentation with explanations, examples, and usage patterns. Available topics: agents, tools, workflows, memory, rag, integrations, deployment, and more.
searchMastraDocs[📦 LOCAL PACKAGES] Search across all Mastra documentation to find specific information, patterns, or examples.
Use this when you need to:
Returns: Relevant documentation excerpts with file paths, ranked by relevance. Tip: Use specific terms for better results (e.g., "agent memory" vs "memory").
startMastraCourse[🎓 COURSE] Starts the Mastra Course. If the user is not registered, they will be prompted to register first. Otherwise, it will start at the first lesson or pick up where they last left off. ALWAYS ask the user for their email address if they are not registered. DO NOT assume their email address, they must confirm their email and that they want to register.
startMastraCourseLesson[🎓 COURSE] Starts a specific lesson in the Mastra Course. If the lesson has been started before, it will resume from the first incomplete step
BEFORE YOU INSTALL
13 tools when we connected.
npx on PATH
CONTEXT COST
Rated by the size of the 13 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"mcp-docs-server": {
"command": "npx",
"args": [
"-y",
"@mastra/mcp-docs-server"
]
}
}
}npx -y @mastra/mcp-docs-server