How to expose docs over MCP

How-to guide

Point an agent at the tenant /api/mcp endpoint so it can search and fetch public pages without selecting another workspace.

Goal

Point an MCP client at this workspace so it can search public docs and fetch a page without selecting another tenant.

Conditions

  • The workspace has a live public package. Empty index means search returns nothing. *(see How-to: How to publish from your pipeline)*
  • You call the tenant host, for example https://your-subdomain.hosted.devdocs.ai/api/mcp.
  • You want public pages only. Private ACL content is not on this endpoint.

Procedure

  1. GET the endpoint. Discovery metadata lists the protocol version and tool names.
  2. POST JSON-RPC 2.0 initialize, then tools/list.
  3. If you want passages, call search_docs (hybrid retrieval, no LLM). If you want one page, call get_page with that page path.

Verification

tools/list includes search_docs and get_page. A search returns passages from this hostname only. A get returns the published page artifact for that path.

Note
Tenant identity comes only from the request hostname (or a validated server path). A tool argument cannot select another workspace.

Failures

  • Empty search: the live package has no indexed chunks, or the query matches nothing. Publish or sync first. *(see How-to: How to connect a source)*
  • Unknown path on get_page: that path is not in the live package.
  • Private page missing: expected. Public MCP does not return ACL-restricted content. *(see Explanation: About grounded answers)*

The marketing-site FAQ chat is a different product. It answers from a FAQ database for unsigned visitors and does not use MCP or a language model. *(see Reference: FAQ)*