# Set up SEOAgent

SEOAgent runs a website's SEO on autopilot. It audits the site, plans keywords, and drafts articles and fixes. It never publishes anything itself: you (the agent) apply the work, and the user signs in through their browser.

Pick ONE section below. Decide by what you can do in this conversation:

- You have a shell AND the website's source code (a git repo) → **Section A**. This is the best path.
- You are a Grok Bot → **Section B**.
- You are the Claude app (claude.ai, Claude Desktop) or ChatGPT → **Section C**.
- You are a code editor or CLI agent (Cursor, VS Code, Windsurf, Gemini CLI, Claude Code, Codex) but this workspace does NOT hold the website's repo → **Section D**.

Do not ask the user for a password, API key or token. Sign-in always happens in their browser.

## A. Coding agent in the website's repo (recommended)

Work from the root of the website's repo. If the workspace holds several projects, find the one that builds the site; if you cannot find it, ask the user.

1. Run: `npx -y @seoagent-official/seoagent@latest init --yes`
   It scaffolds `.seoagent/`, installs the SEOAgent skill, and prints where the skill landed.
2. Run: `npx -y @seoagent-official/seoagent@latest login`
   It opens a browser page. Tell the user to sign in or create an account there. Wait for the command to print "Logged in".
3. Read the skill file that step 1 printed and follow its "Session start" steps.

Claude Code can install the same thing as a plugin (it also adds the SEOAgent tools):

```bash
claude plugin marketplace add Baxter-Inc/seoagent-npm && claude plugin install seoagent@seoagent-official
```

Then run step 1 and step 2 above.

## B. Grok Bot

Tell the user to open our Grok Bot template and start a Bot from it: https://x.ai/bot/scYgD9jdFhooaSHihRzy7
The template signs the Bot in and connects the site in under a minute. Grok chat on grok.com or X cannot run commands, so it cannot use this guide; the template is the Grok path.

## C. Claude app or ChatGPT

You cannot add a connector yourself. Give the user these steps, then wait:

- **Claude (claude.ai or Claude Desktop):** Settings → Connectors → Add custom connector. Name: `SEOAgent`. URL: `https://seoagent.com/api/mcp`. Click Connect and sign in.
- **ChatGPT:** Settings → Apps & Connectors → Advanced settings → turn on Developer mode. Then Create, name `SEOAgent`, URL `https://seoagent.com/api/mcp`, authentication OAuth. Sign in when asked.

When the SEOAgent tools appear, go to **After you connect**.

## D. Editor or CLI agent without the website's repo

Add SEOAgent as a remote MCP server. The server uses OAuth: the first tool call opens a browser sign-in.

- **Claude Code:** `claude mcp add --transport http seoagent https://seoagent.com/api/mcp`, then run `/mcp` and choose SEOAgent to sign in.
- **Codex:** `codex mcp add seoagent --url https://seoagent.com/api/mcp`, then `codex mcp login seoagent`.
- **Cursor:** add to `~/.cursor/mcp.json`:
  ```json
  { "mcpServers": { "seoagent": { "url": "https://seoagent.com/api/mcp" } } }
  ```
- **VS Code:** add to `.vscode/mcp.json`:
  ```json
  { "servers": { "seoagent": { "type": "http", "url": "https://seoagent.com/api/mcp" } } }
  ```
- **Windsurf:** add to `~/.codeium/windsurf/mcp_config.json`:
  ```json
  { "mcpServers": { "seoagent": { "serverUrl": "https://seoagent.com/api/mcp" } } }
  ```
- **Gemini CLI:** add to `~/.gemini/settings.json`:
  ```json
  { "mcpServers": { "seoagent": { "httpUrl": "https://seoagent.com/api/mcp" } } }
  ```

If you find the website's repo later, switch to Section A: the repo path does more (deep crawl audits, articles written straight into the repo).

## After you connect (Sections C and D)

1. Call `sites_list`. If the user's site is not listed, call `site_add` with the domain the user named. Never add a domain the user did not name.
2. Call `actions_list` for the site. A new site gets a free 14-day Autopilot trial; autopilot queues its first work within 6 hours, so an empty list at first is normal. Meanwhile `content_ideas_suggest` and `keywords_strategy_get` work after about a minute.
3. For each action: `action_get`, apply it with the tools you have (a CMS or store connector, a git connector), then `action_ack`. If you cannot apply it, give the user the exact change and leave the action pending.

The `process_inbox` prompt walks this loop end to end.

## Help

- Docs: https://seoagent.com/docs
- Dashboard: https://seoagent.com/dashboard
