How to Set Up the Shopify AI Toolkit with OpenAI Codex

Last updated
•
Expert reviewed
•
5 min read

Key takeaways

  • Install Shopify AI Toolkit with codex plugin add shopify@openai-curated.
  • For safer storefront changes, add Fudge to Codex. It builds private drafts with visual previews; you control publishing.
  • Use Fudge’s saved brand context and ecommerce design references to give page and theme designs a stronger starting point.
  • Start with read-only store access. GraphQL writes through shopify store execute require --allow-mutations and confirmation.
  • Manual skills need updates. The toolkit reports code, searches and some prompt context by default; use the documented opt-out if needed.

To set up the Shopify AI Toolkit in OpenAI Codex, run codex plugin add shopify@openai-curated in your terminal, or run /plugins in the Codex CLI, search for Shopify and select Add to Codex. Then ask a Shopify API question to confirm Codex searches the current docs.

Once installed, Codex gets access to Shopify documentation search, code validation against bundled API schemas, and the same skill set available to Claude Code and Cursor.

For storefront work, connect Fudge alongside Codex before your first change. We recommend its private drafts and previews for reviewing the design before it reaches shoppers. Fudge uses your store’s theme, products and saved brand context; keep the toolkit for the developer work covered below.

For the full breakdown of what the toolkit does, how it works, and the governance risks around store execution, see our Shopify AI Toolkit overview.


Why you can trust us

Jacques has over 15 years of development experience and has worked with hundreds of Shopify stores. We build Fudge, the AI operator for Shopify stores, with a 4.9 rating on the Shopify App Store and a Built for Shopify badge. We use these tools daily.


Prerequisites

  • OpenAI Codex CLI installed and working
  • Node.js 22.12 or higher for the current Shopify CLI. Check with node --version; use a supported Node release
  • Shopify CLI installed (needed for store operations)
  • A Shopify store to connect to (only required for store operations)

Installation: plugin method

In your terminal, run Shopify’s documented command:

codex plugin add shopify@openai-curated

Or, inside the Codex CLI, run /plugins, search for Shopify, then select Add to Codex.

This installs the Shopify plugin with all available agent skills.

Verify installation

Ask Codex something Shopify-specific:

What's the correct GraphQL mutation to update a product's title in the Shopify Admin API?

Check that Codex actually searches Shopify documentation and runs validation. Inspect the validation result before using the query.


Alternative: manual skills installation

If your setup can’t use the plugin, or you’d rather manage the skill yourself, install it directly:

npx skills add Shopify/shopify-ai-toolkit

This installs the toolkit’s single shopify skill, which covers every Shopify developer surface: the GraphQL Admin API, Shopify Functions, Polaris, Liquid, Hydrogen and Shopify CLI. Earlier versions shipped a separate skill per surface, such as shopify-admin and shopify-liquid. Those are deprecated and no longer updated, so if you installed any of them, remove them (for example npx skills remove shopify-admin shopify-liquid) and install the shopify skill instead.

Manually installed skills don’t auto-update. Run npx skills update periodically to stay current with Shopify’s API changes. Otherwise the bundled schemas drift from the live platform.


Alternative: MCP server setup

As an alternative for developer documentation and validation, Codex uses TOML configuration (unlike Cursor and Gemini CLI which use JSON). The Dev MCP server runs as a local server/client integration but makes network calls to Shopify endpoints for documentation search.

Add this to your ~/.codex/config.toml file, as given in the Shopify AI Toolkit docs:

[mcp_servers.shopify-dev-mcp]
command = "npx"
args = ["-y", "@shopify/dev-mcp@latest"]

This does not authenticate a store. Note the snake_case mcp_servers key, where JSON clients use mcpServers. Restart Codex to load the new configuration.


Telemetry and code transmission

Shopify’s telemetry disclosure lists documentation searches and results, validated code, usage metadata and, when supplied, the latest user prompt (up to 2,000 characters). Skill-use hooks can report usage too.

On Linux or macOS, create the opt-out file before using the toolkit:

mkdir -p ~/.config/shopify-ai-toolkit
touch ~/.config/shopify-ai-toolkit/opt-out

On Windows, create an empty file at %APPDATA%\shopify-ai-toolkit\opt-out.

Alternatively, set OPT_OUT_INSTRUMENTATION=true in the environment inherited by your assistant. Opting out of telemetry does not make documentation searches or authenticated store requests offline.


Connecting to your store

For private store reads or approved writes, authenticate through Shopify CLI. Start with a product read:

shopify store auth --store yourstore.myshopify.com --scopes read_products

Start with read-only access. Validation can report scopes for supported operations; check the API reference and request only what the task needs. Common scopes:

OperationScope
Read productsread_products
Update productswrite_products
Read inventoryread_inventory
Adjust inventorywrite_inventory
Read ordersread_orders
Read customersread_customers

Reauthenticate if the token expires or you need different scopes.

Use the minimum scopes needed. write_products grants access to all product write operations, not just the specific mutation you’re running.


What you can do

The toolkit provides the same Shopify references across supported clients. Here’s what the toolkit enables:

Validated GraphQL - Queries and mutations validated against the bundled Shopify API schema before you use them. Fewer hallucinated fields and deprecated patterns.

Theme development - Liquid templates validated against Shopify’s theme rules, including schema blocks and LiquidDoc headers.

Hydrogen storefronts - React component generation with validated imports and patterns.

Functions and extensions - Backend customization (discounts, cart validation, delivery rules) and UI extension scaffolding with Polaris components.

