MCP.so
Sign In
M

Mastra

@mastra-ai

About Mastra

No overview available yet

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "mastra": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mastra/mcp-docs-server"
      ]
    }
  }
}

Tools

13

[🌐 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.

[🌐 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** - Call with no parameters: `{}` - Shows all top-level migration guides and directories **Step 2: Navigate into a directory** - Add trailing slash to explore: `{ path: "upgrade-to-v1/" }` - Lists all migration guides in that directory **Step 3: View a migration guide** - Without trailing slash: `{ path: "upgrade-to-v1/agent" }` - Returns the full migration guide content **Step 4: Explore guide sections (optional)** - List sections: `{ path: "upgrade-to-v1/agent", listSections: true }` - Get specific sections: `{ path: "upgrade-to-v1/agent", sections: ["Voice methods"] }` **Alternative: Search by keywords** - `{ queryKeywords: ["RuntimeContext", "pagination"] }` **Examples:** 1. List top-level: `{}` 2. Navigate to upgrade-to-v1: `{ path: "upgrade-to-v1/" }` 3. Get agent guide: `{ path: "upgrade-to-v1/agent" }` 4. List guide sections: `{ path: "upgrade-to-v1/agent", listSections: true }` 5. Search: `{ queryKeywords: ["RuntimeContext"] }` **Tip:** Paths ending with `/` list directory contents. Paths without `/` fetch the migration guide.

[🎓 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.

[🎓 COURSE] Gets the current status of the Mastra Course, including which lessons and steps have been completed

[🎓 COURSE] Starts a specific lesson in the Mastra Course. If the lesson has been started before, it will resume from the first incomplete step

[🎓 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

[🎓 COURSE] Clears all Mastra Course progress history and starts over from the beginning. This action cannot be undone

🚀 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: - ✅ Version-matched to your code - ✅ Complete TypeScript type definitions - ✅ Works offline - ✅ SOURCE_MAP.json with exact exports TOOLS: listMastraPackages, getMastraExports, getMastraExportDetails, readMastraDocs, searchMastraDocs USE WHEN: Writing code, implementing features, checking APIs, debugging ## 🌐 REMOTE WEBSITE DOCS (For Latest Info & Learning) SOURCE: mastra.ai website VERSION: Latest published documentation ADVANTAGES: - ✅ Always up-to-date - ✅ Blog posts and announcements - ✅ Migration guides - ✅ Curated examples TOOLS: mastraDocs, mastraBlog, mastraExamples, mastraChanges, mastraMigration USE WHEN: Learning concepts, checking latest features, migration help ## 🎓 INTERACTIVE COURSE TOOLS: startMastraCourse, getMastraCourseStatus, etc. USE WHEN: User wants guided learning experience --- RECOMMENDED WORKFLOW: 1. For coding: listMastraPackages → getMastraExports → getMastraExportDetails 2. For learning: mastraDocs 3. Version mismatch: mastraChanges → mastraMigration This tool shows you which packages are installed and provides detailed guidance on using all available documentation tools.

[📦 LOCAL PACKAGES] Discover which Mastra packages are installed and have documentation available. Use this when you need to: - See what Mastra packages you can work with - Start exploring Mastra documentation - Check if a specific package is available Returns: List of @mastra/* packages (core, memory, rag, etc.) with embedded docs. Next step: Use getMastraExports to explore a specific package's API.

[📦 LOCAL PACKAGES] Explore the complete API surface of a Mastra package - see all classes, functions, types, and constants. Use this when you need to: - Discover what APIs a Mastra package provides (Agent, Tool, Workflow, etc.) - See all available classes and functions before implementing - Find the right export for your use case - Understand package structure and organization 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.

[📦 LOCAL PACKAGES] Get complete API reference for a specific Mastra export - type definitions, interfaces, and optionally source code. Use this when you need to: - Understand how to use a specific Mastra class or function (Agent, Tool, Workflow, etc.) - See TypeScript type definitions and interfaces - Look up method signatures and parameters - Read implementation code and examples - Understand constructor options and configuration 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.

[📦 LOCAL PACKAGES] Read comprehensive guides and documentation on Mastra concepts, patterns, and implementation examples. Use this when you need to: - Learn how to implement Mastra features (agents, tools, workflows, memory, RAG, etc.) - Understand Mastra architecture and design patterns - See practical code examples and tutorials - Read getting started guides and best practices - Understand how different components work together Returns: Topic-based documentation with explanations, examples, and usage patterns. Available topics: agents, tools, workflows, memory, rag, integrations, deployment, and more.

[📦 LOCAL PACKAGES] Search across all Mastra documentation to find specific information, patterns, or examples. Use this when you need to: - Find specific topics or concepts quickly (e.g., "memory processors", "tool composition") - Locate examples of specific features or patterns - Search for error messages or troubleshooting info - Find mentions of specific APIs or configuration options - Discover where a feature is documented Returns: Relevant documentation excerpts with file paths, ranked by relevance. Tip: Use specific terms for better results (e.g., "agent memory" vs "memory").

Overview

What is Mastra?

Mastra is an MCP server that provides documentation to your IDE, helping you build AI-powered applications with the Mastra framework. It is designed for developers using TypeScript and integrates with tools like VS Code or other MCP-compatible IDEs.

How to use Mastra?

Follow the guide at @mastra/mcp-docs-server to configure Mastra in your IDE. The server serves Mastra's official documentation directly in your editor, making it easier to consult guides, API references, and examples while coding.

Key features of Mastra

  • Serves Mastra documentation directly inside your IDE.
  • Helps you write Mastra code without leaving your editor.
  • Integrates with any MCP‑compatible client.
  • Built by the team behind the Mastra framework.

Use cases of Mastra

  • Developers building AI agents with Mastra can look up docs on‑the‑fly.
  • Teams onboarding new Mastra developers can provide inline documentation.
  • IDE‑based workflows where switching to a browser is inconvenient.

FAQ from Mastra

What does the Mastra MCP server do?

It makes Mastra’s official documentation available through the Model Context Protocol, so you can query it from your IDE without opening a web browser.

How do I set up Mastra?

Follow the instructions in the @mastra/mcp-docs-server guide. A recommended way to get started with Mastra overall is by running npm create mastra@latest.

What dependencies does Mastra require?

— (Not explicitly stated in the README.)

Where does the documentation data live?

— (Not explicitly stated; the server likely retrieves it from Mastra’s official docs site.)

Is authentication required?

— (Not mentioned in the README.)

Frequently asked questions

What does the Mastra MCP server do?

It makes Mastra’s official documentation available through the Model Context Protocol, so you can query it from your IDE without opening a web browser.

How do I set up Mastra?

Follow the instructions in the [@mastra/mcp-docs-server guide](https://mastra.ai/docs/getting-started/mcp-docs-server). A recommended way to get started with Mastra overall is by running `npm create mastra@latest`.

What dependencies does Mastra require?

— (Not explicitly stated in the README.)

Where does the documentation data live?

— (Not explicitly stated; the server likely retrieves it from Mastra’s official docs site.)

Is authentication required?

— (Not mentioned in the README.)

Comments

More Other MCP servers