Provides AI assistants with direct access to Mastra.ai's complete knowledge base.
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.
Create or update .cursor/mcp.json
in your project root:
MacOS/Linux
{
"mcpServers": {
"mastra": {
"command": "npx",
"args": ["-y", "@mastra/mcp-docs-server"]
}
}
}
Windows
{
"mcpServers": {
"mastra": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@mastra/mcp-docs-server"]
}
}
}
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.
Create or update ~/.codeium/windsurf/mcp_config.json
:
MacOS/Linux
{
"mcpServers": {
"mastra": {
"command": "npx",
"args": ["-y", "@mastra/mcp-docs-server"]
}
}
}
Windows
{
"mcpServers": {
"mastra": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@mastra/mcp-docs-server"]
}
}
}
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.
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(),
});
mastraDocs
)mastraExamples
)mastraBlog
)mastraChanges
)Web search and webpage scraping using the Serper API.
Google News search capabilities with automatic topic categorization and multi-language support via SerpAPI integration.
Fetch, convert, and search AWS documentation pages, with recommendations for related content.
A full-text search server for Jewish texts and literature.
RAG MCP for your Agentset data.
Lightning-Fast, High-Accuracy Deep Research Agent 👉 8–10x faster 👉 Greater depth & accuracy 👉 Unlimited parallel runs
An MCP server for expert discovery, registration, and context injection, utilizing vector and graph databases.
Web search server that integrates Perplexity Sonar models via OpenRouter API for real-time, context-aware search with citations
A zero-configuration job aggregation service that fetches job listings from major recruitment websites.
Provides real-time flight tracking and status information using the AviationStack API.