Shopify Dev MCP + Admin GraphQL skill with auditable execution, safety guardrails, and reusable store analytics workflows.
For Chinese documentation, see 中文.
- 1. Scope and Compatibility
- 2. Features
- 3. Repository Layout
- 4. Configure MCP (Multi-Agent)
- 5. Installation
- 6. Usage
- 7. Audit Outputs
- 8. Testing
- 9. Changelog
- 10. Release
- 11. License
This project is agent-agnostic and OS-agnostic.
- Agents: Codex, Claude, Antigravity, OpenClaw, or any runtime that can execute local scripts.
- OS: Windows, macOS, Linux.
- Devices: desktop/laptop, remote VM/server, CI runner.
Core execution is runtime-independent because it lives in scripts/admin_graphql_query.py.
- Official-doc-first workflow (Dev MCP first, then execution).
- Unified CLI commands for query, stock operations, rollback, and reporting.
- Extra common commands:
top-products,inventory-alerts,orders-export. - Read-only by default; write requires explicit
--apply. --max-changesguardrail for mass update prevention.- Structured audit outputs for every run.
- Retry/backoff and error classification.
- File-based inputs:
--query-file,--variables-file.
SKILL.md- skill behavior and triggering instructions.scripts/admin_graphql_query.py- unified CLI entry.references/- MCP and GraphQL guidance.documentation/- maintainable docs (MCP matrix, detailed changelog, planning notes).tests/- unittest suite.
See full matrix: documentation/mcp-setup-matrix.md
Quick summary:
- Codex:
~/.codex/config.toml - Claude Code:
<project-root>/.mcp.json - Claude Desktop: app settings / desktop MCP config
- Antigravity: MCP settings UI (or raw config if supported)
- OpenClaw: MCP settings if available, otherwise script-only mode
Server definition used across all runtimes:
command = "npx"
args = ["-y", "@shopify/dev-mcp@latest"]- Python 3.10+
- Node.js (for Shopify Dev MCP via
npx) - Shopify Admin API token
Do not clone this repository into an arbitrary project folder. Clone it into the skills/extensions directory of the runtime (agent) you are currently using.
Codex:
git clone https://github.com/rwang23/shopify-skill.git ~/.codex/skills/shopify-skillClaude:
git clone https://github.com/rwang23/shopify-skill.git ~/.claude/skills/shopify-skillAntigravity:
git clone https://github.com/rwang23/shopify-skill.git ~/.gemini/antigravity/skills/shopify-skillOpenClaw:
git clone https://github.com/rwang23/shopify-skill.git ~/.openclaw/skills/shopify-skillThen open the cloned folder:
cd ~/.<agent>/skills/shopify-skillAlternative: download ZIP from GitHub and extract it under the corresponding agent skills folder.
Create project-root .env:
SHOPIFY_SHOP=your-store.myshopify.com
SHOPIFY_ADMIN_TOKEN=shpat_xxx
SHOPIFY_API_VERSION=2026-01Alias keys also supported:
SHOPIFY_STORE_URL-> same asSHOPIFY_SHOPSHOPIFY_ACCESS_TOKEN-> same asSHOPIFY_ADMIN_TOKEN
Windows (PowerShell):
py -3 scripts/admin_graphql_query.py capabilitiesmacOS/Linux:
python3 scripts/admin_graphql_query.py capabilitiespython scripts/admin_graphql_query.py query --query "{ shop { name myshopifyDomain } }"
python scripts/admin_graphql_query.py query --query-file query.graphql --variables-file vars.json
python scripts/admin_graphql_query.py capabilities
python scripts/admin_graphql_query.py report-sales --page-size 100 --max-pages 10
python scripts/admin_graphql_query.py top-products --days 30 --limit 20 --by revenue
python scripts/admin_graphql_query.py orders-export --days 30 --page-size 100 --max-pages 10Use the built-in template library in references/templates/:
python scripts/admin_graphql_query.py query --query-file references/templates/orders_recent.graphql --variables-file references/templates/orders_recent.variables.json
python scripts/admin_graphql_query.py query --query-file references/templates/customers_recent.graphql --variables-file references/templates/customers_recent.variables.json
python scripts/admin_graphql_query.py query --query-file references/templates/blogs_with_articles.graphql --variables-file references/templates/blogs_with_articles.variables.json
python scripts/admin_graphql_query.py query --query-file references/templates/products_performance.graphql --variables-file references/templates/products_performance.variables.json
python scripts/admin_graphql_query.py query --query-file references/templates/sales_shopifyql.graphql --variables-file references/templates/sales_shopifyql.variables.json
python scripts/admin_graphql_query.py query --query-file references/templates/subscription_contracts.graphql --variables-file references/templates/subscription_contracts.variables.json
python scripts/admin_graphql_query.py query --query-file references/templates/app_installation_subscriptions.graphql --variables-file references/templates/app_installation_subscriptions.variables.jsonFull matrix (scopes + scenario notes): references/common-templates.md
python scripts/admin_graphql_query.py scan-stock --threshold 50 --exclude-product "Shipment Protection+"
python scripts/admin_graphql_query.py inventory-alerts --low-threshold 10 --high-threshold 50- Dry-run preview:
python scripts/admin_graphql_query.py randomize-stock --threshold 50 --target-min 20 --target-max 35 --exclude-product "Shipment Protection+"- Apply with guardrail:
python scripts/admin_graphql_query.py randomize-stock --threshold 50 --target-min 20 --target-max 35 --exclude-product "Shipment Protection+" --apply --max-changes 20- Rollback if needed:
python scripts/admin_graphql_query.py rollback-stock --rollback-file shopify-skill-output/<YYYYMMDD>/<HHMMSS>-randomize-stock-<runid>/rollback-plan.json --apply --max-changes 20Output root:
shopify-skill-output/<YYYYMMDD>/<HHMMSS>-<operation>-<runid>/
Mandatory files:
summary.jsonrequest.jsonresult.json
Write operations also emit:
applied.csvfailed.csvrollback-plan.json
Detailed convention: references/audit-output-convention.md
python -m unittest discover tests -vShort changelog summary is kept here. Detailed history is in documentation/CHANGELOG.md.
- Added scenario template packs for orders, customers, blogs/articles, products, sales (ShopifyQL), and subscriptions.
- Added official-source use-case research notes in
documentation/use-cases-research-2026-03-03.md. - Expanded usage docs with copy-paste template commands.
- Added unified CLI with safety controls and audit outputs.
- Added report and inventory workflows.
- Set default mode to read-only.
- Release template: .github/release-template.md
- v1.0.0 notes: documentation/RELEASE_NOTES_v1.0.0.md
MIT. See LICENSE.