Getting started
Install
npm install docusaurus-plugin-mcp
Minimum config
// docusaurus.config.ts
export default {
plugins: [
[
'docusaurus-plugin-mcp',
{
server: { name: 'my-docs', version: '1.0.0' },
},
],
],
};
Run docusaurus build and you'll get build/mcp/snapshot.json — a single file holding the indexed docs.
Serve it locally
After a build, serve the snapshot:
npx docusaurus-plugin-mcp serve # reads build/mcp/snapshot.json on :3100
Or build and serve in one step, skipping the full Docusaurus build:
npx docusaurus-plugin-mcp serve --site . --openapi api=openapi/api.json
Then point a client at http://localhost:3100/mcp, or inspect it:
npx @modelcontextprotocol/inspector # connect via Streamable HTTP
Connect a client
# Claude Code
claude mcp add --transport http my-docs https://docs.example.com/mcp
// Cursor / VS Code: .cursor/mcp.json or .vscode/mcp.json
{ "mcpServers": { "my-docs": { "url": "https://docs.example.com/mcp" } } }
Next
- Configuration — the full option table
- OpenAPI — index your specs and serve resolved endpoint schemas
- Serving — local CLI, production serverless, and programmatic use