When an AI assistant can pull raw MDX from your repository (not a one-time HTML scrape), it answers with the same wording, examples, and structure your team published. docs.page runs a Model Context Protocol (MCP) server for every hosted repository so compatible clients can discover pages and read source files on demand.
Each docs.page site gets its own MCP endpoint, scoped to that repository's owner, name, and optional ref (branch, commit, or pull request). The server speaks streamable HTTP MCP and exposes read-only tools plus static resources. There is no write access to your GitHub repo or docs.json.
Production sites on docs.page use a URL like:
https://docs.page/{owner}/{repo}/mcpBranch and pull request previews add a ~ref segment, matching how page URLs work:
https://docs.page/{owner}/{repo}~{ref}/mcpCustom domains and vanity subdomains serve the same endpoint at /mcp on that host. See HTTP endpoints for path patterns across hosting modes.
Send GET to the MCP URL to receive a JSON descriptor: server name and description (from your docs.json name and description when set), transport type, repository context, and a catalog of tools and resources. Clients use this to discover what the server offers before opening an MCP session.
The server registers two tools, both read-only:
| Tool | Purpose |
|---|---|
list_doc_files | Returns the .mdx pages available in the current repository context |
read_doc_page | Fetches the raw markdown or MDX source for a page path you pass in |
read_doc_page returns source text, the same files under docs/ that docs.page renders, not pre-rendered HTML. That keeps token use predictable and lets the client cite exact headings and code blocks from your repo.
Beyond tools, the server advertises MCP resources clients can fetch:
docs-page-config-schema: JSON schema fordocs.json, so agents can validate or explain configuration fields- Agent skills: when your repo includes
.agents/skills/**, each skill file is exposed as a markdown resource (see Agent skills)
Prompts are not registered; interaction is through tools and resources only.
The MCP endpoint follows the same visibility rules as the docs site. Public repositories expose MCP; private repositories return 404 before any MCP handler runs. When mcp.enabled is false in docs.json, the endpoint is also unavailable. This is useful if you want a public site but prefer agents not to pull source programmatically.
MCP is on by default. You only need configuration when you want to turn it off, or when you are wiring a client for the first time.
To disable the endpoint, set mcp.enabled to false:
{
"mcp": {
"enabled": false
}
}Omit the mcp block, or leave enabled unset, to keep the server available. Field defaults and related settings are documented in docs.json.
Open your live docs site and connect from the page action menu or the command palette:
- Install with MCP (page menu) or Install MCP (Cmd+K / Ctrl+K): opens the Install MCP dialog with endpoint URL and client-specific config
- Connect to Cursor or Connect to VSCode (page menu): one-click deep links that register the MCP server for the site you have open
The command palette shows Install MCP when mcp.enabled is not false. See MCP server for the full entry-point list.
Create or edit .cursor/mcp.json in your project:
{
"mcpServers": {
"owner-repo": {
"url": "https://docs.page/owner/repo/mcp"
}
}
}Replace owner, repo, and the URL with the values shown in Install MCP. Use a lowercase server name derived from your repository (for example, acme-handbook for acme/handbook).
After the client connects, invoke list_doc_files to see available pages, then read_doc_page with a path such as docs/getting-started.mdx to load source content into the conversation.
Other MCP clients connect to the same HTTP URL. Install MCP includes copy-ready snippets for VS Code and Antigravity in the dialog.
