---
title: "MCP consent namespace"
label: "MCP consent"
description: "Reference for the page where a person lets an AI assistant connect to their account on the board's MCP server."
publishedAt: 2026-11-18
order: 17
status: "published"
---

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.

## 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 `/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`

```ts no-check
board.mcpConsent.get(
  search: string,
  options?: FetchOptions,
): Promise<McpConsentStep>
```

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). |

```ts
const step = await board.mcpConsent.get(new URL(request.url).search, {
  headers: { authorization: `Bearer ${accessToken}` },
});
```

## `board.mcpConsent.submit`

```ts no-check
board.mcpConsent.submit(
  body: McpConsentDecisionBody,
  options?: FetchOptions,
): Promise<McpConsentDecision>
```

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.

```ts
const decision = await board.mcpConsent.submit(
  { request: 'eyJ9', consentToken: '1.sig', decision: 'allow' },
  { headers: { authorization: `Bearer ${accessToken}` } },
);
```

## Related methods

- See the `cavuno-board-mcp` skill for serving the board's MCP server at `/mcp`.
- Use [`board.auth`](/docs/sdk/reference/auth) for the sign-in the `sign_in` step sends the person to.
