AI :: Agent :: Framework :: mastra :: Documentation :: Server
⪼ Made with 💜 by Polyglot.
The
@mastra/mcp-docs-serverpackage provides direct access to Mastra’s full knowledge base, including documentation, code examples, blog posts, and changelogs, via the MCP protocol. It works with Cursor, Windsurf, Cline, Claude Code, or any tool that supports MCP.
These tools are designed to help agents retrieve precise, task-specific information—whether you’re adding a feature to an agent, scaffolding a new project, or exploring how something works.
Once installed you can write prompts and assume the agent will understand everything about Mastra.
- “Add evals to my agent and write tests”
- “Write me a workflow that does the following [task]”
- “Make a new tool that allows my agent to access [3rd party API]”
- “Does Mastra work with the AI SDK? How can I use it in my [React/Svelte/etc] project?”
- “What’s the latest Mastra news around MCP?”
- “Does Mastra support [provider] speech and voice APIs? Show me an example in my code of how I can use it.”
- “I’m running into a bug with agent memory, have there been any related changes or bug fixes recently?”
- “How does working memory behave in Mastra and how can I use it to do [task]? It doesn’t seem to work the way I expect.”
- “I saw there are new workflow features, explain them to me and then update [workflow] to use them.”
And more - if you have a question, try asking your IDE and let it look it up for you.
For new projects, the MCP Docs Server can be added during installation either through the interactive setup prompts, or by specifying the -m flag using the non-interactive command.
To add the MCP Docs Server to an existing project, install it manually.
- Cursor: Edit .cursor/mcp.json in your project root, or ~/.cursor/mcp.json for global configuration
- Windsurf: Edit ~/.codeium/windsurf/mcp_config.json (only supports global configuration)
- VSCode: Either move the created .vscode folder into the top-level of your workspace or open the created folder as your new workspace root. Edit ~/.vscode/mcp.json in your project root. Add the following configuration:
- Claude Code: Run the claude mcp add command as shown below.
{
"mcpServers": {
"mastra": {
"command": "npx",
"args": ["-y", "@mastra/mcp-docs-server"]
}
}
}
