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

# Claude

> Connect Claude Desktop, Claude Web, or Claude Code to the Affinity MCP Server

## Supported Claude surfaces

| Surface                    | Best for                                              | Auth             | Setup                     |
| -------------------------- | ----------------------------------------------------- | ---------------- | ------------------------- |
| **Claude Desktop**         | Daily research and analysis on your laptop            | OAuth            | App settings → Connectors |
| **Claude Web** (claude.ai) | Shared chats from any browser; mirrors Desktop config | OAuth            | Same as Desktop           |
| **Claude Code** (CLI)      | Developers wanting CRM access from the terminal       | OAuth or API key | `claude mcp add`          |

Claude on iOS and Android picks up connectors configured on Claude Web for the same account.

## Prerequisites

**Affinity**

* **Plan**: Scale, Advanced, or Enterprise (required for API and MCP access).
* **Admin setup**: None required by default. If an Affinity admin has disabled Claude under
  **Settings → Affinity MCP**, ask them to re-enable it.

**Claude**

* **Plan**: The Affinity connector (remote MCP) is available on **Free**, **Pro**, **Max**,
  **Team**, and **Enterprise**.
* **Admin setup**:
  * On **Team** and **Enterprise**, only **workspace Owners** can enable the Affinity connector for
    the organization. Once enabled, every user authenticates themselves.
  * On **Free**, **Pro**, and **Max**, each user adds the connector themselves (no admin step).

## Claude Desktop & Web

Affinity is listed in [Claude's connector directory](https://claude.ai/directory/connectors/affinity).

### Admin: Enable the Connector (Team & Enterprise)

A workspace Owner only needs to do this once for the entire org.

<Note>
  **Not an admin?** Send this to your workspace Owner: "We want to use Affinity inside Claude. Can you add the Affinity connector to our team under Organization settings → Connectors? It's listed in Claude's connector directory. Once you add it, every user authenticates themselves once."
</Note>

1. In **Organization settings** → **Connectors**, click **Browse connectors** and search for **Affinity**, or open the [Affinity connector](https://claude.ai/directory/connectors/affinity) directly.
2. Select the Affinity connector and click **Add to your team**. The connector is now available to all users on the plan.

Adding the connector makes it available to your team, but it doesn't grant anyone access on its own: each user still authenticates individually (see [Connect and Authorize](#user-connect-and-authorize) below).

#### Limit Affinity to read-only (optional)

Owners can cap what the connector is allowed to do for the whole organization. Open the Affinity connector, go to the **Configuration** tab, and use **Tool permission restrictions**. Each tool can be set to **Always allow**, **Ask**, or **Block**, and the tools are grouped into **Read-only tools** and **Write/delete tools**.

<Note>
  Tool permission restrictions apply to Affinity in **Claude.ai**, **Claude Desktop**, and **Claude Code on the web**. They do **not** apply to **Claude Code CLI**, Desktop Extensions, or the Claude API, which are controlled separately.
</Note>

### User: Add the Connector (Free, Pro, Max)

On individual plans there is no admin step: each user adds the connector themselves.

1. In **Settings** → **Connectors**, browse the connector directory and search for **Affinity**, or open the [Affinity connector](https://claude.ai/directory/connectors/affinity) directly.
2. Select the Affinity connector and click **Add**.

### User: Connect and Authorize

Every user authenticates Affinity themselves, regardless of plan.

1. In the left nav bar, click **Customize** → **Connectors**.
2. Find the Affinity connector and click **Connect** to initiate the OAuth flow.
3. Once authenticated, Affinity data is accessible from your Claude conversations.

<Note>
  **Re-authorizing?** Follow the same flow, but first open the Affinity connector and click **Disconnect** in the top right before reconnecting.
</Note>

***

## Claude Code

Each developer registers the server in their own Claude Code install.

1. Run the following command to register the hosted MCP server:

   ```bash theme={null}
   claude mcp add --transport http affinity-mcp https://mcp.affinity.co/mcp
   ```

2. Open Claude Code and run `/mcp`.

3. Press **Enter** on the `affinity-mcp` server entry.

4. Select **Re-authenticate** to initiate the OAuth flow and authorize Affinity in your browser.

5. Once authenticated, you can use the `affinity-mcp` server in your Claude Code conversations.

***

## Claude Code - API Key Setup

Use this if you can't complete a browser OAuth flow (e.g. headless environments, CI). Generate an
API key first. See [Authentication](/pages/mcp/authentication#api-key) for steps.

```bash theme={null}
claude mcp add --transport http affinity-mcp https://mcp.affinity.co/mcp \
    --header "Authorization: Bearer your_api_key_here"
```

***

## Test your connection

Once authenticated, try one of these in Claude to confirm it's working:

* *Find 3 companies I emailed in the last 30 days.*
* *Show me my upcoming meetings.*
* *Summarize recent activity on Acme Corp.*

If you get an answer with Affinity data, you're set. If not, see [Troubleshooting](/pages/mcp/troubleshooting).
