Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active September 23, 2025 16:41
Show Gist options
  • Select an option

  • Save wilmoore/422c81d633a2bfcf3c0b36fa74791c56 to your computer and use it in GitHub Desktop.

Select an option

Save wilmoore/422c81d633a2bfcf3c0b36fa74791c56 to your computer and use it in GitHub Desktop.
AI :: Agent :: Framework :: mastra :: Documentation :: Server

AI :: Agent :: Framework :: mastra :: Documentation :: Server

⪼ Made with 💜 by Polyglot.

related

The @mastra/mcp-docs-server package 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.

image

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.

How it works

Once installed you can write prompts and assume the agent will understand everything about Mastra.

Add features

  • “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]”

Ask about integrations

  • “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.”

Debug or update existing code

  • “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.

Automatic installation

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.

Manual installation

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.
Cursor
{
  "mcpServers": {
    "mastra": {
      "command": "npx",
      "args": ["-y", "@mastra/mcp-docs-server"]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment