@mastra/mcp-docs-server
A Model Context Protocol (MCP) server that provides AI assistants with direct access to Mastra.ai's complete knowledge base. This includes comprehensive documentation with MDX support, a collection of production-ready code examples, technical blog posts, and detailed package changelogs. The server integrates with popular AI development environments like Cursor and Windsurf, as well as Mastra agents, making it easy to build documentation-aware AI assistants that can provide accurate, up-to-date information about Mastra.ai's ecosystem.
Markdown Content: mastra/packages/mcp-docs-server at main · mastra-ai/mastra · GitHub
===============
Skip to content Navigation Menu
Toggle navigation
Appearance settings
- Product
* [GitHub Copilot Write better code with AI](https://github.com/features/copilot)
* [GitHub Spark New Build and deploy intelligent apps](https://github.com/features/spark)
* [GitHub Models New Manage and compare prompts](https://github.com/features/models)
* [GitHub Advanced Security Find and fix vulnerabilities](https://github.com/security/advanced-security)
* [Actions Automate any workflow](https://github.com/features/actions)
* [Codespaces Instant dev environments](https://github.com/features/codespaces)
* [Issues Plan and track work](https://github.com/features/issues)
* [Code Review Manage code changes](https://github.com/features/code-review)
* [Discussions Collaborate outside of code](https://github.com/features/discussions)
* [Code Search Find more, search less](https://github.com/features/code-search)
Explore * Why GitHub * All features * Documentation * GitHub Skills * Blog
- Solutions
By company size * Enterprises * Small and medium teams * Startups * Nonprofits
By use case * DevSecOps * DevOps * CI/CD * View all use cases
By industry * Healthcare * Financial services * Manufacturing * Government * View all industries
- Resources
Topics * AI * DevOps * Security * Software Development * View all
Explore * Learning Pathways * Events & Webinars * Ebooks & Whitepapers * Customer Stories * Partners * Executive Insights
- Open Source
* [GitHub Sponsors Fund open source developers](https://github.com/sponsors)
* [The ReadME Project GitHub community articles](https://github.com/readme)
Repositories * Topics * Trending * Collections
- Enterprise
* [Enterprise platform AI-powered developer platform](https://github.com/enterprise)
Available add-ons * GitHub Advanced Security Enterprise-grade security features * Copilot for business Enterprise-grade AI features * Premium Support Enterprise-grade 24/7 support
Search or jump to...
Search code, repositories, users, issues, pull requests...
Search
Clear
Provide feedback
We read every piece of feedback, and take your input very seriously.
- [x] Include my email address so I can be contacted
Cancel Submit feedback
Saved searches
Use saved searches to filter your results more quickly
Name
Query
To see all available qualifiers, see our documentation.
Cancel Create saved search
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
-
NotificationsYou must be signed in to change notification settings
-
Security### Uh oh! There was an error while loading.Please reload this page.
Additional navigation options
Collapse file tree
Files
main
Search this repository
-
.changeset -
.cursor -
.dev -
.github -
.husky -
auth -
book -
client-sdks -
communications -
deployers -
docs -
e2e-tests -
examples -
explorations -
integrations -
packages-
_config -
auth -
cli -
cloud -
core -
create-mastra -
deployer -
evals -
fastembed -
loggers -
mcp-docs-server-
src -
.gitignore -
CHANGELOG.md -
README.md -
eslint.config.js -
package.json -
tsconfig.build.json -
tsconfig.json -
turbo.json -
vitest.config.ts
-
-
mcp-registry-registry -
mcp -
memory -
playground-ui -
rag -
schema-compat -
server
-
-
releases -
scripts -
stores -
templates -
voice -
workflows -
.env.example -
.gitignore -
.prettierignore -
.prettierrc -
.vercelignore -
.windsurfrules -
CLAUDE.md -
CODE_OF_CONDUCT.md -
CONTRIBUTING.md -
DEVELOPMENT.md -
LICENSE.md -
README.md -
mastra-homepage.png -
package-lock.json -
package.json -
pnpm-lock.yaml -
pnpm-workspace.yaml -
renovate.json -
tsconfig.build.json -
tsconfig.json -
tsconfig.node.json -
turbo.json -
vitest.config.ts
Breadcrumbs
/ mcp-docs-server
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
Breadcrumbs
/ mcp-docs-server
/
Top
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|---|---|---|
| ### parent directory .. | |||
| src | src | ||
| .gitignore | .gitignore | ||
| CHANGELOG.md | CHANGELOG.md | ||
| README.md | README.md | ||
| eslint.config.js | eslint.config.js | ||
| package.json | package.json | ||
| tsconfig.build.json | tsconfig.build.json | ||
| tsconfig.json | tsconfig.json | ||
| turbo.json | turbo.json | ||
| vitest.config.ts | vitest.config.ts | ||
| View all files |
README.md
Outline
@mastra/mcp-docs-server
A Model Context Protocol (MCP) server that provides AI assistants with direct access to Mastra.ai's complete knowledge base. This includes comprehensive documentation with MDX support, a collection of production-ready code examples, technical blog posts, and detailed package changelogs. The server integrates with popular AI development environments like Cursor and Windsurf, as well as Mastra agents, making it easy to build documentation-aware AI assistants that can provide accurate, up-to-date information about Mastra.ai's ecosystem.
Installation
In Cursor
Create or update .cursor/mcp.json in your project root:
MacOS/Linux
undefinedjson { "mcpServers": { "mastra": { "command": "npx", "args": ["-y", "@mastra/mcp-docs-server"] } } } undefined
Windows
undefinedjson { "mcpServers": { "mastra": { "command": "cmd", "args": ["/c", "npx", "-y", "@mastra/mcp-docs-server"] } } } undefined
This will make all Mastra documentation tools available in your Cursor workspace. Note that the MCP server wont be enabled by default. You'll need to go to Cursor settings -> MCP settings and click "enable" on the Mastra MCP server.
In Windsurf
Create or update ~/.codeium/windsurf/mcp_config.json:
MacOS/Linux
undefinedjson { "mcpServers": { "mastra": { "command": "npx", "args": ["-y", "@mastra/mcp-docs-server"] } } } undefined
Windows
undefinedjson { "mcpServers": { "mastra": { "command": "cmd", "args": ["/c", "npx", "-y", "@mastra/mcp-docs-server"] } } } undefined
This will make all Mastra documentation tools available in your Windsurf workspace. Note that Windsurf MCP tool calling doesn't work very well. You will need to fully quit and re-open Windsurf after adding this. If a tool call fails you will need to go into Windsurf MCP settings and re-start the MCP server.
In a Mastra Agent
undefinedts import { MCPClient } from '@mastra/mcp'; import { Agent } from '@mastra/core/agent'; import { openai } from '@ai-sdk/openai';
// Configure MCP with the docs server const mcp = new MCPClient({ servers: { mastra: { command: 'npx', args: ['-y', '@mastra/mcp-docs-server'], }, }, });
// Create an agent with access to all documentation tools const agent = new Agent({ name: 'Documentation Assistant', instructions: 'You help users find and understand Mastra.ai documentation.', model: openai('gpt-4'), tools: await mcp.getTools(), });
// Or use toolsets dynamically in generate/stream const response = await agent.stream('Show me the quick start example', { toolsets: await mcp.getToolsets(), }); undefined
Tools
Documentation Tool (mastraDocs)
- Get Mastra.ai documentation by requesting specific paths
- Explore both general guides and API reference documentation
- Automatically lists available paths when a requested path isn't found
Examples Tool (mastraExamples)
- Access code examples showing Mastra.ai implementation patterns
- List all available examples
- Get detailed source code for specific examples
Blog Tool (mastraBlog)
- Access technical blog posts and articles
- Posts are properly formatted with code block handling
- Supports various date formats in blog metadata
Changes Tool (mastraChanges)
- Access package changelogs
- List all available package changelogs
- Get detailed changelog content for specific packages
Footer
Footer navigation
You can’t perform that action at this time.
Recommend MCP Servers 💡
mcp-pinecone
Model Context Protocol server to allow for reading and writing from Pinecone. Rudimentary RAG
viso-mcp
An MCP server integrating VISO TRUST API capabilities with AI assistants, providing tools for assessments, audit logs, business cases, data types, intelligent query response (IQR), relationships, and webhooks.
mac-messages-mcp
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
bioRxiv-MCP-Server
Enables AI assistants to search, access, and retrieve metadata for bioRxiv preprints, facilitating biological sciences research.
amanasmuei/mcp-server-malaysia-prayer-time
Provides accurate Islamic prayer times for locations throughout Malaysia via MCP integration with Claude Desktop
think-mcp
MCP Server for reasoning