# Authentication

> Personal access tokens, site API keys and agent staff members, and when to use each.

The MCP server accepts three kinds of credentials, all sent as a bearer token:

```http
Authorization: Bearer <token>
```

| | Personal access token | Site API key | Agent staff member |
| --- | --- | --- | --- |
| Prefix | `blgg_pat_` | `blgg_` | `blgg_` |
| Acts as | You | The admin who created it | The agent |
| Sites | All of yours, or the ones you pick | One | One |
| Role | Yours, on each site | The creator's | Author or editor |
| Created in | User menu → **MCP server** | **Settings → Developer → API** | **Settings → Staff → Add agent** |

Every request checks the current role on the site it targets. Change a role or remove someone, and their tokens follow at once.

## Personal access tokens

Recommended when you are the one working with the assistant.

1. In the dashboard, open the user menu and choose **MCP server**.
2. Create a token. Optionally limit it to some blogs, and choose **read-only** or **read & write**.
3. Copy it. It is shown once; only a hash is stored.

A token acts as you on **every blog you're active staff on**, with your role on each, including blogs you join later. Leaving a blog, or being deactivated on it, cuts the token off from that blog. Revoke a token from the same page.

## Site API keys

A site key reaches only its own blog.

1. Open **Settings → Developer → API** (admins only).
2. Create a key. It is **read-only** unless you turn on **Allow agents to edit content**.

A key acts as the admin who created it:

- Content it creates or edits is attributed to that person.
- Its permissions follow that person's current role on the site.
- If that person is removed from the site, their keys stop working.

Delete a key to revoke it at once. The same keys work with the [Content API](/docs/api#authentication).

## Agent staff members

Give an assistant its own identity, so its work is credited to it rather than to a person.

1. Open **Settings → Staff** and choose **Add agent** (admins only).
2. Name it, choose **author** or **editor**, and read or write access.
3. Copy the key. It is shown once.

- Agents are never admins and can't sign in to the dashboard.
- In the dashboard, the agent's changes are credited to the agent. Posts it creates get the person who added it as their public byline, so agents never show on your blog.
- **New API key** on the Staff page replaces the key; the old one stops working at once.
- Deactivating the agent pauses its key; removing the agent deletes it.

## Which sites a call targets

Every tool except `list_sites` takes an optional `site`: a site id or slug.

- With a site key, an agent key, or a token limited to one blog, leave it out.
- With several sites and no `site`, the call fails and lists the sites you can use.
- `list_sites` shows each site with your role and whether you can write.
