# Track keyword rankings with Codex

> Track Google keyword rankings from Codex with StoreSEO: add keywords after your yes, read history and competitors, and keep per-tool approvals strict.

Tracking keyword rankings with Codex means asking OpenAI's coding agent to use StoreSEO's rank tools from the CLI, the IDE extension or the ChatGPT desktop app to add keywords, read Google positions and compare competitors.

## How do you set up Codex for this?

### 1. Add StoreSEO to Codex

Run this in any terminal. It writes a [mcp_servers.storeseo] table to ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app all read.

```bash
codex mcp add storeseo --url https://mcp.storeseo.com/mcp
```

### 2. Sign in to your store

Run the login command. Your browser opens: pick your Shopify store and approve access. Then run codex mcp list, or type /mcp inside Codex, to confirm storeseo is there.

```bash
codex mcp login storeseo
codex mcp list
```

### 3. Or write it in config.toml (optional)

If you would rather edit the file, add this table to ~/.codex/config.toml, or to .codex/config.toml in a trusted project. In the desktop app or the IDE extension you can add the same URL under MCP servers, Add server, Streamable HTTP.

```toml
[mcp_servers.storeseo]
url = "https://mcp.storeseo.com/mcp"
```

### 4. Or connect with an access token (optional)

Generate a token in StoreSEO under Settings, AI Toolkit, export it as STORESEO_TOKEN in your shell, and point config.toml at that variable. Codex sends it as an Authorization Bearer header, so the token never sits in the file.

```toml
[mcp_servers.storeseo]
url = "https://mcp.storeseo.com/mcp"
bearer_token_env_var = "STORESEO_TOKEN"
```

Then ask: "Use StoreSEO to list my tracked keywords and write ranks.md here. Read only, add nothing."

## How does this work in Codex?

You run Codex in a terminal or editor, with StoreSEO configured as an mcp_servers table in config.toml, and ask for what you want in a sentence: track linen shirt for men in the United States on mobile. Codex calls storeseo_start, then storeseo_list_rank_locations and storeseo_list_rank_languages, and reports the exact names it will use. Whether Codex pauses before storeseo_add_keywords depends on your approval mode, and StoreSEO separately tells the agent to wait for your yes. The keyword counts against your plan's keyword limit.

Codex lets you set approval per tool, which suits this job. Reads such as storeseo_list_keywords and storeseo_get_keyword_history can run without a prompt while storeseo_add_keywords, storeseo_add_competitors and the two delete tools stay on prompt. Deleting a keyword removes its entire rank history and cannot be undone, and deleting a competitor removes its comparison results, so those two deserve the stricter setting. Ask Codex to write the report into the repository, for example ranks.md with position, change, SERP features and competitor positions, and diff it against last week's file to see what moved and which competitor gained ground.

A cluster is the one call where timing matters. The agent states the estimated AI credit and waits for your yes, calls storeseo_generate_keyword_cluster, and polls storeseo_get_keyword_cluster until the background job finishes, which takes a couple of minutes. Rank and competitor tools need the Pro plan, and positions for newly added keywords appear only after the background check completes, so a report written straight after adding them will show them as pending. Ask for a later refresh once the checks complete.

### Example session (illustrative)

**You:** List my tracked keywords and show which competitor ranks highest on each.
→ `storeseo_start` (read-only)
→ `storeseo_list_keywords` (read-only)
→ `storeseo_list_competitors` (read-only)
**Agent:** You track 9 keywords and 2 competitors. One competitor leads on five of them. You have three open slots for competitors. Want me to add example-competitor.com as the third?
**You:** Yes.
→ `storeseo_add_competitors` (needs approval)
**Agent:** Added. Its positions appear after the next background checks.

## What StoreSEO does: keyword rank tracking

StoreSEO checks your Google rank for tracked keywords by country, language and device, records the history and compares competitor domains. Keyword clusters group related keywords around a product's focus keyword with search volume and difficulty.

Tools: `storeseo_list_rank_locations`, `storeseo_list_rank_languages`, `storeseo_add_keywords`, `storeseo_list_keywords`, `storeseo_get_keyword_history`, `storeseo_list_competitors`, `storeseo_add_competitors`, `storeseo_delete_keyword`, `storeseo_delete_competitor`, `storeseo_generate_keyword_cluster`, `storeseo_get_keyword_cluster`

