Skip to main content

docusaurus-mcp-verify

Checks the MCP output of a Docusaurus build. It installs with the plugin.

npx docusaurus-mcp-verify [buildDir] [--output-dir <dir>]
ArgumentDefaultDescription
buildDir./buildThe Docusaurus build output directory
--output-dir <dir>mcpThe artifact directory inside buildDir. Match the plugin's outputDir option if you changed it
-h, --helpShow usage

It checks that:

  • the artifact bundle reads and validates (bundle.json, or the per-file layout from 2.0/2.1 builds, with a warning)
  • it has a search index for the built-in local search
  • an MCP server can initialize and load the content
npx docusaurus-mcp-verify
npx docusaurus-mcp-verify ./custom-build
npx docusaurus-mcp-verify ./custom-build --output-dir agents/mcp

Example output:

🔍 MCP Build Verification
==================================================
Build directory: /path/to/your/project/build
MCP directory: /path/to/your/project/build/mcp

📁 Checking build output...
✓ Found 42 documents
✓ Artifact bundle is valid

🚀 Testing MCP server...
✓ Server "my-docs" initialized with 42 documents

✅ All checks passed!

Exit codes​

CodeMeaning
0All checks passed
1The bundle failed validation or the server failed to start
2Invalid arguments

Run it as a postbuild script to fail the build when the bundle is broken:

package.json
{
"scripts": {
"build": "docusaurus build",
"postbuild": "docusaurus-mcp-verify"
}
}