AI
MCP Server
Let editors and agents read your documentation over the Model Context Protocol.
/mcp speaks the Model Context Protocol over
Streamable HTTP, so an editor can read the documentation directly instead of
scraping it.
Tools
list-pages{ locale?: string }
Every page with its title, path, description and URL. The starting point when the exact page is unknown.
get-page{ path: string }required
The full markdown of one page, plus its metadata.
Both are annotated read-only, so a client knows they cannot change anything.
Connecting
{
"mcpServers": {
"my-docs": { "url": "https://example.com/mcp" }
}
}How it behaves
The server is stateless: each POST is answered with one JSON-RPC response, and
nothing is stored between requests. GET and DELETE return 405, since there
is no stream to open and no session to end.
A tool that fails — an unknown page, say — comes back as a result marked
isError, not a protocol error, so the model can read the message and try
something else.
Custom tools
Pass your own to replace the built-in pair:
export const { GET, POST, DELETE } = createMcpRoute(source, docsConfig, {
name: 'my-docs',
tools: [...createMcpTools(source, docsConfig), myTool],
})