Requires: Rank and competitor tracking are Pro plan tools. Keyword clusters spend AI Content Optimizer credit.

1. **Pick the market.** The agent looks up the exact country and language names the tracker accepts, because new keywords must use them verbatim.
2. **Add keywords.** After your yes it adds keywords with a country, language and device. Checks run in the background, so positions appear later.
3. **Read ranks and history.** It lists your keywords with the latest Google position, change, SERP features and competitor positions, and reads the dated history for any keyword.
4. **Compare competitors.** Up to five competitor domains are tracked alongside your keywords. To change one, it is deleted and the new domain added.
5. **Build a cluster.** For a product with a focus keyword, StoreSEO generates a cluster of related keywords in the background; the agent states the estimated credit first and polls until it is ready.

## Keyword rank tracking reference

| Setting or limit | What applies |
|---|---|
| Search engine | Google; AI search engines are not tracked |
| Locations | 213 countries, country level only |
| Languages | 127 languages |
| Devices | Desktop or mobile |
| Competitors | Up to five domains; no edit, delete and re-add |
| Keyword limit | Counts against your plan's keyword limit |
| Deleting a keyword | Removes its entire rank history; cannot be undone |
| Keyword cluster | Built around the product's existing focus keyword, sorted by search volume, with relevance and difficulty |
| Plan | Pro plan for rank and competitor tools |

## Rules Codex follows

- On a plan without rank tracking, the agent explains the upgrade instead of calling the rank tools.
- Country and language names come from the lookup tools, never typed from memory.
- Deleting a keyword or competitor erases its history for good, so the agent confirms each one.
- A cluster needs a focus keyword set in the StoreSEO app; the agent states the estimated credit and waits for your yes.

**In Codex:** Set the storeseo server's default_tools_approval_mode to writes or prompt, not approve, and give storeseo_delete_keyword and storeseo_delete_competitor their own tools.<tool>.approval_mode of prompt. With approve, Codex skips its prompt and the confirmation StoreSEO asks for in chat is the only check left, while a deleted keyword loses its whole rank history. Codex also waits 60 seconds for a tool by default, so raise tool_timeout_sec if a call times out.

## What can you ask Codex to do?

- Use StoreSEO to list my tracked keywords and write ranks.md here. Read only, add nothing.
- Add linen shirt for men for the United States on mobile. Show me the exact location and language names before you add it.
- Show the rank history for my worst-moving keyword and say which competitor moved up on it.
- Track shopify linen shirts and linen shirt for men in the United States on mobile.
- How have my tracked keywords moved this month, and where do my competitors rank?
- Show the rank history for organic cotton tote since July.
- Add example-competitor.com as a competitor.
- Build a keyword cluster for my best seller and tell me the estimated credit first.
- Which tracked keywords dropped out of the top ten?

## Frequently asked questions

### Which Codex approval setting suits StoreSEO keyword tracking?

Use writes or prompt as the server default and keep the delete tools on prompt. Codex then asks before adding or deleting keywords and competitors. Approve skips the prompt, which leaves only the confirmation StoreSEO asks for in chat.

### Does Codex work in the IDE extension for rank tracking too?

Yes. The Codex CLI, the IDE extension and the ChatGPT desktop app share the same configuration, so a StoreSEO server in config.toml is available in each. Rank and competitor tools still need the Pro plan.

### Which plan do I need for keyword tracking through an agent?

Rank tracking and competitor tracking are Pro plan tools. On other plans the agent should explain that instead of calling them. Keyword clusters work on plans with AI Content Optimizer credit.

### Does StoreSEO track rankings in AI search engines?

No. The rank tracker checks Google results by country, language and device. AI visibility is handled by the GEO score, llms.txt and agents.md jobs instead.

### Why are new keywords pending?

Rank checks run in the background. Adding a keyword queues the first check, and its position appears in the keyword list once that check completes.

### What is a keyword cluster?

A group of related keywords built around a product's focus keyword, sorted by search volume and scored for relevance and difficulty. It shows which wider terms the product page can target.

## Keyword rank tracking with other agents

