# Run Your Shopify SEO from Codex

> Connect OpenAI Codex to StoreSEO with codex mcp add and codex mcp login, then audit products, fix meta and alt text and publish llms.txt from your terminal.

Codex is OpenAI's coding agent, which runs in your terminal, in an IDE extension and in the ChatGPT desktop app. Connected to StoreSEO, it reads your store's SEO scores, previews optimized content and applies what you approve from the session where you already work on your theme.

- codex mcp add, then codex mcp login
- One config.toml shared by the CLI, the IDE and the desktop app
- Per-tool approval modes you can set from config.toml

## How do I connect Codex to StoreSEO?

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

**Sign-in:** Codex signs in with OAuth: run codex mcp login storeseo, pick your Shopify store in the browser and approve. If you prefer a token, generate one in StoreSEO under Settings, AI Toolkit and let config.toml read it from an environment variable.

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

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

### Example session (illustrative)

**You:** Is my llms.txt live and up to date? If it needs a rebuild, tell me what that does first.
→ `storeseo_start` (read-only)
→ `storeseo_get_llms_txt_status` (read-only)
**Agent:** Your settings changed since the last generation, so a rebuild is due. Generating writes llms.txt into your live theme and Shopify Files and spends AI credit. Run it?
**You:** Yes, run it.
→ `storeseo_generate_llms_txt` (needs approval)
→ `storeseo_get_llms_txt_status` (read-only)
**Agent:** The new version is generated and live at your /llms.txt address. Want me to check agents.md next?

## What is Codex?

Codex is OpenAI's coding agent. It runs as a command-line tool, as an IDE extension and inside the ChatGPT desktop app, reads the repository you start it in and works through multi-step tasks by calling tools.

It stores MCP servers in config.toml, by default ~/.codex/config.toml, with one [mcp_servers.name] table per server, and the CLI, the IDE extension and the desktop app share that file. A remote server needs a url, and Codex supports OAuth with dynamic client registration, which you start with codex mcp login, or a bearer token read from an environment variable.

Each server can carry its own approval settings: a default mode of auto, prompt, writes or approve, tool allow and deny lists, and per-tool overrides. The writes mode prompts for any tool that is not marked read-only.

## Why use Codex with StoreSEO?

- **One setup, three places.** Add StoreSEO once and the terminal, the IDE extension and the ChatGPT desktop app all see it, because they read the same config.toml.
- **Approvals that match the tools.** StoreSEO marks its read tools read-only, so setting the server's approval mode to writes lets reads run and stops for every tool that can change your store.
- **SEO and theme in one task.** Ask Codex to audit the store and then fix the template that causes the problem, so the finding and the change sit in the same session.

## Good to know

- The Codex docs show codex mcp add for local commands, and the --url form appears in the OAuth section. If your version rejects it, use the config.toml table instead.
- A project-level .codex/config.toml only loads in trusted projects. Use ~/.codex/config.toml for StoreSEO in every project.
- Set the server's default_tools_approval_mode to writes or prompt, not approve. Approve skips the prompt, and then the confirmation StoreSEO asks for in chat is the only check.
- Codex waits 60 seconds for a tool to finish by default. Content generation can take longer, so raise tool_timeout_sec for the storeseo server if a generation times out.

## What can you ask Codex to do in StoreSEO?

- Use StoreSEO to list products scoring under 50 and preview better meta for the first five.
- Is my agents.md live? If it is the Shopify default, tell me what generating a custom one will publish.
- Which images have no alt text? List the ten heaviest first.
- Show me my Search Console queries for the last 28 days, grouped by page.
- Check which schema types are enabled and tell me what Product schema would add.

## Codex guides by job

- [Audit your store's SEO with Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex](https://storeseo.com/agent/codex/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 Codex to StoreSEO?

Run codex mcp add storeseo --url https://mcp.storeseo.com/mcp, then codex mcp login storeseo. Your browser opens, you pick your Shopify store and approve access, and codex mcp list should show storeseo.

### Do I need a StoreSEO API key for Codex?

No. Codex signs in with OAuth and keeps the credentials. A personal access token from StoreSEO under Settings, AI Toolkit is the alternative: put it in an environment variable and set bearer_token_env_var in config.toml.

### Where does Codex store the StoreSEO server?

In ~/.codex/config.toml, as an mcp_servers.storeseo table. The Codex CLI, the IDE extension and the ChatGPT desktop app share that file. A project can also carry its own .codex/config.toml if the project is trusted.

### Will Codex 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. Codex's own approval mode for the server is the hard stop: set it to writes or prompt so tools that can change your store ask first. Reads run straight away.

### Which StoreSEO plan does Codex 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.

### Does the ChatGPT desktop app work too?

Yes. The desktop app shares Codex's MCP configuration. Add StoreSEO under Settings, MCP servers, choose Streamable HTTP, paste the URL and select Authenticate. If you already ran codex mcp add, it is already there.

### How do I disconnect Codex from my store?

Delete the mcp_servers.storeseo table from config.toml, or set enabled to false to keep it but switch it off. 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.
- [Gemini CLI](https://storeseo.com/agent/gemini-cli): Google's terminal agent. One gemini mcp add command, and the browser sign-in is found automatically.
- [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:

- [OpenAI Codex: Model Context Protocol](https://developers.openai.com/codex/mcp)

---

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