# Optimize meta tags and content with OpenCode

> Run StoreSEO meta previews from the OpenCode terminal, review the generated title, description and FAQs, and apply the parts you approve.

Optimizing meta tags and on-page content with OpenCode means asking the terminal agent to have StoreSEO generate a meta title, description, tags, URL handle, FAQs and AI snippet for one Shopify resource, then applying the draft you approve from the prompt.

## How do you set up OpenCode for this?

### 1. Add StoreSEO to OpenCode

Run this from the project that should use StoreSEO, or add --global to make it available in every project. OpenCode writes a remote server entry to its configuration; the equivalent hand-written entry is shown in the next step.

```bash
opencode mcp add storeseo --url https://mcp.storeseo.com/mcp
```

### 2. Sign in to your store

Remote servers use OAuth by default. Run the auth command, then pick your Shopify store in the browser and approve access. Inside OpenCode, /mcps does the same: select storeseo and sign in. opencode mcp list should then show it as connected.

```bash
opencode mcp auth storeseo
opencode mcp list
```

### 3. Or write it in the config (optional)

In OpenCode V2 servers go under mcp.servers. Older versions put the server directly under mcp, so use the layout your version documents.

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "storeseo": {
        "type": "remote",
        "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, and turn OAuth off for this server so OpenCode sends the header instead.

```json
{
  "mcp": {
    "servers": {
      "storeseo": {
        "type": "remote",
        "url": "https://mcp.storeseo.com/mcp",
        "oauth": false,
        "headers": {
          "Authorization": "Bearer {env:STORESEO_TOKEN}"
        }
      }
    }
  }
}
```

Then ask: "Use StoreSEO to preview new meta for my five lowest-scoring products. Show each draft and the score change, and do not apply anything."

## How does this work in OpenCode?

You start OpenCode in your theme project, check that opencode mcp list shows storeseo as connected, and type a request such as preview new meta for my lowest-scoring product and wait for me. The model sees the tools as storeseo_ plus the tool name and calls storeseo_start, then storeseo_get_resource_seo, then storeseo_preview_resource_optimization. StoreSEO writes the draft on its own side and projects the new SEO score, plus the GEO score for products, without saving anything. The preview spends AI Content Optimizer credit even if you never apply it.

The draft is printed in the terminal, which makes it easy to keep. Ask OpenCode to paste the title and description into a notes file in the project, or to compare the proposed URL handle with the product's current one before you decide. When the handle changes, you should see the old and new URL first, because applying creates a redirect. Say apply everything except the handle, and OpenCode calls storeseo_apply_resource_optimization with the skipped fields listed. The result returns the recomputed score and checklist, which OpenCode summarizes as what is fixed and what still needs you.

OpenCode's permission rules can match tool names with a pattern such as storeseo_*. The docs describe deny rules but no ask-first mode, so StoreSEO's own request for your yes in the chat is the main check on writes. If you want a client-side stop, deny storeseo_apply_resource_optimization and storeseo_update_ai_optimization_settings by name while you review drafts, and remove the rule when you are ready to apply.

### Example session (illustrative)

**You:** Preview new meta for my lowest-scoring product and wait for me.
→ `storeseo_start` (read-only)
→ `storeseo_get_resource_seo` (read-only)
→ `storeseo_preview_resource_optimization` (preview)
**Agent:** Here is the draft for Linen Throw Blanket: new meta title and description, three tags and a shorter handle, which would create a redirect from the old URL. Projected score 31 to 78. Apply it all?
**You:** Apply all except the handle.
→ `storeseo_apply_resource_optimization` (needs approval)

## 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 OpenCode 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 OpenCode:** OpenCode V2 expects servers under mcp.servers while older versions put the entry directly under mcp, so a config copied from a tutorial may leave storeseo missing and the model with no preview tool at all. Because the documented permission rules are deny rules and not an ask-first mode, a deny pattern on storeseo_* also blocks the read and preview tools, so deny only the apply and settings tools by name if you want drafts but no writes.

## What can you ask OpenCode to do?

- Use StoreSEO to preview new meta for my five lowest-scoring products. Show each draft and the score change, and do not apply anything.
- Preview a meta title, description and FAQ for the page About Us, keep the handle, and save the draft text to meta-draft.md.
- Apply the previewed meta but skip the tags and the URL handle.
- 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 I stop OpenCode from applying a draft while I review it?

Yes. Add a permission rule that denies storeseo_apply_resource_optimization by name. Previews and reads still run, and you remove the rule when you are ready to apply. A broad pattern that matches every StoreSEO tool would block the preview tool too.

### Does OpenCode need the StoreSEO tools added in every project?

Only if you added the server without the global flag. opencode mcp add writes to the project configuration by default, so run it with the global flag to make StoreSEO available in every project.

### 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 Code](https://storeseo.com/agent/claude-code/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 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 OpenCode guides

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