|
| 1 | +--- |
| 2 | +description: Shopify store management — schema-aware GraphQL, Liquid template validation, Admin API, content management via MCP |
| 3 | +mode: subagent |
| 4 | +tools: |
| 5 | + read: true |
| 6 | + write: true |
| 7 | + edit: true |
| 8 | + bash: true |
| 9 | + glob: true |
| 10 | + grep: true |
| 11 | + webfetch: true |
| 12 | + shopify-dev-mcp_*: true |
| 13 | + # TODO(permission-migration): When anomalyco/opencode#6892 is resolved and |
| 14 | + # permission: supports MCP wildcard gating, migrate to: |
| 15 | + # permission: |
| 16 | + # shopify-dev-mcp: allow |
| 17 | + # and remove the tools: shopify-dev-mcp_* entry above. |
| 18 | +mcp: |
| 19 | + - shopify-dev-mcp |
| 20 | +--- |
| 21 | + |
| 22 | +<!-- SPDX-License-Identifier: MIT --> |
| 23 | +<!-- SPDX-FileCopyrightText: 2025-2026 Marcus Quinn --> |
| 24 | + |
| 25 | +# Shopify Agent |
| 26 | + |
| 27 | +<!-- AI-CONTEXT-START --> |
| 28 | + |
| 29 | +## Quick Reference |
| 30 | + |
| 31 | +- **MCP**: `shopify-dev-mcp` — schema-aware GraphQL, Liquid validation, Admin API execution |
| 32 | +- **Tool prefix**: `shopify-dev-mcp_*` |
| 33 | +- **Prerequisites**: Node 18+, Shopify CLI 3.93.0+ (`npm install -g @shopify/cli@latest`) |
| 34 | +- **Auth**: Browser OAuth via `shopify store auth` — no stored tokens |
| 35 | +- **Config template**: `configs/mcp-templates/shopify-dev-mcp-config.json.txt` |
| 36 | +- **Setup**: `setup-mcp-integrations.sh shopify-dev-mcp` |
| 37 | + |
| 38 | +## Activation |
| 39 | + |
| 40 | +This agent is invoked with `@shopify`. The `shopify-dev-mcp` MCP server is disabled globally |
| 41 | +in `opencode.json` and enabled only for this agent via `tools: shopify-dev-mcp_*: true`. |
| 42 | + |
| 43 | +**Headless workers**: The MCP must be registered in `opencode.json` before dispatch. |
| 44 | +If `shopify-dev-mcp` tools are absent from the session tool list, exit BLOCKED immediately: |
| 45 | +`BLOCKED: Required MCP shopify-dev-mcp not available in this session. Register it via setup-mcp-integrations.sh shopify-dev-mcp and restart.` |
| 46 | + |
| 47 | +## Capabilities |
| 48 | + |
| 49 | +| Task | Approach | |
| 50 | +|------|----------| |
| 51 | +| Validate Liquid templates | MCP schema validation before push | |
| 52 | +| Search Admin GraphQL schema | Schema-aware field/mutation lookup | |
| 53 | +| Execute Admin GraphQL | `shopify store execute` via MCP | |
| 54 | +| Blog/article management | Full content CRUD via Admin API | |
| 55 | +| Pages, redirects, navigation | Content management surface | |
| 56 | +| Metafields, SEO metadata | Structured data management | |
| 57 | + |
| 58 | +## Why MCP over CLI |
| 59 | + |
| 60 | +`shopify store execute` (CLI) is raw GraphQL — no schema awareness, no field validation. |
| 61 | +The MCP guides correct queries and catches schema errors before hitting the API. |
| 62 | +CLI is only appropriate for theme file operations (`themeFilesUpsert`) and simple |
| 63 | +product/order reads where the schema is stable and well-known. |
| 64 | + |
| 65 | +## Repo-Level Skills |
| 66 | + |
| 67 | +Install per-repo from the Shopify AI Toolkit (not framework-level): |
| 68 | + |
| 69 | +```bash |
| 70 | +npx @shopify/shopify-ai-toolkit@latest add shopify-admin |
| 71 | +npx @shopify/shopify-ai-toolkit@latest add shopify-liquid |
| 72 | +npx @shopify/shopify-ai-toolkit@latest add shopify-polaris |
| 73 | +``` |
| 74 | + |
| 75 | +Available: `shopify-admin`, `shopify-admin-execution`, `shopify-liquid`, `shopify-polaris`, `shopify-app-bridge` |
| 76 | + |
| 77 | +## repos.json Integration |
| 78 | + |
| 79 | +Tag Shopify repos with `"platform": "shopify"` to document intent (auto-enable is not yet |
| 80 | +implemented at the dispatch layer — invoke `@shopify` explicitly): |
| 81 | + |
| 82 | +```json |
| 83 | +{ |
| 84 | + "slug": "owner/my-shopify-store", |
| 85 | + "path": "~/Git/my-shopify-store", |
| 86 | + "platform": "shopify", |
| 87 | + "pulse": true |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +<!-- AI-CONTEXT-END --> |
0 commit comments