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

# Getting started

Self-host your own instance or join Tracecat Community Cloud.
The easiest way to get started is to connect your agent harness (Claude Code, Cursor, OpenAI Codex) to Tracecat.

## Self-host

Docker Compose is the easiest way to self-host.
Check out the full guide [here](/self-hosting/docker-compose) or follow the quickstart below.

```bash theme={null}
# Setup environment variables and secrets
curl -o env.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.50/env.sh
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.50/.env.example
chmod +x env.sh && ./env.sh

# Download Caddyfile
curl -o Caddyfile https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.50/Caddyfile

# Download Docker Compose file
curl -o docker-compose.yml https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.50/docker-compose.yml

# Start Tracecat
docker compose up -d
```

## Connect MCP

Connecting your agent to Tracecat Cloud automatically creates an account for you.
You can also sign up manually via [https://platform.tracecat.com](https://platform.tracecat.com).

If you are **self-hosted**, replace `https://platform.tracecat.com` with your
`PUBLIC_APP_URL` (e.g. `http://localhost` or `https://tracecat.example.com`).

Authentication uses a built-in OIDC provider—your agent is redirected to sign in
through the browser on first connection. For clients or environments that cannot
complete a browser sign-in, authenticate with a
[personal access token (PAT)](/automations/tracecat-mcp#personal-access-tokens) instead.

<Tabs sync={false}>
  <Tab title="Claude Code" icon="https://cdn.simpleicons.org/anthropic">
    Sign in with OAuth:

    ```bash theme={null}
    claude mcp add -t http tracecat https://platform.tracecat.com/mcp
    claude
    /mcp
    ```

    Or authenticate with a [personal access token (PAT)](/automations/tracecat-mcp#personal-access-tokens).
    Set `TRACECAT_MCP_PAT` in your environment and reference it with **single
    quotes** so the variable (not the token) is written to the saved config:

    ```bash theme={null}
    claude mcp add --transport http tracecat https://platform.tracecat.com/mcp \
      --header 'Authorization: Bearer ${TRACECAT_MCP_PAT}'
    ```
  </Tab>

  <Tab title="OpenAI Codex" icon="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/openai.svg">
    Sign in with OAuth:

    ```bash theme={null}
    codex mcp add tracecat --url https://platform.tracecat.com/mcp
    codex mcp login tracecat
    ```

    Or authenticate with a [personal access token (PAT)](/automations/tracecat-mcp#personal-access-tokens).
    Set `TRACECAT_MCP_PAT` in your environment, then reference it by name:

    ```bash theme={null}
    codex mcp add tracecat --url https://platform.tracecat.com/mcp \
      --bearer-token-env-var TRACECAT_MCP_PAT
    ```
  </Tab>

  <Tab title="GitHub Copilot" icon="https://cdn.simpleicons.org/github">
    ```bash theme={null}
    copilot
    /mcp add
    # Server Name: tracecat
    # Server Type: HTTP
    # URL: https://platform.tracecat.com/mcp
    # Tools: *
    ```

    Follow [GitHub Copilot MCP setup](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers) for the latest CLI prompts.

    Or add this server to `~/.copilot/mcp-config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "tracecat": {
          "type": "http",
          "url": "https://platform.tracecat.com/mcp",
          "tools": ["*"]
        }
      }
    }
    ```

    To use a [personal access token (PAT)](/automations/tracecat-mcp#personal-access-tokens) instead of
    OAuth, add an `Authorization` header (`${TRACECAT_MCP_PAT}` is read from your
    environment):

    ```json theme={null}
    "headers": {
      "Authorization": "Bearer ${TRACECAT_MCP_PAT}"
    }
    ```
  </Tab>

  <Tab title="Cursor" icon="https://cdn.simpleicons.org/cursor">
    On Tracecat Cloud, click [Add Tracecat to Cursor](https://cursor.com/en-US/install-mcp?name=tracecat\&config=eyJ1cmwiOiJodHRwczovL3BsYXRmb3JtLnRyYWNlY2F0LmNvbS9tY3AifQ)
    to add it in one click. Otherwise configure `.cursor/mcp.json` manually:

    ```json theme={null}
    {
      "mcpServers": {
        "tracecat": {
          "url": "https://platform.tracecat.com/mcp"
        }
      }
    }
    ```

    To use a [personal access token (PAT)](/automations/tracecat-mcp#personal-access-tokens) instead of
    OAuth, add an `Authorization` header (Cursor resolves `${env:TRACECAT_MCP_PAT}`
    from your environment):

    ```json theme={null}
    "headers": {
      "Authorization": "Bearer ${env:TRACECAT_MCP_PAT}"
    }
    ```
  </Tab>
</Tabs>
