# Clients

A client is anything that signs people in with Buun Identity: a product's website, the gateway, another company's app, or an agent. Staff register one in the staff console; an agent registers itself with a metadata document.

## Kinds of client

| Kind | Consent page | Example | Registered by |
|---|---|---|---|
| A Buun Group product | Skipped | Plotwork's website | Staff, with the product chosen |
| A Buun Group service | Skipped | The MCP gateway | Staff |
| Another company | Shown | A partner's app | Staff |
| An agent with a client ID metadata document | Shown | Claude Code, an editor | Itself: its `client_id` is an https address whose document says what it is |

A person who arrives already signed in still presses Continue, so a link cannot sign them in silently.

## Fields

| Field | Meaning |
|---|---|
| Name | 3 to 60 letters, digits, spaces, `-` and `_`. People see it on the consent page |
| Whose it is | A Buun Group product, a Buun Group service, or another company |
| Product | For a product's client: which product, from `@buun-group/core` `PRODUCTS` |
| Redirect addresses | One to ten, matched exactly. `https`, or `http` on `localhost`, `127.0.0.1` or `[::1]`. No fragment |
| Resource servers | Up to ten APIs it may ask a token for with `resource` |
| Scopes | What it may ask for. `openid` is always needed |
| Keeps a secret | On for a client with a server. Its secret is shown once and kept as a SHA-256 only |
| Trades tokens for | For a confidential service only: the resource server it is, which lets it [trade tokens](https://developers.buungroup.com/mcp/token-exchange) |

## Registering one

In the staff console, open Clients and fill in Register a client. The client id is shown at once, and for a client that keeps a secret, the secret, once.

![The Clients page of the staff console, with the register form](https://developers.buungroup.com/shots/staff-clients.png "themed")

## Resource servers

A resource server is an API a token may name as its audience. The gateway is one, open to agents that register with a document. A product's MCP server is one with its product set, which the gateway may trade a token for. Staff add them on the same page.

![Resource servers in the staff console: the gateway and each product's MCP server](https://developers.buungroup.com/shots/staff-resource-servers.png "themed")

Source: https://developers.buungroup.com/sign-in/clients
