MCP consent namespace

Reference for the page where a person lets an AI assistant connect to their account on the board's MCP server.

Use board.mcpConsent to build the board's own consent page: the page where a person approves or declines an AI assistant, such as Claude or ChatGPT, connecting to their account on the board's MCP server. The page lives in the site's own layout, at its own path and in the board's language.

An assistant starts sign-in at the board's /oauth/authorize. When the site declares the assistantConsent route role (canonical path /authorize), the board sends the browser there with the sign-in request in the query. A site that does not declare it gets a page Cavuno hosts.

  • Mark the page with export const cavunoPage = 'assistantConsent'. Unlike other pages, this role is never inferred from the path, so an unrelated page at /authorize never takes it.
  • Pass the page's query string to get unchanged, and send the visitor's session bearer when they are signed in.
  • Word the page from the step's facts (access, trustLevel, publisherHost, redirectHost, knownAssistant) in the board's language. The heading, trust, scopes and redirectNotice fields carry the same content in English.
  • Send request and consentToken back unchanged with the person's decision.

Shared behavior

Both methods return the Board API wire body unchanged and throw BoardApiError for a non-2xx response. The trailing FetchOptions passes abort signals, headers, and framework cache directives through to fetch. They answer only for the board's own live site, where sign-in from assistants is on; anywhere else they reject with status 404. Never cache their responses: a step carries the visitor's email and a token bound to them.

board.mcpConsent.get

Returns what the page does next, by next:

nextWhat to do
consentShow the consent: who is asking, what approving allows (access), and who is signed in (email), with Allow and Cancel.
sign_inSend the person to the site's sign-in with returnTo.
verify_emailSend the person to verify their email with returnTo.
redirectSend the browser to location, the assistant's own callback.
errorShow why they can't connect, from code (message says it in English).

board.mcpConsent.submit

Allow (decision: 'allow') or Cancel ('deny') on the step get showed, as the signed-in visitor. Every check runs again. A redirect sends the browser to the assistant with its code, or with access_denied; an error with code: 'expired' means the person should connect again from their assistant.

  • See the cavuno-board-mcp skill for serving the board's MCP server at /mcp.
  • Use board.auth for the sign-in the sign_in step sends the person to.