- [Track keyword rankings with Claude](https://storeseo.com/agent/claude/keyword-tracking)
- [Track keyword rankings with ChatGPT](https://storeseo.com/agent/chatgpt/keyword-tracking)
- [Track keyword rankings with Claude Code](https://storeseo.com/agent/claude-code/keyword-tracking)
- [Track keyword rankings with Claude Cowork](https://storeseo.com/agent/claude-cowork/keyword-tracking)
- [Track keyword rankings with Cursor](https://storeseo.com/agent/cursor/keyword-tracking)
- [Track keyword rankings with Gemini CLI](https://storeseo.com/agent/gemini-cli/keyword-tracking)
- [Track keyword rankings with GitHub Copilot](https://storeseo.com/agent/github-copilot/keyword-tracking)
- [Track keyword rankings with Windsurf](https://storeseo.com/agent/windsurf/keyword-tracking)
- [Track keyword rankings with Grok](https://storeseo.com/agent/grok/keyword-tracking)
- [Track keyword rankings with ChatGPT dots](https://storeseo.com/agent/chatgpt-dots/keyword-tracking)
- [Track keyword rankings with Grok Bot](https://storeseo.com/agent/grok-bot/keyword-tracking)
- [Track keyword rankings with Muse](https://storeseo.com/agent/muse/keyword-tracking)
- [Track keyword rankings with Manus](https://storeseo.com/agent/manus/keyword-tracking)
- [Track keyword rankings with OpenClaw](https://storeseo.com/agent/openclaw/keyword-tracking)
- [Track keyword rankings with Hermes Agent](https://storeseo.com/agent/hermes-agent/keyword-tracking)
- [Track keyword rankings with Paperclip](https://storeseo.com/agent/paperclip/keyword-tracking)
- [Track keyword rankings with NanoClaw](https://storeseo.com/agent/nanoclaw/keyword-tracking)
- [Track keyword rankings with OpenCode](https://storeseo.com/agent/opencode/keyword-tracking)
- [Track keyword rankings with Zed](https://storeseo.com/agent/zed/keyword-tracking)
- [Track keyword rankings with Kiro](https://storeseo.com/agent/kiro/keyword-tracking)
- [Track keyword rankings with Antigravity](https://storeseo.com/agent/antigravity/keyword-tracking)
- [Track keyword rankings with Kimi Code](https://storeseo.com/agent/kimi/keyword-tracking)

## More Codex guides

- [Codex and StoreSEO overview](https://storeseo.com/agent/codex)
- [Audit your store's SEO with Codex](https://storeseo.com/agent/codex/seo-audit)
- [Optimize meta tags and content with Codex](https://storeseo.com/agent/codex/optimize-meta)
- [Optimize images and alt text with Codex](https://storeseo.com/agent/codex/image-seo)
- [Get products ready for AI search with Codex](https://storeseo.com/agent/codex/ai-search-readiness)
- [Publish llms.txt and agents.md with Codex](https://storeseo.com/agent/codex/llms-txt-agents-md)
- [Set up structured data with Codex](https://storeseo.com/agent/codex/structured-data)
- [Manage sitemaps and indexing with Codex](https://storeseo.com/agent/codex/sitemaps)
- [Read Search Console and Analytics with Codex](https://storeseo.com/agent/codex/google-reports)
- [Write SEO blog post drafts with Codex](https://storeseo.com/agent/codex/blog-posts)

## Related documentation

- [Set up the keyword rank tracker](https://storeseo.com/docs/how-to-set-up-your-storeseo-keyword-rank-tracker)
- [Keyword cluster generator](https://storeseo.com/docs/storeseo-keyword-cluster-generator)
- [What is a focus keyword?](https://storeseo.com/docs/what-is-a-focus-keyword)

---

Canonical: https://storeseo.com/agent/codex/keyword-tracking
Last updated: October 2026.

Approval: Reads run straight away; StoreSEO tells the agent to preview and wait for your yes before it writes, spends credit or publishes, and your client's tool-approval setting is the hard stop.

Every agent guide: https://storeseo.com/agent · Connect the MCP server: https://storeseo.com/docs/connect-storeseo-mcp-to-your-ai-assistant · Pricing: https://storeseo.com/pricing · Install StoreSEO: https://apps.shopify.com/storeseo
