When an 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 public repository.
Before you begin
- A published docs URL you can open in a browser (see Agent-ready docs)
- A public GitHub repository; private repos return
404for MCP
MCP is on by default. You only edit docs.json when you want to turn the endpoint off. For server design, tools, and access control detail, see MCP server on Features.
Each docs.page site gets a read-only MCP endpoint scoped to that repository's owner, name, and optional ref (branch, commit, or pull request):
https://docs.page/{owner}/{repo}/mcpBranch and pull request previews add a ~ref segment before /mcp. Custom domains serve the same path at /mcp on that host.
The server speaks streamable HTTP MCP. There is no write access to your GitHub repo or docs.json.
| Tool | Purpose |
|---|---|
list_doc_files | Returns .mdx pages in the current repository context |
read_doc_page | Fetches raw MDX source for a path such as docs/getting-started.mdx |
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 agent cite exact headings and code blocks.
Beyond tools, the server advertises MCP resources:
docs-page-config-schema: JSON schema fordocs.json- Agent skills: when your repo includes
.agents/skills/**, eachSKILL.mdis exposed as a markdown resource
- Client connects to your MCP URL
- Agent calls
list_doc_filesto see available pages - Agent calls
read_doc_pagefor paths relevant to the user's question - Agent cites headings and code blocks from the returned source
Use MCP when the agent works in an editor or terminal, should load only relevant pages, or needs skill resources alongside docs. For a one-fetch catalog instead, see llms.txt.
Open any page on your published docs site. MCP setup is available from two places in the UI:
| Entry point | Options |
|---|---|
| Page action menu ( Copy page chevron) | Install with MCP (opens dialog), Connect to Cursor, Connect to VSCode |
| Command palette (Cmd+K / Ctrl+K, empty query) | Install MCP (opens the same dialog) |
Install with MCP / Install MCP opens a dialog titled Install MCP with your endpoint URL and copy-ready snippets for Cursor, Claude Code, VS Code, and Antigravity.
Connect to Cursor and Connect to VSCode skip the dialog and register the server via a one-click deep link (cursor://… or vscode:mcp/install?…) using the MCP URL for the site you have open.
The command palette shows Install MCP only when MCP is enabled (mcp.enabled is not false). The page menu lists MCP items on every hosted page.
When you cannot use the live site UI, configure a client by hand:
Create or edit .cursor/mcp.json:
{
"mcpServers": {
"owner-repo": {
"url": "https://docs.page/owner/repo/mcp"
}
}
}Replace owner, repo, and the URL with your repository values (or copy from Install MCP on the live site).
After connecting, invoke list_doc_files, then read_doc_page with a path from the listing.
To keep a public site but block programmatic source access, set mcp.enabled to false in docs.json:
{
"mcp": {
"enabled": false
}
}Commit and publish. The MCP route returns 404, Install MCP disappears from the command palette, and MCP deep links point at an unavailable endpoint. llms.txt exports are unaffected.
- Agent-ready docs: how MCP fits alongside llms.txt and Ask AI
- Page actions: Install with MCP, Connect to Cursor, and Connect to VSCode in the header menu
- MCP server on Features: server descriptor, access control, and URL patterns
- Agent skills: expose
.agents/skillsas MCP resources - HTTP endpoints: MCP route lookup
