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

# Connect Claude Code

> Add the Copyfy MCP server to Claude Code with one command, then sign in with OAuth or use an API key.

<Info>
  Steps checked against the Claude Code documentation on September 24, 2026.
</Info>

## Add Copyfy

<Tabs>
  <Tab title="OAuth (recommended)">
    <Steps>
      <Step title="Add the server">
        ```bash Terminal theme={null}
        claude mcp add --transport http --scope user copyfy https://app.copyfy.io/mcp
        ```

        `--scope user` makes Copyfy available in every project. Leave it out to add Copyfy to the current project only.
      </Step>

      <Step title="Sign in">
        Start Claude Code, run `/mcp`, select **copyfy**, and choose to authenticate. Sign in to Copyfy in your browser and click **Allow access**.

        You can also sign in from your shell with `claude mcp login copyfy`.
      </Step>

      <Step title="Try it">
        Ask: *"Use Copyfy to find 10 winning products in the Pets niche for the US."*
      </Step>
    </Steps>
  </Tab>

  <Tab title="API key">
    Create an [API key](/authentication#create-a-key) and store it in the `COPYFY_API_KEY` environment variable (for example in your shell profile or password manager), then add Copyfy for your user:

    ```bash Terminal theme={null}
    claude mcp add --transport http --scope user copyfy https://app.copyfy.io/mcp \
      --header "Authorization: Bearer $COPYFY_API_KEY"
    ```

    Your shell history only records `$COPYFY_API_KEY`, and the key is saved in your private `~/.claude.json`. Never paste the key itself into the command, and never use this command with `--scope project`: for a shared repository, use the `.mcp.json` below, which reads the variable at runtime.

    When an `Authorization` header is set, Claude Code uses it and never starts OAuth.
  </Tab>
</Tabs>

Run `claude mcp list` to check the connection. A server that still needs sign-in shows **Needs authentication**.

## Share Copyfy with your team

To add Copyfy to a repository, create `.mcp.json` at the project root, or run the OAuth command above with `--scope project`. Each teammate then signs in with their own Copyfy account.

```json .mcp.json theme={null}
{
  "mcpServers": {
    "copyfy": {
      "type": "http",
      "url": "https://app.copyfy.io/mcp"
    }
  }
}
```

To use API keys instead, reference an environment variable so no key is committed:

```json .mcp.json theme={null}
{
  "mcpServers": {
    "copyfy": {
      "type": "http",
      "url": "https://app.copyfy.io/mcp",
      "headers": {
        "Authorization": "Bearer ${COPYFY_API_KEY}"
      }
    }
  }
}
```

## Fallback

Copy the URL `https://app.copyfy.io/mcp` and add it as an HTTP server named `copyfy` in `~/.claude.json` or `.mcp.json` with the format above.

## Disconnect

Run `claude mcp remove copyfy --scope user` (use the scope you added it with). To revoke access from the Copyfy side, click **Revoke** under **Connected apps** or revoke the key on the [Integrations page](https://app.copyfy.io/dashboard/api).

Having trouble? See [Troubleshooting](/troubleshooting).