Store operations - Read private store data through Shopify CLI after authentication. GraphQL writes through shopify store execute also require --allow-mutations and confirmation under the skill instructions. Some writes change customer-facing data immediately; theme workflows can use unpublished copies.

Metafield management - Extend your store’s data model with metafield definitions and custom data.

For hands-on theme examples, see How to Add Custom Liquid Logic in Shopify.


Best practices

These apply across all toolkit clients, but are worth repeating.

  1. Query before you mutate. Always read the current state of a resource before updating it. This helps you identify unintended changes before approval.

  2. Be specific with mutations. “Optimize my products for SEO” is too vague. “Update the meta description for product handle ‘classic-tee’ to ’…’” is easier to review. Check the generated operation before approving it.

  3. Push themes as unpublished. The toolkit supports shopify theme push --unpublished but doesn’t enforce it. Make it a habit.

  4. One resource at a time for critical changes. Limits blast radius if something goes wrong.

  5. Keep your own backups. The toolkit has no universal undo. Export current values before running mutations that update existing content.


Limitations

  • Review depends on the operation. shopify store execute defaults to read queries. GraphQL writes through that command need --allow-mutations, and the current skill instructs the assistant to show the command, target and effects and wait for confirmation. Schema validation cannot judge whether a change is right for your business.
  • There is no universal draft and rollback workflow. Theme development can use previews and unpublished themes. Other API writes can update store records directly; keep the previous values when you may need to restore them.
  • Permissions cover resource types. A product write scope is broader than permission to change one description. Check the target store and resource before approving.
  • Manual skills need updates. Run npx skills update when you manage the installation yourself.

See the Shopify CLI execution reference and the toolkit’s confirmation rules.


Use Fudge alongside Shopify AI Toolkit

We recommend connecting Fudge to Codex before making storefront changes. Use Fudge for landing pages and theme edits, with Shopify AI Toolkit available for API documentation, validation and custom development.

  • Keep the live storefront protected. Fudge prepares the change in a private draft with a visual preview. Its MCP tools cannot publish it; you review and publish in Fudge.
  • Give the design your store’s context. Fudge works with your existing theme, products and saved brand preferences. Ask it for ecommerce design references before it builds, then check the result on mobile.
  • Start with the right change. Ask Fudge for a store review to identify SEO or conversion opportunities before deciding what to build. Its saved context carries into the next request.

For example, use the toolkit to check an app’s GraphQL query, then ask Fudge to build the campaign page that presents the products. Connecting Fudge does not install the toolkit, and CLI access does not connect Fudge; each has its own setup and permissions.

Use Fudge to review [store.myshopify.com] and draft a landing page
for [collection]. Match the store's branding and show me a preview.
Use Shopify AI Toolkit if we need to check Shopify API or Liquid rules.

Quick reference

TaskHow
Install plugincodex plugin add shopify@openai-curated
Install all skills manuallynpx skills add Shopify/shopify-ai-toolkit
Update manual skillsnpx skills update
MCP configTOML in ~/.codex/config.toml (Cursor/Gemini use JSON)
Auth with storeshopify store auth --store domain --scopes list
Opt out of telemetryCreate ~/.config/shopify-ai-toolkit/opt-out
Check Node versionnode --version (22.12+ for Shopify CLI)

For the full picture on risks, read our Shopify AI Toolkit overview. For other platforms, see our Claude Code guide and Cursor guide.

Setup commands checked on 11 November 2026 against Shopify’s installation guide, CLI requirements and store authentication reference.


FAQ

Can I use Fudge and Shopify AI Toolkit in the same assistant?

Yes. Keep the toolkit for Shopify development references and CLI work, and connect Fudge for store reviews, saved brand context and storefront drafts. Each connection has separate authorization. Fudge drafts are reviewed and published in Fudge.

Why is Codex's MCP config TOML instead of JSON like other clients?

OpenAI's Codex CLI uses TOML for its general configuration format, so MCP server config follows that convention. Cursor, Gemini CLI, and most other MCP clients use JSON. The capability is identical; only the config syntax differs. Shopify's docs give a Codex-specific TOML snippet, shown in the MCP section above.

Can OpenAI Codex execute live Shopify store mutations?

Yes, with the Shopify CLI integration (shopify store execute --allow-mutations). Codex generates the mutation, validates against the schema, then triggers the CLI to run it against your authenticated store. The skill calls for a separate confirmation before writes. Check the store and operation: there is no universal draft or undo step for Admin API mutations.

Does Codex auto-update the Shopify AI Toolkit?

The plugin install path auto-updates with Shopify's releases. Manual npx skills add installations don't, so run npx skills update periodically to keep schemas current. Codex doesn't have its own update mechanism for the toolkit; it relies on the underlying installation method.

Will the Shopify AI Toolkit work with multiple Shopify stores in Codex?

Authenticate with shopify store auth --store yourstore.myshopify.com --scopes read_products for each store you need. Explicitly name the target store in each request and confirm the domain before any write. Reauthenticate when tokens expire or scopes change.

How does Codex compare to Claude Code for Shopify development?

Both support the same toolkit and skills. Differences are agent capability (model quality, agentic loops, codebase awareness), so pick based on which you prefer for general development. Both install the toolkit as a plugin; the main practical difference is that Codex configures MCP in TOML. The Shopify capabilities are equivalent.

Jacques's signature
Edit your Shopify storefront without code.

You might also be interested in

Jacques Blom
Jacques Blom
CTO at Fudge.