# Track keyword rankings with Gemini CLI

> Use Gemini CLI with the StoreSEO MCP server to add Google keywords after your yes, read rank history, compare competitors and keep tool trust switched off.

Tracking keyword rankings with Gemini CLI means asking Google's terminal agent to call StoreSEO's rank tools so it can add keywords, read your Google positions and history and compare competitor domains for your Shopify store.

## How do you set up Gemini CLI for this?

### 1. Add StoreSEO to Gemini CLI

Run this in any terminal. The user scope writes the server to ~/.gemini/settings.json so every project sees it. Without --scope user the command writes to the current project's .gemini/settings.json.

```bash
gemini mcp add --scope user --transport http storeseo https://mcp.storeseo.com/mcp
```

### 2. Sign in to your store

Start gemini. The first time it calls StoreSEO it opens your browser: pick your Shopify store and approve access. If the window does not open, type /mcp auth storeseo inside Gemini CLI. Then gemini mcp list should show storeseo as connected.

```text
/mcp auth storeseo
```

### 3. Or edit settings.json (optional)

Add this to ~/.gemini/settings.json for every project, or to .gemini/settings.json in one project. It is the entry gemini mcp add writes: url plus type set to http. The docs page still shows the older httpUrl key for streamable HTTP.

```json
{
  "mcpServers": {
    "storeseo": {
      "url": "https://mcp.storeseo.com/mcp",
      "type": "http"
    }
  }
}
```

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

On a headless machine the browser sign-in cannot run. Generate a token in StoreSEO under Settings, AI Toolkit and pass it as a header. Keep the token out of version control.

```bash
gemini mcp add --scope user --transport http \
  --header "Authorization: Bearer YOUR_TOKEN" \
  storeseo https://mcp.storeseo.com/mcp
```

Then ask: "Use StoreSEO to list my tracked keywords with position and change, and save a summary to ranks.md here. Add nothing."

## How does this work in Gemini CLI?

You run gemini in a terminal and describe the job in a sentence: track organic cotton tote bag in Canada, English, on desktop. Gemini CLI calls storeseo_start, then storeseo_list_rank_locations and storeseo_list_rank_languages, because the tracker takes only the exact names in its lists. Gemini CLI asks for confirmation before it runs an MCP tool unless the server is trusted, and StoreSEO tells the agent to state the keyword, market and device and wait for your yes before storeseo_add_keywords. The keyword then counts against your plan's keyword limit.

Reading is the everyday use. Ask which tracked keywords moved and Gemini CLI reads storeseo_list_keywords for the latest position, change, SERP features and competitor positions, then storeseo_get_keyword_history for the dated checks behind any keyword you care about. Because the sign-in needs a browser on the same machine, a headless box or an SSH session needs the access token header instead. Ask for the summary to be saved in the folder you launched from, so a later session can compare against it.

Competitors and clusters work as in any client. storeseo_add_competitors takes up to five domains in total, with no edit: the old domain is deleted and the new one added, each after your yes, and each delete erases that competitor's comparison results. For a cluster, the agent states the estimated AI credit, waits, calls storeseo_generate_keyword_cluster and then polls storeseo_get_keyword_cluster until the background job completes. Rank and competitor tools need the Pro plan, and new keywords show a position only after their first background check.

### Example session (illustrative)

**You:** Track organic cotton tote bag in Canada, English, on desktop.
→ `storeseo_start` (read-only)
→ `storeseo_list_rank_locations` (read-only)
→ `storeseo_list_rank_languages` (read-only)
**Agent:** Canada and English are both exact matches. I would add organic cotton tote bag for Canada, English, desktop, which counts against your keyword limit. Add it?
**You:** Yes, add it.
→ `storeseo_add_keywords` (needs approval)
**Agent:** Added and queued. The first rank check runs in the background, so it will show as pending for now.

## 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 Gemini CLI 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 Gemini CLI:** Do not set --trust or trust: true on the storeseo server. Trust skips every tool confirmation in Gemini CLI, so the confirmation StoreSEO asks for in chat would be the only check before storeseo_delete_keyword, which erases a keyword's whole rank history for good. If you want fewer prompts, trim the server with includeTools or excludeTools instead. Google's site also says Gemini CLI was replaced by Antigravity CLI on June 18th, 2026 for unpaid tier and Google One users, so check which agent your account can use.

## What can you ask Gemini CLI to do?

- Use StoreSEO to list my tracked keywords with position and change, and save a summary to ranks.md here. Add nothing.
- Track linen shirt for men in the United States on mobile. Show me the exact location and language you will use first.
- Delete nothing, but tell me which tracked keywords have not left position 20 in their whole history.
- 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

### Why does Gemini CLI keep asking before it uses a StoreSEO rank tool?

Gemini CLI confirms MCP tool calls unless the server is marked trusted. Leave trust off for StoreSEO, so the prompt stands between the agent and any keyword add or delete, and use includeTools if you want a smaller tool list.

### Can Gemini CLI track keywords over SSH?

Gemini CLI's browser sign-in needs a browser on the same machine, so over SSH without one use a personal access token from StoreSEO under Settings, AI Toolkit, sent with the --header option. Rank 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 Codex](https://storeseo.com/agent/codex/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 Gemini CLI guides

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