# Run Your Shopify SEO from Gemini CLI

> Connect Gemini CLI to StoreSEO with one gemini mcp add command, sign in through Shopify, then audit products, fix meta and publish llms.txt from the terminal.

Gemini CLI is Google's command-line AI agent, and it can call external tools through the Model Context Protocol. Connected to StoreSEO, it reads your store's SEO scores, previews optimized meta and applies the changes you approve from the terminal you already work in.

- One command: gemini mcp add
- OAuth discovered automatically, no client ID to paste
- Per-server tool filters and confirmations built in

## How do I connect Gemini CLI to StoreSEO?

### 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
```

**Sign-in:** Gemini CLI finds the StoreSEO sign-in on its own: the first time it calls the server it opens your browser, you pick your Shopify store and approve, and it stores the tokens. On a machine with no browser, add a personal access token from StoreSEO under Settings, AI Toolkit as a header.

Verify with: "Use StoreSEO to show me my store's SEO score breakdown."

Full setup guide: https://storeseo.com/docs/connect-storeseo-to-gemini-cli

### Example session (illustrative)

**You:** Find my three lowest-scoring products and show me better meta for each.
→ `storeseo_start` (read-only)
→ `storeseo_list_resources` (read-only)
→ `storeseo_preview_resource_optimization` (preview)
**Agent:** StoreSEO drafted new meta, tags and FAQs for all three. Previews used AI credit and nothing is saved yet. The new URL handles change, so old links will redirect. Apply the meta and FAQs and keep the current handles?
**You:** Yes, apply those and keep the handles.
→ `storeseo_apply_resource_optimization` (needs approval)
**Agent:** Applied without the handle changes. All three re-scored. Want me to look at the images on those products next?

## What is Gemini CLI?

Gemini CLI is Google's open-source command-line AI agent. You run it in a terminal, it reads the folder you start it in, and it works through tasks by calling built-in tools and tools from MCP servers.

MCP servers live under mcpServers in settings.json, either ~/.gemini/settings.json for every project or .gemini/settings.json for one. You can add one with gemini mcp add, choosing the stdio, sse or http transport and a user or project scope. For remote servers that need a sign-in, Gemini CLI detects the 401 response, discovers the OAuth endpoints, registers itself when the server allows it and opens your browser.

Each server can set trust, which skips tool confirmations and is off by default, and includeTools or excludeTools lists to control exactly which of its tools the model sees. MCP tools appear to the model as mcp_<server>_<tool>.

## Why use Gemini CLI with StoreSEO?

- **Sign-in with nothing to paste.** Gemini CLI discovers StoreSEO's OAuth endpoints and registers itself, so there is no client ID or secret to copy. You approve your store once in the browser.
- **Trim the tool list per server.** Use excludeTools or includeTools to hide StoreSEO tools you never use, so the model sees a shorter list and has fewer ways to pick the wrong one.
- **Confirmations by default.** Gemini CLI asks before running an MCP tool unless you trust the server, so a StoreSEO write has to get past Gemini CLI's prompt as well as StoreSEO's own confirmation.

## Good to know

- Google's site says Gemini CLI was replaced by Antigravity CLI on June 18th, 2026 for unpaid tier and Google One users. If that is you, check which command-line agent your account can still use before you set this up.
- gemini mcp add defaults to project scope, so a server added without --scope user is only available in that project.
- Do not set --trust or trust: true on the storeseo server. Trust skips every tool confirmation, and then the confirmation StoreSEO asks for in chat is the only check.
- The browser sign-in needs a browser on the same machine. In a headless session or over SSH without a browser, use the access token header instead.

## What can you ask Gemini CLI to do in StoreSEO?

- Use StoreSEO to list every product scoring under 50 and preview new meta for the first five.
- Which product images have no alt text? Show me the ten heaviest first.
- Is my llms.txt up to date? If not, tell me what generating a new one will change before you run it.
- Show me Search Console queries from the last 28 days where we rank between 8 and 20.
- Which schema types are enabled for my store, and what would turning on Product schema add?

## Gemini CLI guides by job

- [Audit your store's SEO with Gemini CLI](https://storeseo.com/agent/gemini-cli/seo-audit): Find the products, collections, pages and posts with the lowest SEO scores and see exactly what each one is missing.
- [Optimize meta tags and content with Gemini CLI](https://storeseo.com/agent/gemini-cli/optimize-meta): Preview and apply new meta titles, descriptions, URL handles, tags, FAQs and AI snippets, and set what StoreSEO optimizes automatically for newly synced products, collections and articles.
- [Optimize images and alt text with Gemini CLI](https://storeseo.com/agent/gemini-cli/image-seo): Compress heavy images, write alt text and give image files descriptive names, one image at a time, with a restore for each change.
- [Get products ready for AI search with Gemini CLI](https://storeseo.com/agent/gemini-cli/ai-search-readiness): Raise a product's GEO score so AI shopping agents and answer engines can understand it: FAQs, AI snippet, product schema and an agent-ready description.
- [Publish llms.txt and agents.md with Gemini CLI](https://storeseo.com/agent/gemini-cli/llms-txt-agents-md): Generate the llms.txt file answer engines read and the agents.md file AI shopping agents read, check what is live, roll back or delete llms.txt versions, and reset agents.md to Shopify's default.
- [Set up structured data with Gemini CLI](https://storeseo.com/agent/gemini-cli/structured-data): Check which JSON-LD schema types are on, configure organization, local business, product and review schema, and switch types on or off.
- [Manage sitemaps and indexing with Gemini CLI](https://storeseo.com/agent/gemini-cli/sitemaps): Exclude pages from the sitemap, set noindex or nofollow on a resource, and set up an HTML sitemap page for shoppers and crawlers, including which menu links to it.
- [Track keyword rankings with Gemini CLI](https://storeseo.com/agent/gemini-cli/keyword-tracking): Track where your store ranks on Google by country and language, add or remove keywords and up to five competitors, read each keyword's rank history, and build keyword clusters for products.
- [Read Search Console and Analytics with Gemini CLI](https://storeseo.com/agent/gemini-cli/google-reports): Ask about clicks, impressions, queries, pages and traffic sources from Google Search Console and GA4 without opening either.
- [Write SEO blog post drafts with Gemini CLI](https://storeseo.com/agent/gemini-cli/blog-posts): Have StoreSEO write a complete SEO blog post and save it as a draft in your Shopify blog, ready for you to review and publish.

## Which way should you connect?

StoreSEO exposes the same MCP server to every client. What differs is how the client proves who you are, plus one assistant that lives inside Shopify itself.

| Way in | Best for | Sign-in | What you get |
|---|---|---|---|
| MCP server with OAuth | Claude, ChatGPT and any client that supports remote MCP sign-in | Pick your store in Shopify and approve once | All 44 tools, scoped to the store you approved |
| MCP server with an access token | Terminal agents and editors, or any client without OAuth | Generate a named token in Settings, AI Toolkit and send it as a Bearer header | The same 44 tools; revoke the token in the app to cut access |
| Shopify Sidekick | Merchants who stay inside Shopify admin | Nothing to add: StoreSEO is installed in your store | SEO answers and deep links to the fix page, not the MCP tools |

## Frequently asked questions

### How do I connect Gemini CLI to StoreSEO?

Run gemini mcp add --scope user --transport http storeseo https://mcp.storeseo.com/mcp, then start gemini. The first call to StoreSEO opens your browser, where you pick your Shopify store and approve access. You can also type /mcp auth storeseo to start the sign-in yourself.

### Do I need a StoreSEO API key for Gemini CLI?

No. Gemini CLI signs in with OAuth and stores the tokens it receives. A personal access token from StoreSEO under Settings, AI Toolkit is the alternative for machines without a browser, added with the --header option.

### Where does Gemini CLI store the StoreSEO server?

With --scope user it is written to ~/.gemini/settings.json and is available in every project. Without that option it is written to the .gemini/settings.json file of the current project only.

### Will Gemini CLI change my store without asking?

StoreSEO tells the agent to preview first and wait for your yes before it applies content, optimizes images, publishes a file or deletes anything, and that yes is an instruction the agent follows, not a lock on the server. Gemini CLI also asks for confirmation before an MCP tool runs unless you mark the server as trusted, and that setting is the hard stop. Reads such as scores and reports run straight away.

### Which StoreSEO plan does Gemini CLI need?

Any active StoreSEO plan, including the free plan, can use the MCP server. Rank tracking is a Pro feature, Google reports need a paid plan with Google connected, and generated content spends AI Content Optimizer credit. See the pricing table for current plans.

### Can I hide some StoreSEO tools from Gemini CLI?

Yes. Add --exclude-tools to the gemini mcp add command, or an excludeTools list to the storeseo entry in settings.json, with the names of the tools you do not want the model to see. An includeTools list does the opposite and allows only the tools you name.

### How do I disconnect Gemini CLI from my store?

Run gemini mcp remove storeseo, adding --scope user if you added it with that scope. Then revoke the connection or the access token in StoreSEO under Settings, AI Toolkit, where every connected app is listed.

## Also works with

- [Claude](https://storeseo.com/agent/claude): Anthropic's chat assistant on the web and desktop. Add StoreSEO as a custom connector, no terminal needed.
- [ChatGPT](https://storeseo.com/agent/chatgpt): OpenAI's chat assistant. A developer-mode app with the StoreSEO MCP URL and OAuth sign-in.
- [Claude Code](https://storeseo.com/agent/claude-code): Anthropic's terminal agent. One claude mcp add command, then your store's SEO in the same session as your theme code.
- [Claude Cowork](https://storeseo.com/agent/claude-cowork): Anthropic's agent for delegated work. Add the StoreSEO connector, hand off an SEO job and review the results.
- [Cursor](https://storeseo.com/agent/cursor): The AI code editor. One mcp.json entry, and four tools switched off because Cursor stops at about 40.
- [Codex](https://storeseo.com/agent/codex): OpenAI's coding agent. One codex mcp add command, one codex mcp login, and the same setup in the app and the IDE.
- [GitHub Copilot](https://storeseo.com/agent/github-copilot): Copilot agent mode in VS Code. One .vscode/mcp.json entry puts your store's SEO beside your theme code.
- [Windsurf](https://storeseo.com/agent/windsurf): The Cognition AI editor. A serverUrl entry in mcp_config.json, and all 44 tools fit under Cascade's 100-tool cap.
- [Grok](https://storeseo.com/agent/grok): xAI's chat assistant. Add StoreSEO as a custom connector on grok.com and ask about your store's SEO.
- [ChatGPT dots](https://storeseo.com/agent/chatgpt-dots): OpenAI's always-on agents in ChatGPT. They share the StoreSEO plugin you add in developer mode and can run report-only checks on a schedule.
- [Grok Bot](https://storeseo.com/agent/grok-bot): xAI's named Bots on a cloud computer. Add the StoreSEO MCP URL as a plugin and let a Bot run report-only SEO routines.
- [Muse](https://storeseo.com/agent/muse): Meta's personal AI agent. Send one message with the StoreSEO link, approve the sign-in, then run your store's SEO from chat.
- [Manus](https://storeseo.com/agent/manus): A general AI agent that finishes multi-step tasks. Add StoreSEO as a custom MCP server and name it in a task.
- [OpenClaw](https://storeseo.com/agent/openclaw): The self-hosted agent runtime with chat apps and automations. Two commands to connect, then SEO reports on a timer.
- [Hermes Agent](https://storeseo.com/agent/hermes-agent): Nous Research's agent with memory and a built-in scheduler. An mcp_servers entry in config.yaml and one login.
- [Paperclip](https://storeseo.com/agent/paperclip): Self-hosted orchestrator for agent teams. Add StoreSEO to the agent Paperclip runs, then hand it SEO work as tasks and routines.
- [NanoClaw](https://storeseo.com/agent/nanoclaw): A small self-hosted assistant you own. Add StoreSEO to its agent and ask about your store from the chat app you already use.
- [OpenCode](https://storeseo.com/agent/opencode): The open-source terminal coding agent. One remote MCP entry, then opencode mcp auth storeseo.
- [Zed](https://storeseo.com/agent/zed): The Zed editor's Agent Panel. One context_servers entry in settings.json and a browser sign-in.
- [Kiro](https://storeseo.com/agent/kiro): AWS's agentic IDE. One url entry in .kiro/settings/mcp.json, workspace or user level, and a browser sign-in.
- [Antigravity](https://storeseo.com/agent/antigravity): Google's agentic IDE. One serverUrl entry in mcp_config.json, then a browser sign-in with an authorization code.
- [Kimi Code](https://storeseo.com/agent/kimi): Moonshot AI's terminal agent. Add one MCP server, sign in once, and run your store's SEO next to your theme code.

## Related

- [Connect StoreSEO MCP to your AI assistant](https://storeseo.com/docs/connect-storeseo-mcp-to-your-ai-assistant)
- [StoreSEO AI Toolkit setup](https://storeseo.com/docs/ai-toolkit-ai-agent-friendly-solution)
- [AI agents and MCP playbook](https://storeseo.com/use-cases/ai-agents)
- [StoreSEO with Claude Code](https://storeseo.com/agent/claude-code)

Setup checked against:

- [Gemini CLI: MCP servers](https://geminicli.com/docs/tools/mcp-server/)

---

Canonical: https://storeseo.com/agent/gemini-cli
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
