> ## 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.

# Cursor

> Add Sailer as a remote MCP server in Customize, or with four lines of mcp.json.

Ten minutes. Cursor speaks Streamable HTTP, which is what Sailer serves. Lead
with the UI; `mcp.json` is the same thing in a file.

The first connection cannot write. That is deliberate.

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

  <Step title="Add the CRM server">
    **UI**

    1. Open **Customize** in the sidebar.
    2. Open **MCP**.
    3. Add a new server.
    4. Paste `https://mcp.chatsailer.com/mcp/crm`.
    5. Save. Cursor treats a `url` as Streamable HTTP.

    Do **not** fill a static OAuth Client ID / Secret. Sailer does not issue
    you one, and Cursor will run the browser flow without it.

    **`mcp.json`**

    Project-only (commit this if the whole team should get it):
    `.cursor/mcp.json`. Every project: `~/.cursor/mcp.json`.

    ```json theme={null}
    {
      "mcpServers": {
        "sailer-crm": {
          "url": "https://mcp.chatsailer.com/mcp/crm"
        }
      }
    }
    ```

    That is the whole file. No `headers`, no `auth` block, no `command`.
  </Step>

  <Step title="Authenticate">
    Cursor prompts you 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. **"Cursor wants to connect"** — one workspace is confirmed text; several
       is a dropdown. The permission list matches the workspace you pick.
    3. Click **Approve**. Close the tab.

    In Customize, **sailer-crm** should show as connected with tools listed.
    A green dot is not the proof — the next step is.
  </Step>

  <Step title="Prove it">
    Open a new **Agent** chat (not a plain Ask that cannot call tools) and
    type:

    > Which Sailer workspace am I connected to?

    Cursor will call `whoami` and name the workspace, the parent organization,
    who authorized the connection, and the scopes you granted.
  </Step>

  <Step title="Do something real">
    > 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 —
    [Authentication](/mcp/auth).
  </Step>
</Steps>

## Add Studio too

Same UI, or a second entry in `mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "sailer-crm": {
      "url": "https://mcp.chatsailer.com/mcp/crm"
    },
    "sailer-studio": {
      "url": "https://mcp.chatsailer.com/mcp/studio"
    }
  }
}
```

Authenticate Studio separately. A CRM grant will not work there.

[Studio tools](/mcp/studio).

## This client

**Too many tools in the picker.** Toggle Studio off in Customize when you are
doing CRM work, and the other way around. Two servers exist so you can do that.

**Connection failed.** Output panel (`Cmd+Shift+U` / `Ctrl+Shift+U`) →
**MCP Logs**. Almost always a typo in the URL. Confirm the server is up:

```bash theme={null}
curl -s -o /dev/null -w '%{http_code}\n' https://mcp.chatsailer.com/healthz
```

`200` means Sailer is fine and the problem is the config.

**Cloud Agents / CI.** OAuth in a browser will not run there. Use a workspace
token via interpolation — never a literal `sk_` in a committed file:

```json theme={null}
{
  "mcpServers": {
    "sailer-crm": {
      "url": "https://mcp.chatsailer.com/mcp/crm",
      "headers": {
        "Authorization": "Bearer ${env:SAILER_API_TOKEN}"
      }
    }
  }
}
```

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

**Switch workspace, or grant writes.** Remove the server in Customize (or
delete the `mcp.json` entry), add it again, pick at consent.

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