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

# Claude Code

> Add Sailer CRM in one command, sign in, and ask which workspace you are in.

Ten minutes. At the end Claude Code is calling tools against a real Sailer
workspace. The first connection cannot write — that is deliberate.

<Steps>
  <Step title="What you need">
    Claude Code installed, and a Sailer account whose email belongs to a
    workspace. You do not need an API token.
  </Step>

  <Step title="Add the CRM server">
    ```bash theme={null}
    claude mcp add --transport http sailer-crm \
      https://mcp.chatsailer.com/mcp/crm
    ```

    `sailer-crm` is the local name you will see in `/mcp`. The URL must include
    `/mcp/` before `/crm`.

    This is saved for the **current project** only. To have it in every project:

    ```bash theme={null}
    claude mcp add --scope user --transport http sailer-crm \
      https://mcp.chatsailer.com/mcp/crm
    ```
  </Step>

  <Step title="Authenticate">
    Inside Claude Code, run:

    ```
    /mcp
    ```

    Select **sailer-crm**, choose to authenticate. Your browser opens.

    Three screens, in this order:

    1. **Auth0 sign-in** — your Sailer email and password. Already signed in?
       This step is skipped.
    2. **"Claude Code wants to connect"** — if you belong to one workspace it is
       shown as confirmed text. If you belong to several, pick one. The
       permission list updates to match that workspace.
    3. Click **Approve**. The browser says you can close the tab.

    Do not fill in a Client ID or Client Secret anywhere. Sailer registers
    Claude Code itself.

    Back in the terminal, `/mcp` should show **sailer-crm — connected**.
  </Step>

  <Step title="Prove it">
    Ask, in plain language:

    > Which Sailer workspace am I connected to?

    Claude will call `whoami` and tell you the workspace name, the parent
    organization, the email that authorized the connection, and the scopes you
    granted. That single answer confirms auth, tenancy, and tool-calling.
  </Step>

  <Step title="Do something real">
    Still read-only. Try:

    > How many contacts are in this workspace?

    > Describe the CRM schema — what custom fields does this workspace have?

    > Find contacts created in the last 7 days.

    [CRM tools](/mcp/crm) is the catalogue. Writes need a reconnect with extra
    scopes — [Authentication](/mcp/auth).
  </Step>
</Steps>

## Add Studio too

Same command, different URL. A CRM grant will not work here — each server is
its own OAuth audience.

```bash theme={null}
claude mcp add --transport http sailer-studio \
  https://mcp.chatsailer.com/mcp/studio
```

Then `/mcp` → **sailer-studio** → authenticate again. [Studio tools](/mcp/studio).

## This client

**Project vs user scope.** Default is this project. `--scope user` is the one
you want if you keep asking "why isn't Sailer here?" in the next repo.

**CI, no browser.** An admin mints a workspace token and you pass it as a
header. Never commit it.

```bash theme={null}
claude mcp add --transport http sailer-crm \
  https://mcp.chatsailer.com/mcp/crm \
  --header "Authorization: Bearer sk_live_…"
```

`whoami` will report `credential: api_token` and `reads_company_wide: true`.
See [Authentication](/mcp/auth).

**Switch workspace, or grant writes.** Remove and add again, then pick at
consent:

```bash theme={null}
claude mcp remove sailer-crm
claude mcp add --transport http sailer-crm \
  https://mcp.chatsailer.com/mcp/crm
```

Shared failures (wrong URL, unknown email, missing scope) are on
[Troubleshooting](/mcp/troubleshooting).
