---
title: Connect Claude Code
description: Add the SyncFreedom MCP server to Claude Code with an API key or OAuth.
order: 30
---

Claude Code supports remote MCP servers over HTTP. You can authorize with OAuth (interactive) or with an API key (non-interactive, good for CI and shared machines).

## With an API key

1. In SyncFreedom go to **Dashboard → API keys**, create a key, and copy it. It starts with `sf_live_` and is shown once.
2. Add the server:

   ```
   claude mcp add --transport http syncfreedom https://syncfreedom.com/mcp \
     --header "Authorization: Bearer sf_live_XXXXXXXX"
   ```

3. In a Claude Code session run `/mcp` to confirm it is connected, then ask for anything QuickBooks.

Use `--scope user` to make the server available in every project, or add it to a project's `.mcp.json`:

```json
{
  "mcpServers": {
    "syncfreedom": {
      "type": "http",
      "url": "https://syncfreedom.com/mcp",
      "headers": { "Authorization": "Bearer ${SYNCFREEDOM_API_KEY}" }
    }
  }
}
```

## With OAuth

```
claude mcp add --transport http syncfreedom https://syncfreedom.com/mcp
```

Run `/mcp`, choose **Authenticate**, and approve in the browser. Tokens are stored by Claude Code and refreshed automatically.

## Scopes

API keys carry the scopes you pick at creation: `qbo:read` and optionally `qbo:write`. A key without `qbo:write` cannot call `create`, `update` or `delete`.
