# Run SEOFix on autopilot with your coding agent

> Turn on autopilot for a site, read the weekly fix queue with get_autopilot_queue, and run it unattended from a scheduled GitHub Actions workflow with Claude Code.

Source: https://seofix.ai/help/autopilot · Category: AI agents & MCP · Updated: 2026-11-12

Autopilot turns the loop (audit, fix, verify, measure) into a weekly routine. After each scheduled audit, SEOFix picks the site's top open fix tasks, stores them as that week's queue and emails them to your team with a one-line prompt. Your coding agent reads the queue with the `get_autopilot_queue` MCP tool, fixes each task in your repository, opens a pull request per task and verifies the fix after you merge. SEOFix never changes your code and never holds your AI or GitHub keys.

## Turn it on

1. Open the site in SEOFix. Autopilot needs a verified site (see [Verify ownership](https://seofix.ai/help/verifying-site-ownership.md)) on the Starter or Growth plan.
2. In the **Autopilot** card next to **Monitoring**, switch autopilot on and choose how many fixes per week (1 to 10, default 3). Turning autopilot on also turns weekly monitoring on when it was off: the queue is built from each scheduled audit.
3. Each week, after the audit settles, team members with report emails on receive "N fixes ready for your agent" with the verdict, the tasks and the prompt to paste.

Over the API: `PATCH /v1/sites/{id}` with `autopilot` (true or false) and `autopilot_per_week` (1 to 10); `GET /v1/sites/{id}/autopilot` returns the setting and the latest queue. The MCP tool `set_monitoring` takes the same two fields.

## Run the queue by hand

Paste the prompt from the email into Claude Code, Codex or Cursor, opened in the site's repository, with the `seofix` MCP server connected (`npx seofix connect`):

```text
Use the seofix skill: work through the autopilot queue for example.com.
```

The agent calls `get_autopilot_queue` with the site id. The answer has `enabled`, `per_week`, `plan_allowed`, `verified` and `latest_run`: `null` before the first run, otherwise the run's `id`, `crawl_id`, `created_at`, the audit's `verdict` and `tasks`, each a full `get_fix_task` payload with its `playbook` (where to make the change for your framework, the steps and how to verify). The agent works through the tasks in order and calls `verify_fix` after each deploy; tasks whose `recheckable` is false are verified by the next audit instead.

## Run it unattended

The `seofix` skill (installed by `npx seofix connect`, served at `https://seofix.ai/SKILL.md`) contains this GitHub Actions workflow. It runs every Monday at 05:00 UTC, after the audit slot, with Claude Code:

```yaml
name: seofix-autopilot
on:
  schedule:
    - cron: "0 5 * * 1"
  workflow_dispatch:
permissions:
  contents: write
  pull-requests: write
  id-token: write
jobs:
  autopilot:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Write the seofix MCP config
        run: |
          cat > "$RUNNER_TEMP/seofix-mcp.json" <<JSON
          {"mcpServers": {"seofix": {"type": "http", "url": "https://mcp.seofix.ai/mcp",
            "headers": {"Authorization": "Bearer ${{ secrets.SEOFIX_API_KEY }}"}}}}
          JSON
      # Input names follow the action's README: https://github.com/anthropics/claude-code-action
      - uses: anthropics/claude-code-action@v1
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: "Use the seofix skill: work through the autopilot queue for example.com and open one pull request per task"
          claude_args: >-
            --mcp-config ${{ runner.temp }}/seofix-mcp.json
            --allowedTools "mcp__seofix__*,Bash(git:*),Bash(gh pr create:*),Bash(npm:*),Read,Edit,Write,Glob,Grep"
```

Before the first run:

1. Create a team API key in **Settings**, **Agent & MCP** (or run `npx seofix connect --print`) and store it as the `SEOFIX_API_KEY` repository secret.
2. Store your Anthropic API key as `ANTHROPIC_API_KEY`.
3. Commit the skill into the repository at `.claude/skills/seofix/SKILL.md` so the runner has it, and replace `example.com` in the prompt with your site's host.
4. Give the workflow permission to open pull requests (Settings, Actions, Workflow permissions: read and write, allow pull requests).

Each run opens one pull request per task. Nothing merges on its own: you review and merge, and the next scheduled audit verifies what shipped and records the Search Console clicks the fix earned (see [Traffic from fixes](https://seofix.ai/help/traffic-from-fixes.md)).

Codex and Cursor schedulers take the same prompt: give them the `seofix` MCP server with the same Bearer header and the one-line prompt above.

## What a run reports

The skill ends every run with a short report: the verdict, the tasks taken, the files changed and pull requests opened, which fixes are verified and which are "not verified" and why, what it could not do (a fluff task while other tiers were open, a change to prices or copy, a redirect of a page with traffic) and, when `get_fix_impact` has data, the clicks each earlier fix earned.
