Skip to content

Commit 6b305af

Browse files
committed
GH#18285: add shopify-dev-mcp agent, fix MCP audit gaps, add permission-migration TODOs
- New: .agents/services/ecommerce/shopify.md — @Shopify agent with shopify-dev-mcp_*: true - setup-mcp-integrations.sh: add shopify-dev-mcp to MCP_LIST, get_mcp_command, install dispatcher, _install_shopify_dev_mcp function - generate-opencode-agents.sh: add shopify, sentry, socket, context7, chrome-devtools, cloudflare-mcp, playwright cases - Fix shopify template: remove false 'auto-enabled' claim, document agent-invocation pattern - Add mcp: declarations to agent files missing them (claude-code, cloudflare-mcp, chrome-devtools, playwright, localwp, sentry, socket) - Add TODO(permission-migration) comments to all _*: true entries for future anomalyco/opencode#6892 migration
1 parent 99cf956 commit 6b305af

13 files changed

Lines changed: 179 additions & 3 deletions

File tree

‎.agents/scripts/generate-opencode-agents.sh‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,29 @@ generate_subagent_stub() {
170170
extra_tools=$' ios-simulator_*: true'
171171
fi
172172
;;
173+
shopify)
174+
extra_tools=$' shopify-dev-mcp_*: true'
175+
# TODO(permission-migration): Replace with permission: shopify-dev-mcp: allow
176+
# once anomalyco/opencode#6892 is resolved.
177+
;;
178+
sentry)
179+
extra_tools=$' sentry_*: true'
180+
;;
181+
socket)
182+
extra_tools=$' socket_*: true'
183+
;;
184+
context7 | context7-cli)
185+
extra_tools=$' context7_*: true'
186+
;;
187+
chrome-devtools)
188+
extra_tools=$' chrome-devtools_*: true'
189+
;;
190+
cloudflare-mcp)
191+
extra_tools=$' cloudflare-api_*: true'
192+
;;
193+
playwright)
194+
extra_tools=$' playwright_*: true'
195+
;;
173196
*) ;; # No extra tools for other agents
174197
esac
175198

‎.agents/scripts/setup-mcp-integrations.sh‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ get_mcp_command() {
4141
# serper - REMOVED: Uses curl subagent (.agents/seo/serper.md), no MCP needed
4242
"unstract") echo "docker:unstract/mcp-server" ;;
4343
"context7") echo "npx -y @upstash/context7-mcp@latest" ;;
44+
"shopify-dev-mcp") echo "npx -y @shopify/dev-mcp@latest" ;;
4445
*) echo "" ;;
4546
esac
4647
return 0
@@ -64,6 +65,7 @@ MCP_LIST=(
6465
"dataforseo"
6566
"unstract"
6667
"context7"
68+
"shopify-dev-mcp"
6769
)
6870

