# Set up Growth Radar (instructions for an AI agent)

Growth Radar gives you a site's audit, search and AI-visibility data, and a ranked fix backlog, over MCP and a CLI.
Follow these steps on the user's machine. Each one is safe to repeat.

## 1. Install the CLI and connect every agent on this machine

If the user gave you a token (`grw_token_` + 32 hex characters):

```sh
curl -fsSL https://growthradar.app/install.sh | sh -s -- --token <grw_token_…>
```

Without a token, run the same command without `--token`. It opens the user's browser to sign in, so tell them to
approve the "Growth Radar CLI" request:

```sh
curl -fsSL https://growthradar.app/install.sh | sh
```

What it does: installs `growth-radar` to `~/.local/bin` (Node 18+ required), adds the `growth-radar` MCP server
to Claude Code, Cursor, Claude Desktop, Windsurf, Gemini CLI and Codex where they are installed (each config is
backed up to `<file>.bak` first), installs the `growth-radar-fix` skill where each agent reads skills, then checks
the connection. Preview without writing anything: `growth-radar setup --dry-run`.

The skill teaches the agent the fix loop: prove a row is real and current against the live site and raw data
(dismiss it with evidence if not), ship it, merge as soon as it is green, confirm it is live, then close it so it gets graded.
It goes to `~/.claude/skills/growth-radar-fix/` for Claude Code and to `~/.agents/skills/growth-radar-fix/` for
Codex, Cursor, Gemini CLI and Windsurf, which all read that shared folder. Claude Desktop has no skill folder, so
setup prints the link to upload. Rerunning setup updates the skill in place; `--no-skill` leaves it out. If the
browser sign-in fails, setup still writes the configs and the skill; run `growth-radar login` afterwards.

Windsurf, Gemini CLI and Codex need a token. A token also lets headless agents connect without a browser.
The user mints one in one click at https://growthradar.app/app/connect/agent.

## 2. Check it worked

```sh
growth-radar doctor
```

Every line should read without `failed` or `missing`. The `account` line lists the user's apps.
A newly added MCP server shows up in an agent after it restarts. In Claude Code, run `/mcp`.

Keep it current: `growth-radar update` replaces the CLI and rewrites the skill. Any tool result that carries
`_meta.update`, or a `doctor` line that says `outdated`, means it is due; `growth-radar doctor` shows both versions.

## 3. Use it

```sh
growth-radar tools                                   # every tool
growth-radar list_apps                               # start here: the slugs every other tool takes
growth-radar get_audit projectSlug=<slug>            # the audit, with a fix on every failing check
growth-radar get_recommendations app=<slug> detail=summary
growth-radar describe get_recommendations            # one tool's arguments
```

Add `--json` for the raw result. The MCP tools have the same names and arguments. The workflow for fixing a row
and closing the loop is in the skill: https://growthradar.app/skills/growth-radar-fix/SKILL.md

## 4. Fix every open issue

When the user asks you to fix everything Growth Radar found, get the prompt behind the Copy prompt button on their
Today page, on the card that says how many fixes are ready for your agent, and follow it:

```sh
growth-radar fix-all
```

Over MCP it is the resource `growth-radar://fix-all`. It works every open row on every app, worst first, marks
each row as it goes (`activate`, then `complete` or `dismiss`) so the user watches progress live, and follows the
skill: https://growthradar.app/skills/growth-radar-fix/SKILL.md

When the run is done, call `verify_fixes` once (`growth-radar verify_fixes`). It re-checks the user's live sites,
marks every fix it can see live as done, and returns each open row's verdict. If you skip it, Growth Radar runs the
same check on its own about 20 minutes after your last call.

## 5. Hand fixes to a coding agent through GitHub (optional)

When the site's code is on GitHub, Growth Radar can open each fix as an issue on the site's own repo,
so the coding agent that works that repo (Claude Code, Copilot, Cursor) picks it up.

1. The owner opens https://growthradar.app/settings#github, clicks **Install on GitHub**, chooses only
   the site's repos and approves. Then picks the repo for each site in the same card.
2. Any agent can then file a row: `growth-radar open_github_issue id=<recommendation id>` (or the MCP tool).
   Calling it again returns the same issue; it never files a duplicate.
3. Each issue carries the label `growth-radar` and the recommendation id. The agent that fixes it closes the
   loop with `update_recommendation` and `record_intervention` (passing `recommendationId`), as in the skill.

## 6. Connect what fits each site

`list_apps` gives each app a `connect` list, and `get_growth_snapshot` returns the same list for one app. It only
names connectors that fit how the site is served and are not connected yet, each with a one-line `reason` and,
when the signed-in user may set it up, `setup` with the exact steps. Do them in order:

- **Vercel** (site served by Vercel): open `setup.url` in a browser signed in to Growth Radar. It opens Vercel's
  install screen for any Vercel account or team; approve, then pick the site's Vercel project in Settings.
- **Cloudflare** (site behind Cloudflare): `setup.url` opens Cloudflare's Create API token page with the two
  read-only permissions in `setup.permissions` filled in. The user creates the token and pastes it in Settings,
  then picks the site's zone. Never paste the token anywhere else.
- **IndexNow** (every site until its key file is live): commit `setup.keyFile.fileName` with exactly
  `setup.keyFile.content` to the site's public root (for example `public/` or `static/`), deploy, check
  `setup.keyFile.keyUrl`, then make the `setup.verify` call (`submit_urls` with the homepage). Each site has its own key.
- **GitHub issues** (site has a repo but no link): open `setup.url`, choose only that repo, approve, then pick it in Settings.

When an item has `canSetUp: false`, it says who can (`askAdmin`); tell the user instead of trying.

## Free, no account

Want to try it first? `https://growthradar.app/api/mcp/free` needs no sign-in and has two tools: `audit_site`
(audit any public website for SEO, AI-search visibility, speed, structured data and copy quality, with a fix for each failing
check) and `get_site_audit`. Free use is rate-limited per address and per site.

```sh
claude mcp add --transport http growth-radar-free https://growthradar.app/api/mcp/free
```

The ranked backlog, search data and the fix loop need an account and the full endpoint below.

## Manual setup (no CLI)

- MCP endpoint: `https://growthradar.app/api/mcp`. Streamable HTTP, POST only. Always use this host:
  other hosts redirect, and the redirect drops the request body.
- Auth: an `Authorization: Bearer <grw_token_…>` header, or MCP OAuth (clients that support it sign in by themselves).
- Claude Code: `claude mcp add --scope user --transport http growth-radar https://growthradar.app/api/mcp --header "Authorization: Bearer <token>"`
- Discovery: https://growthradar.app/.well-known/mcp.json
