Optimize meta tags and content with Codex
Optimizing meta tags and on-page content with Codex means asking OpenAI's coding agent, in the CLI, the IDE extension or the desktop app, to have StoreSEO preview generated meta for a product and to apply only the parts you approve.
Last updated: October 2026
Set up Codex for StoreSEO
Skip this if Codex is already connected. The full guide, with the alternatives, is on the Codex page.
- 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.
Terminalcodex 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.
Terminalcodex mcp login storeseo codex mcp list
How does this work in Codex?
You run Codex in the repository you work from, with the storeseo server in config.toml and signed in through codex mcp login. A request like preview better meta for the product with handle trail-socks leads Codex to call storeseo_start, then storeseo_get_resource_seo, then storeseo_preview_resource_optimization. The CLI prints each tool call as it happens. StoreSEO writes the meta title, description, tags, FAQs, AI snippet and any new handle on its servers and returns a draft with a projected score, so Codex reads that draft back to you rather than composing text of its own.
Codex has per-server approval settings, and they decide when you see a prompt. With default_tools_approval_mode set to writes, any tool that is not marked read-only prompts, which includes the preview tool and the apply tool. That gives you two checkpoints: the prompt on the preview, where you accept the AI Content Optimizer credit cost, and the prompt on the apply, where you accept the change to the live product. Between them sits the agent's own question, which you answer in the session, and you should say which fields to skip, such as the handle if you do not want a redirect.
Generation can take a while. Codex waits 60 seconds for a tool to finish by default, and a preview that writes several fields can approach that, so if a preview times out, raise tool_timeout_sec for the storeseo server and run it again. Be aware that a timed-out preview may still have spent credit, so check the draft and the credit use before you retry. A re-preview spends credit again.
-
You: Preview better meta for the trail-socks product. Spending credit on the preview is fine.
- storeseo_start read-only
- storeseo_get_resource_seo read-only
- storeseo_preview_resource_optimization preview
-
Codex: The draft lifts the score from 31 to 68 with new meta, tags and two FAQs. The handle would change from /socks-1 to /merino-trail-socks, with a redirect from the old URL. Apply everything?
-
You: Apply the meta and tags, skip the FAQs.
- storeseo_apply_resource_optimization needs approval
-
Codex: Applied the meta, tags and handle. The score is now 64. The FAQs remain in the draft for about an hour.
What to ask Codex
Use StoreSEO to preview optimized meta for the product with handle trail-socks. Show me the draft and score change, and wait for my yes before applying.
Preview a new meta title, description and FAQ for my Summer Dresses collection and keep the current URL handle. Tell me the credit cost first.
Apply the meta from that preview but skip the FAQ, then show me the new score and what is still failing.
- Optimize the meta title and description for my five lowest-scoring products. Show me the previews before you apply anything.
- Preview a new meta title, description and FAQ for the collection Summer Dresses, and keep the current URL handle.
- Apply the meta from that preview but skip the FAQ.
- Which of my pages have no meta description? Draft one for each and wait for my approval.
- What does StoreSEO optimize automatically for new products right now?
- Turn on automatic meta and alt text for new products only. Tell me what that will spend first.
What StoreSEO does: meta tags and on-page content
StoreSEO generates the content server-side: meta title and description, tags, a keyword-led URL handle, FAQs and an AI snippet. The agent shows you the draft and the projected score change before anything is saved, then applies all of it or only the parts you approve.
Requires: Generating a preview spends AI Content Optimizer credit; applying a preview is free.
- 1
Read the current state
The agent reads the resource's SEO record so it knows which fields exist, which fail and what the preview will add.
- 2
Generate a preview
StoreSEO writes the meta title, description, tags, URL handle, FAQs and AI snippet and projects the new SEO score, plus the GEO score for products. Nothing is saved yet. Preview spends credit whether or not you apply it.
- 3
Show you the draft
The agent presents the generated text and the score change. When the handle changes it shows the old and new URL and tells you a redirect will be created.
- 4
Apply what you approve
After your yes it applies everything, or only the parts you chose, for example the meta but not the FAQs. Skipped fields stay available from the same draft for an hour.
- 5
Report the new score
The apply call returns the recomputed score and the remaining checklist, so the agent tells you what changed and offers the next most useful fix.
Meta tags and on-page content reference
| Generated fields | Meta title, meta description, tags, URL handle, FAQs, AI snippet |
|---|---|
| Resource types | Products, collections, pages and articles (collections have no meta tags or tags axis in auto settings) |
| Who writes the copy | StoreSEO, server-side. The agent never authors meta, FAQs or handles itself |
| Cost | Preview spends AI Content Optimizer credit; apply is free; a new preview spends again |
| Draft lifetime | One hour after the preview |
| URL handle | Applying a new handle changes the live URL and creates a redirect from the old one; a handle already in use is dropped automatically |
| Partial apply | Apply a subset of axes, or skip individual fields such as the handle |
| Auto optimization | Optional settings that generate content for newly synced resources; only future syncs, nothing is backfilled |
| Auto settings plan | Configurable on any plan; switching an auto toggle on needs a paid plan and no active trial |
Rules Codex follows
- The agent previews first and applies only after you confirm the previewed content.
- When a handle changes, you see the old URL and the new URL before the apply call, because applying creates a redirect.
- A request like optimize my worst five products authorizes the previews; the agent should remind you that previews spend credit even if you do not apply them.
- Turning on auto optimization spends credit on every future sync, so the agent proposes the exact sections and waits for your yes.
- Product title, focus keyword and description body are not written by this job; the description has its own tool in the AI search job.
In Codex
Set the server's default_tools_approval_mode to writes or prompt. If you set it to approve, Codex runs the preview and apply tools without prompting and the confirmation StoreSEO asks for in the conversation is the only check left, which is an instruction the agent follows and not a lock. Preview generation can also exceed Codex's default 60 second tool wait, so raise tool_timeout_sec for storeseo if a preview times out, and check your credit use before you re-run it, because a second preview spends credit again.
What runs without asking. Reads such as SEO scores, store listings, settings and Google reports run straight away. Generating a preview spends AI credit but writes nothing, and StoreSEO tells the agent to say what a generation will cost before it runs one. Applying content, optimizing images, changing settings, publishing llms.txt or agents.md, writing a product description and deleting anything wait for your yes in the conversation. That yes is an instruction the agent follows, not a lock on the server, so your client's own tool-approval setting is the hard stop.
Questions
Why did my Codex meta preview time out?
Codex waits 60 seconds for a tool to finish by default and generating several fields can take longer. Raise tool_timeout_sec for the storeseo server in config.toml. Check your credit use before retrying, since a second preview spends AI Content Optimizer credit again.
Which Codex approval mode works best for meta optimization?
The writes mode is a good fit, because it prompts for every tool that is not marked read-only, including the preview and the apply, while reads such as storeseo_get_resource_seo run without interruption. Avoid the approve mode for this server.
Does previewing an optimization change my product?
No. A preview generates the content and projects the score without saving anything. It does spend AI Content Optimizer credit, and applying the draft afterwards is free.
What happens to the old URL when the handle changes?
Applying a new URL handle updates the live URL and StoreSEO creates a redirect from the old one, so existing links keep working. The agent should show you both URLs before it applies the change.
Can I apply only part of a preview?
Yes. The apply step takes the axes you approved, and individual content fields such as the URL handle can be skipped. Skipped parts stay available from the same draft for one hour.
Does auto optimization fix my existing products?
No. Auto optimization only acts on resources synced or updated after you turn it on. Existing products are fixed with the preview and apply steps in this job.
Will StoreSEO change my product title?
No. This job writes the SEO meta title, not the storefront product title. The product title is edited in Shopify admin.
Keep going
Meta tags and on-page content with other agents
More Codex guides