6971
is_known_mcp() {
@@ -390,6 +392,36 @@ _install_context7() {
390392
return 0
391393
}
392394

395+
_install_shopify_dev_mcp() {
396+
print_info "Setting up Shopify Dev MCP for schema-aware GraphQL, Liquid validation, and Admin API..."
397+
print_warning "Prerequisites: Node 18+, Shopify CLI 3.93.0+"
398+
print_info "Install Shopify CLI: npm install -g @shopify/cli@latest"
399+
print_info "Verify: shopify version"
400+
echo ""
401+
print_info "Auth: shopify store auth (browser-based OAuth, no stored tokens)"
402+
echo ""
403+
print_info "The MCP is registered as disabled globally in opencode.json."
404+
print_info "Enable it per-session by invoking the @shopify agent."
405+
echo ""
406+
print_info "OpenCode config (added to ~/.config/opencode/opencode.json):"
407+
print_info ' "shopify-dev-mcp": {'
408+
print_info ' "type": "local",'
409+
print_info ' "command": ["npx", "-y", "@shopify/dev-mcp@latest"],'
410+
print_info ' "enabled": false'
411+
print_info ' }'
412+
echo ""
413+
print_info "Global tools entry (added to opencode.json tools section):"
414+
print_info ' "shopify-dev-mcp_*": false'
415+
echo ""
416+
print_info "Per-repo skills (install at repo level, not framework level):"
417+
print_info " npx @shopify/shopify-ai-toolkit@latest add shopify-admin"
418+
print_info " npx @shopify/shopify-ai-toolkit@latest add shopify-liquid"
419+
echo ""
420+
print_info "Docs: ~/.aidevops/agents/services/ecommerce/shopify.md"
421+
print_info "Config template: ~/.aidevops/agents/configs/mcp-templates/shopify-dev-mcp-config.json.txt"
422+
return 0
423+
}
424+
393425
# Install specific MCP integration — thin dispatcher to per-integration helpers
394426
install_mcp() {
395427
local mcp_name="$1"
@@ -422,6 +454,7 @@ install_mcp() {
422454
# serper - REMOVED: Uses curl subagent (.agents/seo/serper.md), no MCP needed
423455
"unstract") _install_unstract ;;
424456
"context7") _install_context7 ;;
457+
"shopify-dev-mcp") _install_shopify_dev_mcp ;;
425458
*)
426459
print_error "Unknown MCP integration: $mcp_name"
427460
print_info "Available integrations: ${MCP_LIST[*]}"
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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 -->

‎.agents/services/monitoring/sentry.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ tools:
1010
grep: false
1111
webfetch: true
1212
task: false
13+
sentry_*: true
14+
# TODO(permission-migration): Replace with permission: sentry: allow
15+
# once anomalyco/opencode#6892 is resolved.
1316
mcp:
1417
- sentry
1518
---

‎.agents/services/monitoring/socket.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ tools:
1010
grep: false
1111
webfetch: true
1212
task: false
13+
socket_*: true
14+
# TODO(permission-migration): Replace with permission: socket: allow
15+
# once anomalyco/opencode#6892 is resolved.
1316
mcp:
1417
- socket
1518
---

‎.agents/tools/ai-assistants/claude-code.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ tools:
55
read: true
66
bash: true
77
claude-code-mcp_*: true
8+
# TODO(permission-migration): Replace with permission: claude-code-mcp: allow
9+
# once anomalyco/opencode#6892 is resolved.
10+
mcp:
11+
- claude-code-mcp
812
---
913

1014
<!-- SPDX-License-Identifier: MIT -->

‎.agents/tools/api/cloudflare-mcp.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ tools:
1010
grep: true
1111
webfetch: true
1212
cloudflare-api_*: true
13+
# TODO(permission-migration): Replace with permission: cloudflare-api: allow
14+
# once anomalyco/opencode#6892 is resolved.
15+
mcp:
16+
- cloudflare-api
1317
---
1418

1519
<!-- SPDX-License-Identifier: MIT -->

‎.agents/tools/browser/chrome-devtools.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ tools:
1010
grep: true
1111
webfetch: true
1212
task: true
13+
chrome-devtools_*: true
14+
# TODO(permission-migration): Replace with permission: chrome-devtools: allow
15+
# once anomalyco/opencode#6892 is resolved.
16+
mcp:
17+
- chrome-devtools
1318
---
1419

1520
<!-- SPDX-License-Identifier: MIT -->

‎.agents/tools/browser/playwright.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ tools:
1111
webfetch: true
1212
task: true
1313
playwright_*: true
14+
# TODO(permission-migration): Replace with permission: playwright: allow
15+
# once anomalyco/opencode#6892 is resolved.
1416
mcp:
1517
- playwright
1618
---

‎.agents/tools/context/context7.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ tools:
1111
webfetch: true
1212
task: true
1313
context7_*: true
14+
# TODO(permission-migration): Replace with permission: context7: allow
15+
# once anomalyco/opencode#6892 is resolved.
1416
mcp:
1517
- context7
1618
---

0 commit comments

Comments
 (0)