> ## Documentation Index
> Fetch the complete documentation index at: https://54617af-archee-studio.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://54617af-archee-studio.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://54617af-archee-studio.manicule.dev/api/mcp.
> Every agent surface: https://54617af-archee-studio.manicule.dev/.well-known/llms-manifest.json

# Sign-in and tokens (/mcp/authentication)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 775 · updated: 2026-11-26 -->
Related: [Set up Archee MCP](/mcp/setup.md), [Example programs](/mcp/examples.md), [Archee MCP troubleshooting](/mcp/troubleshooting.md), [Search and execute](/mcp/tools.md), [Python SDK](/mcp/sdk.md), [Limits and credits](/mcp/limits.md)

> Browser sign-in, personal access tokens, scopes and how to revoke access.

Archee MCP accepts two kinds of credentials. Both act as you, inside your plan, and both can be revoked at any time.

* **Browser sign-in (OAuth)** suits interactive clients such as Claude Code, Cursor and Claude Desktop. It refreshes itself, and the refresh token lasts 30 days from its last use.
* **Personal access tokens** (`arch_pat_…`) suit CI, scripts and headless agents. You choose 7, 30 or 90 days when you create one.

## Browser sign-in

Clients that support remote MCP servers discover Archee's sign-in automatically. On first use the client opens your browser. You sign in, see which scopes the client asks for and approve. The client then holds short-lived access tokens and refreshes them on its own.

Archee uses OAuth 2.1 with PKCE. A refresh token can be used once. If a used one comes back, Archee treats it as stolen and ends that whole sign-in.

## Personal access tokens

### Create a token

<div class="steps">
  1. In the web app, open **Settings → Connections**.

  2. Create a token and pick its scopes and an expiry.

  3. Copy it. It is shown once, so copy it now. If you lose it, create a new one.
</div>

:::caution
Keep tokens in an environment variable or a secret store, never in a repository.
:::

### Use a token

Pass it as a bearer header:

<div class="tabs" data-labels="Claude Code|Codex|Cursor">
  ```bash
  # Claude Code
  export ARCHEE_TOKEN=arch_pat_...
  claude mcp add --transport http archee https://mcp.archee.studio/mcp \
    --header "Authorization: Bearer $ARCHEE_TOKEN"
  ```

  ```toml
  # Codex: ~/.codex/config.toml
  [mcp_servers.archee]
  url = "https://mcp.archee.studio/mcp"
  bearer_token_env_var = "ARCHEE_TOKEN"
  ```

  ```json
  // Cursor: ~/.cursor/mcp.json
  { "mcpServers": { "archee": {
    "url": "https://mcp.archee.studio/mcp",
    "headers": { "Authorization": "Bearer ${env:ARCHEE_TOKEN}" } } } }
  ```
</div>

Client configuration formats change. If one of these stops working, follow your client's own remote-MCP documentation with the same URL and `Authorization: Bearer` header.

## Scopes

A connection holds only the scopes you approved, and never more than your plan allows.

* `mcp:search` finds SDK functions with `search`.
* `mcp:execute` runs programs with `execute`.
* `files:write` uploads files to a project.
* `kb:read` searches the Knowledge Base and reads its pages.
* `verify` runs TCVN drawing checks.
* `deliver` packages deliverables.
* `agent:run` hands long work to Archee's agent.

A client that asks for no scope gets `mcp:search`, `mcp:execute` and `kb:read`. A program that calls a function outside its scopes gets a `ScopeDenied` error naming the missing scope.

## Revoke access

Under **Settings → Connections**, revoke a connected app or a token. The next request it makes is refused. Revoking a connected app also ends its refresh tokens, so it cannot sign itself back in without you.

If your plan stops including MCP, every connection stops working within about a minute, and works again if the plan is restored.
