MCP consent namespace
Reference for the page where a person lets an AI assistant connect to their account on the board's MCP server.
A
JUse 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.
The consent page
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/authorizenever takes it. - Pass the page's query string to
getunchanged, 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. Theheading,trust,scopesandredirectNoticefields carry the same content in English. - Send
requestandconsentTokenback 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:
next | What to do |
|---|---|
consent | Show the consent: who is asking, what approving allows (access), and who is signed in (email), with Allow and Cancel. |
sign_in | Send the person to the site's sign-in with returnTo. |
verify_email | Send the person to verify their email with returnTo. |
redirect | Send the browser to location, the assistant's own callback. |
error | Show 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.
Related methods
- See the
cavuno-board-mcpskill for serving the board's MCP server at/mcp. - Use
board.authfor the sign-in thesign_instep sends the person to.