# Run Your Shopify SEO from OpenCode

> Connect OpenCode to StoreSEO with one remote MCP entry and opencode mcp auth, then audit products, fix meta and publish llms.txt from your terminal.

OpenCode is an open-source AI coding agent that runs in your terminal and can use remote MCP servers alongside its built-in tools. Connected to StoreSEO, it reads your store's SEO scores, previews optimized content and applies the changes you approve from the session you already have open.

- One command to add, one command to sign in
- OAuth by default, with no client ID to paste
- Hide any StoreSEO tool with a permission rule

## How do I connect OpenCode to StoreSEO?

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

**Sign-in:** OpenCode signs in with OAuth by default: run opencode mcp auth storeseo, pick your Shopify store in the browser and approve. If you prefer a token, generate one in StoreSEO under Settings, AI Toolkit, set oauth to false and send it 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-opencode

### Example session (illustrative)

**You:** Is my agents.md file live? If it is only Shopify's default, tell me what a custom one would do.
→ `storeseo_start` (read-only)
→ `storeseo_get_agents_md_status` (read-only)
**Agent:** Only Shopify's default is live. A generated agents.md is written from your brand, top products and contact details, publishes to your live theme straight away and uses AI credit. Generate it?
**You:** Yes, generate it.
→ `storeseo_generate_agents_md` (needs approval)
**Agent:** It is live at your /agents.md address and I can show you the text. If you dislike it, I can reset to Shopify's default.

## What is OpenCode?

OpenCode is an open-source AI coding agent built by the team behind SST, now Anomaly. It runs in your terminal, and also as a desktop and IDE app, and works through tasks by calling its built-in tools and tools from MCP servers.

It supports local servers started by a command and remote servers reached over streamable HTTP. A remote server is a type, a url and optional headers under mcp.servers in the OpenCode config, and opencode mcp add writes that entry for you. OAuth is on by default: OpenCode discovers the authorization server, uses PKCE, registers itself when the server allows it, refreshes tokens and keeps the credentials out of your project files.

Tool names reach the model as server_tool, and permission rules can match them with a pattern such as storeseo_* to hide or deny tools without disconnecting the server.

## Why use OpenCode with StoreSEO?

- **Open source, no lock-in.** OpenCode works with the model provider you choose, so StoreSEO's tools are available whichever model you run your terminal sessions on.
- **Sign-in handled for you.** OpenCode discovers StoreSEO's authorization server and registers itself, so there is no client ID or secret to copy. You approve your store once in the browser.
- **Deny what you never use.** A permission rule that matches a StoreSEO tool name hides or denies it, which is a client-side stop on top of the confirmation StoreSEO asks for in chat.

## Good to know

- OpenCode V2 expects servers under mcp.servers. Older versions put the server directly under mcp, so check the layout your installed version documents before you edit the file.
- opencode mcp add writes to the project configuration unless you pass --global, so a server added without it only exists in that project.
- There is no remove command for MCP servers. To remove StoreSEO, delete its entry from the config, and run opencode mcp logout storeseo to clear the stored sign-in.
- The OpenCode docs describe deny rules for MCP tools but no ask-first mode, so StoreSEO's own confirmation in the chat is the main check on writes. Deny the write tools by name if you want a client-side stop.

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

- Use StoreSEO to list every product scoring under 50 and preview new meta for the first ten.
- Which product images have no alt text? Show me the ten heaviest first.
- Is my agents.md live? If it is only Shopify's default, tell me what a custom one would publish.
- 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?

## OpenCode guides by job

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

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

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

No. Remote servers use OAuth by default and OpenCode keeps the credentials. A personal access token from StoreSEO under Settings, AI Toolkit is the alternative: set oauth to false for the server and send the token in an Authorization header.

### Where does OpenCode store the StoreSEO server?

In the OpenCode configuration, under mcp.servers in V2. opencode mcp add writes it to the current project, and the --global option writes it so every project sees it.

### Will OpenCode 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. OpenCode's own permission rules can deny StoreSEO tools by name, which is the hard stop if you want one. Reads such as scores and reports run straight away.

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

### The sign-in did not start. What now?

Run opencode mcp list. If it shows needs authentication, run opencode mcp auth storeseo or open OpenCode, type /mcps, select storeseo and sign in. If a browser is not available, use the access token option instead.

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

Delete the storeseo entry from the OpenCode configuration and run opencode mcp logout storeseo to remove the stored sign-in. 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.
- [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.
- [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:

- [OpenCode: MCP servers](https://opencode.ai/v2/docs/mcp-servers)
- [OpenCode: MCP servers (earlier docs)](https://opencode.ai/docs/mcp-servers/)

---

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