> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noteboxd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP authentication

> Authenticate with the Noteboxd MCP server using OAuth 2.1 in your browser or a personal account API key.

Every tool invocation (`tools/call`) on `https://mcp.noteboxd.com/mcp` requires authentication. Discovery methods (`initialize`, `tools/list`, `resources/list`, and `resources/read`) remain public so MCP clients can inspect available tools and initiate OAuth before asking you to sign in.

You can authenticate in two ways:

1. **OAuth 2.1 (recommended)** for interactive clients such as Claude, ChatGPT, Claude Code, Codex, Cursor, and VS Code.
2. **Personal account API key (`nb_live_...`)** passed in the `Authorization: Bearer` header for scripts, CI environments, or clients that prefer static bearer credentials.

***

## Option 1: OAuth 2.1

When your MCP client connects to `https://mcp.noteboxd.com/mcp`, it receives a standard `401 Unauthorized` response containing a `WWW-Authenticate` header pointing to `https://mcp.noteboxd.com/.well-known/oauth-protected-resource`.

* **Resource identifier (`aud`)**: `https://mcp.noteboxd.com/mcp`
* **Authorization server issuer (`iss`)**: `https://www.noteboxd.com/api/auth`
* **Dynamic client registration**: Supported at `https://www.noteboxd.com/api/auth/oauth2/register`
* **Code challenge method**: `S256` (PKCE)
* **Access token TTL**: 15 minutes (`900` seconds), with `offline_access` refresh tokens supported

### Supported scopes

| Scope | Grant |
| - | - |
| `openid`, `profile`, `email` | Identify your Noteboxd account and subscription tier |
| `offline_access` | Refresh expired access tokens without re-prompting in the browser |
| `noteboxd:account:read` | Access your personal cabinet, collections, wishlist, reviews, wearing diary, and taste tools |

> [!WARNING]
>
> Identity-only scopes (`openid`, `profile`, `email`) are not sufficient for personal account tools. Approve `noteboxd:account:read` on the consent screen so your assistant can access your cabinet and collections.

***

## Option 2: Personal account API keys

You can generate a personal account key for hosted MCP clients instead of completing browser OAuth.

* **Free accounts**: 1 personal API key included
* **Noteboxd Pro accounts**: up to 3 personal API keys

**1. Create an account key**

Sign in to [noteboxd.com](https://www.noteboxd.com), open **Settings** → **API keys** at [noteboxd.com/settings#api-keys](https://www.noteboxd.com/settings#api-keys), click **+ Create new key**, and copy the key (`nb_live_...`). The full secret is shown once.

**2. Configure your MCP header**

Pass your personal account key as a Bearer token on requests to `https://mcp.noteboxd.com/mcp`:

```http theme={null}
Authorization: Bearer nb_live_YOUR_PERSONAL_KEY
```

Legacy `pb_live_...` account keys continue to work as Bearer tokens.

### Personal MCP keys vs. Developer Portal keys

Noteboxd maintains two separate key types that both use the `nb_live_` prefix:

| Key type | Created at | Works on |
| - | - | - |
| Personal account key | [noteboxd.com/settings#api-keys](https://www.noteboxd.com/settings#api-keys) | `https://mcp.noteboxd.com/mcp` |
| Developer Portal key | [developers.noteboxd.com](https://developers.noteboxd.com) | `https://api.noteboxd.com/v2/*` |

Presenting a Developer Portal key to `mcp.noteboxd.com/mcp` returns `401 Unauthorized` with error code `WRONG_KEY_TYPE`. Likewise, presenting a personal MCP key to `api.noteboxd.com/v2/*` returns `WRONG_KEY_TYPE`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.