Overview
Every Docus instance includes a built-in MCP (Model Context Protocol) server that exposes your documentation to AI assistants and tools. This creates a standardized interface for AI applications like Claude, Cursor, VS Code, and others to discover and read your documentation.The MCP server is automatically available at the
/mcp path of your documentation URL (e.g., https://docs.example.com/mcp).What is MCP?
The Model Context Protocol is an open protocol that creates standardized connections between AI applications and external services. It allows:- Proactive tool use - LLMs can search your docs during response generation, not just when explicitly asked
- Real-time information - AI tools incorporate fresh documentation content into responses
- Context-aware decisions - LLMs determine when your docs are relevant to user questions
Built-in Tools
Docus provides two MCP tools out of the box:list-pages
Lists all documentation pages with titles, paths, and descriptions. AI assistants call this first to discover available content. Parameters:
Example response:
get-page
Retrieves the full markdown content of a specific documentation page. Parameters:
Example response:
~/.config/claude/claude_desktop_config.json
Cursor
Manually create the config file:.cursor/mcp.json
Visual Studio Code
Ensure you have GitHub Copilot and GitHub Copilot Chat extensions installed. Manually create the config:.vscode/mcp.json
Windsurf
1
Open Settings
Navigate to Settings > Windsurf Settings > Cascade
2
Manage MCPs
Click Manage MCPs, then select View raw config
3
Add Configuration
Add the following configuration:
.codeium/windsurf/mcp_config.json
Zed
1
Open Settings
Open Zed and go to Settings > Open Settings
2
Navigate to JSON
Navigate to the JSON settings file
3
Add Context Server
Add the following configuration:
.config/zed/settings.json
Configuration
Disable MCP Server
To disable the MCP server entirely:nuxt.config.ts
Custom Route
Change the MCP server route (advanced):nuxt.config.ts
Customization
Since Docus uses the@nuxtjs/mcp-toolkit module, you can extend the MCP server with custom tools, resources, prompts, and handlers.
Adding Custom Tools
Create new tools in theserver/mcp/tools/ directory:
server/mcp/tools/search.ts
Adding Resources
Expose files or data sources as MCP resources:file property automatically handles URI generation, MIME type detection, and file reading.
Adding Prompts
Create reusable prompts that help AI assistants use your documentation effectively:server/mcp/prompts/migration-help.ts
Adding Custom Handlers
Create separate MCP endpoints with their own tools, resources, and prompts:server/mcp/migration.ts
/mcp/migration for migration-specific functionality.
Overriding Built-in Tools
Override the defaultlist-pages or get-page tools by creating a tool with the same name:
server/mcp/tools/list-pages.ts
Advanced Use Cases
Multiple MCP Endpoints
Create specialized MCP servers for different purposes:/mcp- Main documentation/mcp/api- API reference only/mcp/migration- Migration assistance/mcp/examples- Code examples and snippets
server/mcp/api.ts
Cross-Documentation References
Create tools that reference multiple documentation sources:server/mcp/tools/search-all.ts
Context-Aware Tools
Create tools that understand project context:server/mcp/tools/suggest-fix.ts
Testing Your MCP Server
You can test your MCP server using the MCP Inspector or by making HTTP requests:Further Reading
MCP Toolkit
Full documentation for the MCP Toolkit module
Model Context Protocol
Official MCP specification and protocol details
AI Assistant
Learn how the assistant uses the MCP server
LLMs Integration
Expose your docs via llms.txt files