# Get Past the Front Door

> MCP clients sign in with OAuth 2.1 and PKCE; backends and scripts use an API key. Either way, every call resolves to the same authorised identity.

Authentication trips up more first calls than anything else, so it comes first. MCP clients use OAuth 2.1 with dynamic client registration and PKCE. Backends and scripts use an API key.

Pick the path for where you call from. Either way, every call resolves to the same authorised identity.

Two paths

## One Identity, Two Ways to Present It

Claude, Cursor or any MCP client

OAuth 2.1 bearer

The client handles it and sends Authorization: Bearer with every call.

cURL, the SDKs, the CLI or your backend

API key (sk_…)

Send Authorization: Bearer sk_… with each request.

The most common path

## How an MCP Client Gets Its Token

1

### Call Without a Token

The first POST to the MCP address returns 401 with a WWW-Authenticate header that points at the protected-resource metadata (RFC 9728).

2

### Discover the Authorisation Server

The client reads /.well-known/oauth-protected-resource, then /.well-known/oauth-authorization-server (RFC 8414), and learns where to register and sign in.

3

### Register Itself

POST /oauth/register (RFC 7591) returns the client's own id on the spot. There is no client id or secret to create in advance.

Then

## Sign in and Call

1

### Ask the User

GET /oauth/authorize with a PKCE S256 challenge. The user signs in with Google or Microsoft and approves the scopes.

2

### Exchange the Code

POST /oauth/token with the code and its verifier returns an access token that carries exactly the approved scopes.

3

### Make the Call

The original request again, now with Authorization: Bearer. Archie runs it.

Endpoints

## Discovery and Registration

Every endpoint sits at your region's root. Configure the server with its full address, ending in /mcp: the OAuth resource indicator is checked against that path.

text

```
GET  https://uk.heyarchie.com/.well-known/oauth-protected-resource
GET  https://uk.heyarchie.com/.well-known/oauth-authorization-server
POST https://uk.heyarchie.com/oauth/register
GET  https://uk.heyarchie.com/oauth/authorize
POST https://uk.heyarchie.com/oauth/token

MCP address: https://uk.heyarchie.com/mcp
```

Why there is no client secret

## Dynamic Client Registration

You never paste a client id or secret into an MCP client. On first connect the client registers itself and receives its own id, which is what makes a one-address connector possible.

No Secret to Leak

Apps prove possession with PKCE instead.

Known Redirects Only

Each app registers its own https or loopback addresses, and sign-in returns only to an exact match.

One Registration per Connection

Revoking one client leaves the rest working.

Nothing to Set up First

No app to create before you connect.

What the user approves

## Consent and Scopes

The token carries exactly the scopes the user approved, and every call is checked against them on the server. Someone who cannot see a client in Archie cannot reach it through a token either. API keys choose from the same eleven permissions. These four only read.

clients:read

list_clients

Read client financial and payroll data and analyse it.

search:read

search_knowledge

Search the knowledge base.

topics:read

topic_messages

List and read Topics and their messages.

workstreams:read

workstream_status

List WorkStreams and check how a cycle is going.

Scopes that do the work

## Ask, Analyse, Draft, Report

These four let Archie produce work for a person to review. Nothing they produce takes effect on its own.

ask:execute

ask_archie

Ask Archie a question, plus the advisory and research skills built on it.

documents:analyse

analyse_document

Analyse uploaded documents and review them against compliance requirements.

email:draft

prepare_communication

Draft client communications for a person to approve.

reports:generate

prepare_cfo_pack

Produce financial reports, memos and packs.

Scopes that write

## Change the Record

These three change what is stored. A write that crosses a risk threshold waits for a person to confirm it.

accounting:write

enrich_tb_rows

Bookkeeping writes: enrich trial-balance rows, flag duplicate codes and propose QBO tax-line mappings. Posting a journal is not yet available.

topics:write

topic_create

Create Topics and link conversations into them.

workstreams:write

workstream_run

Run, advance, approve and cancel WorkStreams.

Retired scope names

The scope names retired in June 2026 (messages:create, conversations:read, documents:read, drafts:write, journal:write, reports:read, standards:read, workstreams:execute) are refused when a client signs in or a key is created. A key that still lists only retired names is refused on every call: create a replacement with current scopes and revoke the old one, because rotating copies the permissions unchanged.

How long it lasts

## Token Lifetime

Fifteen Minutes

The client refreshes it with a refresh token that lasts 30 days and renews each time it is used.

Revoke a Connection

Remove it in Settings; its next call gets a 401.

For backends and scripts

## API Keys

Create a key with archie keys create or the Python SDK's client.keys.create and choose the permissions it needs. The full sk_ value is shown once, so copy it then; after that only a short preview, such as sk_...Ozgi, is shown.

bash

```
curl https://uk.heyarchie.com/api/v1/skills/workstream.list/invoke \
  -H "Authorization: Bearer $ARCHIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit": 5}'
```

Every key reaches live data

Archie has no sandbox: every key reaches your live workspace. Give each key only the permissions it needs, keep it out of code you share, and revoke any key that may have leaked. A rotated key keeps its parent working for 24 hours while you roll out the new value.

When it fails

## Errors

A skill call with no credential returns 401, with type authentication_error and code auth_required under detail.error. Other sign-in failures on skill calls carry AUTH codes, such as AUTH.TOKEN_INVALID; other routes return the status and a message. Branch on the status and the code, never on the message. Error handling lists every code.

json

```
{
  "error": true,
  "status_code": 401,
  "message": "Authorization: Bearer <token> required. …",
  "detail": {
    "error": {
      "type": "authentication_error",
      "code": "auth_required",
      "message": "Authorization: Bearer <token> required. …"
    }
  }
}
```

Next

### Quickstart

Connect a client and make a first call.

### MCP

The endpoint, discovery and token shape.

### SDKs

Call Archie from your own code.

### Getting Started

How Archie's parts fit together.

On this page

[One Identity, Two Ways to Present It](https://heyarchie.com/en-gb/developers/auth/#s-two-paths)[How an MCP Client Gets Its Token](https://heyarchie.com/en-gb/developers/auth/#s-the-most-common-path)[Sign in and Call](https://heyarchie.com/en-gb/developers/auth/#s-then)[Discovery and Registration](https://heyarchie.com/en-gb/developers/auth/#s-endpoints)[Dynamic Client Registration](https://heyarchie.com/en-gb/developers/auth/#s-why-there-is-no-client)[Consent and Scopes](https://heyarchie.com/en-gb/developers/auth/#s-what-the-user-approves)[Ask, Analyse, Draft, Report](https://heyarchie.com/en-gb/developers/auth/#s-scopes-that-do-the-work)[Change the Record](https://heyarchie.com/en-gb/developers/auth/#s-scopes-that-write)[Token Lifetime](https://heyarchie.com/en-gb/developers/auth/#s-how-long-it-lasts)[API Keys](https://heyarchie.com/en-gb/developers/auth/#s-for-backends-and-scripts)[Errors](https://heyarchie.com/en-gb/developers/auth/#s-when-it-fails)
