# Optimize meta tags and content with Claude Code

> Run StoreSEO meta optimization from the Claude Code terminal: preview the generated title, description, FAQs and handle, check the score, then apply.

Optimizing meta tags and on-page content with Claude Code means working from your terminal or editor, asking it to have StoreSEO preview generated meta for the products you pick, reading the draft in the session, and applying only the pieces you approve.

## How do you set up Claude Code for this?

### 1. Add StoreSEO to Claude Code

Run this in any terminal. The user scope makes StoreSEO available in every project on your machine.

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

### 2. Sign in to your store

Start Claude Code, run /mcp, choose storeseo and follow the browser window: pick your Shopify store and approve access.

```text
/mcp
```

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

If you cannot use a browser sign-in, generate a token in StoreSEO under Settings, AI Toolkit and add the server with the token as a header instead.

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

Then ask: "Use StoreSEO to preview optimized meta for the three lowest-scoring products, one at a time. Tell me how many previews that is before you start and wait for my yes between products."

## How does this work in Claude Code?

You are in the terminal, often inside the Shopify theme repository, with the storeseo server added at user scope. You type a request such as optimize the meta for the three lowest-scoring products and show me the previews first. Claude Code calls storeseo_start, then storeseo_get_resource_seo for each product, and then storeseo_preview_resource_optimization one product at a time. Each call is printed in the session as it runs, so you see the tool name and, if you have not allowed it, a permission prompt before it executes.

StoreSEO generates the meta title, description, tags, handle, FAQs and AI snippet on its own servers, so Claude Code does not author any of it. What it adds is the working context around the draft. Because it can read the theme, it can check whether the product template already renders FAQs or whether a Liquid snippet hard-codes a title tag that would override the meta you are about to apply, and tell you before you spend the credit. When a handle would change it prints the old and new URL, and since you are in a repository you can ask it to grep the theme and content for hard-coded links to the old path.

After your yes it calls storeseo_apply_resource_optimization with the parts you chose, and the response gives the recomputed score. For a batch you can have Claude Code write a short table to a file in the working folder: product, score before, projected score, what you applied, what you skipped. Remember that every preview spends AI Content Optimizer credit even if you never apply it, so ask it to state the number of previews it is about to run before it starts the loop.

### Example session (illustrative)

**You:** Preview better meta for the product with handle trail-socks. I accept the credit for the preview.
→ `storeseo_start` (read-only)
→ `storeseo_get_resource_seo` (read-only)
→ `storeseo_preview_resource_optimization` (preview)
**Agent:** The draft lifts the score from 29 to 66. The handle would change from /trail-socks to /merino-trail-socks, and grep finds no hard-coded links to the old path in this theme. Apply everything?
**You:** Yes, apply everything.
→ `storeseo_apply_resource_optimization` (needs approval)
**Agent:** Applied. The score is now 63, and the redirect from the old URL was created. I added the result to meta-changes.md.

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

Tools: `storeseo_get_resource_seo`, `storeseo_preview_resource_optimization`, `storeseo_apply_resource_optimization`, `storeseo_get_ai_optimization_settings`, `storeseo_update_ai_optimization_settings`

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

| Setting or limit | What applies |
|---|---|
| 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 Claude Code 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 Claude Code:** Claude Code runs a tool without asking only if you have allowed it, and the allow rule matches by tool name, so allowing the preview and apply tools to cut down on prompts removes the editor-side stop for writes. Keep storeseo_apply_resource_optimization and storeseo_update_ai_optimization_settings on ask, because the confirmation StoreSEO asks for in the chat is an instruction to the agent, not a lock on the server. If you run a loop over many products, the previews can also pile up credit quickly, so cap the batch in the prompt.

## What can you ask Claude Code to do?

- Use StoreSEO to preview optimized meta for the three lowest-scoring products, one at a time. Tell me how many previews that is before you start and wait for my yes between products.
- Preview meta, FAQs and an AI snippet for the product with handle merino-beanie. If the URL handle changes, grep this theme for links to the old path before I decide.
- Apply the meta title and description from the last preview, skip the handle, and write a before and after score table to meta-changes.md.
- 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.

## Frequently asked questions

### Can Claude Code optimize meta for many products in one run?

It can run previews one product after another, but each preview spends AI Content Optimizer credit and each draft expires after an hour. Ask for a small batch, review each draft, and apply before moving on rather than previewing the whole catalog first.

### Does Claude Code edit my theme files when it applies meta?

No. The apply tool writes the SEO fields to your Shopify store through StoreSEO. Claude Code only edits theme files if you separately ask it to, for example to remove a hard-coded title tag.

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

## Meta tags and on-page content with other agents

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

## More Claude Code guides

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

## Related documentation

- [Add a meta description to Shopify products](https://storeseo.com/docs/add-meta-description-to-shopify-products)
- [How to use the AI Content Optimizer](https://storeseo.com/docs/how-to-use-storeseo-ai-content-optimizer)
- [How to enable auto AI optimization](https://storeseo.com/docs/how-to-enable-auto-ai-optimization)
- [AI Content Optimizer credits](https://storeseo.com/docs/credits-ai-content-optimizer)

---

Canonical: https://storeseo.com/agent/claude-code/optimize-meta
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
