# Connect Claude

> Hook Claude up to your AssetLab account - claude.ai and Claude Desktop via the remote connector, Claude Code via one command.

Source: https://app.assetlab.ca/docs/ai/connect-claude

All Claude surfaces connect through the AssetLab MCP server at `https://mcp.assetlab.ca`. You need one thing first: an **API key**.

## Step 0 - create an API key

In AssetLab, an **Administrator** goes to **Settings → API Keys → New key**:

1. Name it for its purpose ("Claude - Maria").
2. Choose scopes - start with read scopes; add `:write` scopes when you're ready for the assistant to create and update records. See [Tools & scopes](/docs/ai/tools-and-scopes).
3. Copy the key (`al_live_...`) - it's shown once.

> [!note] One key per person or per purpose. Shared keys make the audit log useless and revocation painful.

## claude.ai (web)

1. In Claude.ai, open **Settings → Connectors → Add connector**.
2. Paste the connector URL: `https://mcp.assetlab.ca`
3. When the AssetLab authorization page appears, paste your API key.
4. Done - AssetLab tools appear in your conversations. Try: *"List my sites."*

## Claude Desktop

Same flow as claude.ai - add a custom connector with URL `https://mcp.assetlab.ca` under **Settings → Connectors**, and authorize with your API key when prompted.

## Claude Code

```bash
claude mcp add --transport http assetlab https://mcp.assetlab.ca
```

Claude Code walks through the same authorization (paste your API key), after which AssetLab tools are available in your terminal sessions - useful for scripting bulk operations conversationally.

## Advanced: local stdio server

For clients that only speak stdio, the npm package runs the server locally:

```bash
npx @assetlab/mcp-server
```

It requires two environment variables: `ASSETLAB_API_KEY` (your key) and `ASSETLAB_API_URL` (the API base URL shown in **Settings → API Keys**). The remote connector is simpler - prefer it unless you have a reason.

## Verifying the connection

Ask something harmless and specific: *"How many assets do I have, by site?"* A correct, current answer confirms the pipe. If tools don't appear or auth fails:

- Re-check the key was pasted in full (they're long).
- Confirm the key is active and unexpired in **Settings → API Keys**.
- Reconnecting the connector re-runs authorization cleanly.

## Disconnecting

Revoke the API key in **Settings → API Keys** - this severs access immediately, regardless of what any client has cached. Removing the connector in Claude just tidies the UI; **revocation is the security action**. See [Security model](/docs/ai/security-model).
