What it does
Docusaurus-plugin-mcp-server transforms a Docusaurus documentation site into an MCP-compatible server, enabling AI agents like Claude and Cursor to search and retrieve documentation programmatically. The plugin generates searchable documentation during the build process and exposes two tools—docs_search (for finding relevant pages with relevance scoring) and docs_fetch (for retrieving full page content as markdown). Setup requires deploying an MCP endpoint using platform-specific handlers (Vercel, Netlify, or Cloudflare Workers), then connecting the endpoint to your AI tool via its MCP configuration.
Who it's for
Documentation maintainers using Docusaurus who want their API and library docs accessible via Claude Code and Cursor. Teams using AI agents as development tools and needing to automatically ground responses in your official documentation.
Common use cases
- Search and fetch documentation from Claude Code while writing or debugging code
- Enable AI agents to ground responses in your API or library documentation without copy-paste
- Provide documentation context for code generation, reviews, and troubleshooting
- Expose internal docs to AI tools for on-demand retrieval during development workflows
Setup pitfalls
- Build and deployment platform coupling: each platform (Vercel, Netlify, Cloudflare Workers) requires different handler code and configuration; Cloudflare Workers cannot access the filesystem and must import docs directly
- Secrets detected (5 found): audit
docusaurus.config.js, environment variables, and deployment credentials before sharing configurations - Missing build artifacts:
docs.jsonandsearch-index.jsonare generated during build and must be deployed alongside your handler code - Base URL misconfiguration: incorrect
baseUrlin handler setup will break doc links and search result URLs returned to the agent