You want to build a custom Shopify theme section. Two paths: use an AI website builder that promises ‘no code needed,’ or use an AI coding assistant like Cursor to write actual Liquid code.
The builder gives you a visual interface and a prompt box. Sounds easier.
The coding assistant requires Shopify CLI, a local dev environment, and some understanding of how themes work. Sounds harder.
What actually happens: the builder produces a pretty mockup that breaks the moment you need custom metafields, variant logic, or anything that touches your existing theme. You’re stuck. The coding path gives you actual code – you can debug it, version control it, modify it. You own it.
Building anything beyond a landing page? Apps, custom checkout logic, theme sections that don’t fall apart when requirements change? You need the coding approach.
Why Most ‘AI Shopify Builders’ Hit a Wall
AI page builders like Instant, EComposer, or Durable can generate Shopify sections from prompts. Useful for quick mockups. But they output abstracted components that live inside their own app ecosystem – you can’t directly edit the Liquid, can’t commit it to Git, can’t hand it to another developer without the app subscription.
The real issue: they optimize for speed at setup, not flexibility over time. Three months later your client wants conditional pricing based on customer tags, or you need to integrate a custom API. You’ll rewrite it from scratch.
Compare that to AI-generated Liquid code. Just .liquid files. Open them in any editor, debug them with Chrome DevTools, modify them without a third-party service. Upfront setup is steeper – Shopify CLI and a code editor – but you’re building on the actual Shopify platform, not a layer on top.
What if the AI approach didn’t make you choose between ease and control?
The Right Tool for Shopify: Cursor + MCP, Not ChatGPT Alone
Most tutorials say paste prompts into ChatGPT and copy the code back into Shopify’s theme editor. Works for one-off snippets. Breaks down for real projects.
Better workflow: Cursor IDE connected to the Shopify Dev MCP server. Cursor is a VS Code fork with AI baked into every panel. Reads your entire theme structure, suggests code inline, can scaffold entire sections. MCP (Model Context Protocol)? Connects Cursor directly to Shopify’s official docs and API schemas.
Why this matters: without MCP, Cursor guesses. Might use Liquid syntax from 2021, reference objects that don’t exist, or write schema JSON that Shopify rejects. With MCP, it pulls from the current Shopify docs in real time. The difference? Hallucinated fields drop to near zero.
Stack that works in 2026:
- Cursor IDE – code editor with built-in AI (Alt: GitHub Copilot in VS Code, but Cursor’s Agent mode is faster for scaffolding)
- Shopify CLI – syncs local theme files with your dev store
- Shopify Dev MCP server – connects Cursor to live Shopify API schemas and docs
- Git + GitHub – version control so you can roll back when AI writes something broken
ChatGPT? Still useful for one-off questions or starter prompts. For sustained development – multiple sections, testing live, iterating – Cursor is the tool.
Connect Cursor to Shopify the Right Way
Most guides tell you to install Shopify CLI and stop there. CLI alone doesn’t connect Cursor to Shopify’s current API state. You need MCP configured.
Install Shopify CLI
Shopify CLI (as of early 2026) requires Node.js and a package manager. Check if you have them:
node -v
npm -v
Not installed? Get Node.js first. Then install Shopify CLI globally:
npm install -g @shopify/cli@latest
Verify:
shopify version
Should see version 3.x or higher.
Pull Your Theme Locally
Authenticate with your Shopify store and download your theme:
shopify theme pull
Prompts you to log in via browser, then lists your store’s themes. Select the one you want. CLI downloads it to your current directory.
Now you have local .liquid files you can edit.
Configure Cursor with MCP
Download Cursor from cursor.com. Open it → Settings → Cursor Settings → Tools and Integrations → New MCP Server.
Add this:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"]
}
}
}
Save. Restart Cursor. Now when you ask Cursor to generate Shopify code, it queries Shopify’s live docs and API schemas instead of relying on outdated training data (as of early 2026, GitHub Copilot and ChatGPT are still trained on data up to 2021-2022, making them outdated for current Shopify development).
Skip this step? You’re coding blind. Cursor will produce plausible-looking Liquid that fails when you test it.
Build a Custom Section: Workflow That Works
Let’s build a product feature comparison section. Real use case: client wants a side-by-side table comparing two product variants by custom metafields.
Start with a clear prompt to Cursor’s Agent mode:
Be specific. Don’t say “build a product comparison.” Say “Build a Shopify section that accepts two product handles via section settings, displays their titles, prices, and custom metafields (key: ‘specs.material’), and renders them in a two-column table. Schema should allow theme editor customization.”
Cursor generates a .liquid file in sections/ with schema JSON at the bottom. Open the file. Check:
- Schema uses correct
typevalues? (e.g.,productfor product pickers) - References
section.settingsproperly in Liquid? - Metafield calls structured as
product.metafields.namespace.key?
Run Shopify CLI’s dev server to preview live:
shopify theme dev
Spins up a local URL that syncs changes in real time. Open it, go to Theme Customizer, add your new section to a page, test.
Breaks? Check browser console. Liquid errors usually surface as empty output or silent failure. Use the {{ object | json }} filter to dump objects into HTML comments and inspect them in View Source.
Iterate. Ask Cursor to fix errors. Because it has MCP, it knows the correct Liquid syntax for metafield access – no guessing.
Build a Shopify App: When You Need More Than a Theme
Themes have limits. Need to modify checkout, create custom discount logic, or interact with external APIs? You need a Shopify app.
AI helps here too, but the stakes are higher. Apps involve backend code (Node, Ruby, or PHP), API authentication, webhooks, and Shopify’s app review process if you want to list it publicly.
Shopify CLI can scaffold an app:
npm init @shopify/app@latest
Generates a full app structure with auth, API calls, and a React frontend using Shopify’s Polaris design system. Cursor can then generate API queries, build UI components, write webhook handlers.
Workflow is similar: write clear prompts, let Cursor generate code, test in a dev store, iterate. But apps require understanding Shopify’s Admin API (GraphQL), OAuth flows, and extension points like checkout UI or product pages.
Building for clients? Custom apps (private, single-store) are simpler – no app review, no App Store listing. Want to sell the app publicly? You’ll need to meet App Store requirements: minimum 50 installs (as of 2025), 5 reviews, and strict API usage rules.
Can you build an entire app with AI? Not autonomously. Cursor plus MCP will write 70% of your boilerplate, generate API queries, suggest fixes when things break. You still need to understand the architecture.
Four Things That Break AI-Generated Shopify Code
AI tools are powerful. They also fail predictably. Here’s what breaks, and how to catch it before you push to production.
Hallucinated Liquid Objects
AI trained on old data invents plausible-sounding Liquid objects that don’t exist. Example: {{ product.rating }} – Shopify has no native rating object. Or {{ cart.discount_total }} – it’s cart.total_discount. Without MCP, Cursor makes these mistakes constantly.
Fix: Always test generated code in a dev store. If an object outputs nothing, check the Shopify Liquid reference.
Outdated API Calls in App Code
GitHub Copilot and ChatGPT are trained on data up to 2021-2022 (as noted earlier). Shopify’s Admin API has deprecated multiple versions since then. AI might suggest 2020-10 API calls that no longer work.
Fix: Use Shopify CLI’s shopify app generate to scaffold apps with current API versions baked in. Check the Shopify changelog for deprecations.
Broken Theme Schema JSON
AI generates schema blocks with invalid type values or malformed JSON. Shopify silently rejects these – your section won’t show in the theme editor, no error message.
Fix: Run your theme through shopify theme check before pushing. It lints Liquid and catches schema errors.
Authentication Failures in Custom Apps
Custom apps require OAuth or access tokens generated via the client credentials grant flow (according to Shopify’s official documentation on custom apps). AI tutorials often skip this, telling you to ‘just use the API key.’ Doesn’t work – you can’t copy tokens from the admin.
Fix: Follow Shopify’s custom app auth docs exactly. Use CLI to handle auth if building an app for multiple stores.
| Error Type | Symptom | Most Common Cause | Fix |
|---|---|---|---|
| Silent Liquid Failure | Section renders blank | Non-existent object or typo | Use {{ object | json }} to inspect |
| Schema Not Appearing | Section missing in customizer | Invalid JSON or type |
Run shopify theme check |
| API Call Returns 401 | Unauthorized error | Missing or wrong access token | Use client credentials flow |
| Deprecated API Version | Fields return null | AI used old API version | Check changelog, update to stable version |
When AI Can’t Help (and What to Do Instead)
AI is a coding accelerator. Not a replacement for understanding the platform. There are moments where you’re on your own.
Debugging production errors in live stores. AI can’t access your live store logs or see what’s failing in real customer sessions. You need Shopify’s error emails (if you’ve published a script) or your own logging setup.
Complex metaobject relationships. Shopify’s metaobjects system (custom data structures) has nuances AI models don’t capture well. You’ll need to read the metaobjects docs yourself.
App review rejections. If Shopify’s App Review team rejects your app, their feedback is specific to your submission. AI can’t interpret subjective review comments like ‘user experience is confusing.’ You fix that through iteration and user testing, not prompts.
Think of AI as a junior developer: fast, helpful, needs supervision. You’re still the architect.
Next Action: Build Your First AI-Assisted Section
Don’t try to build a full theme on day one. Start small – one custom section.
Pick something your current theme can’t do. FAQ accordion that pulls from metafields. Product bundle builder. Size chart that changes based on collection.
Install Shopify CLI and Cursor. Connect MCP. Pull your theme locally. Open Cursor’s Agent mode and write a detailed prompt. Test in shopify theme dev. Debug with {{ object | json }}. Push the working code.
You’ll hit errors. That’s the point. Each error teaches you where AI struggles and where you need to step in. By section three or four, you’ll anticipate the failure modes and write better prompts.
The real skill isn’t writing code anymore. It’s writing prompts that generate good code, and knowing how to fix it when it’s not.
Frequently Asked Questions
Can I build a Shopify theme entirely with AI without knowing any code?
No. You’ll get something that looks functional but breaks the moment you need custom behavior, debug errors, or integrate beyond basic Shopify objects. AI generates code – you need to understand Liquid structure, schema JSON, and how themes load to maintain what it builds. 10-20 hour learning curve before you’re productive.
Why does Cursor generate broken Liquid code even with MCP connected?
MCP helps dramatically but isn’t perfect. Depends on your prompt clarity. Say ‘build a product section,’ Cursor guesses. Say ‘build a product section that displays title, price, first variant image, and custom metafield specs.material, with schema allowing theme editor customization,’ it has constraints. Check that MCP is actually loaded – restart Cursor after config changes.
What’s the real cost difference between using AI tools versus hiring a Shopify developer?
Shopify developers: $50-150/hour. Custom theme section might take 3-5 hours, so $150-750 per section. With AI plus CLI, you’ll spend 1-2 hours per section after the initial learning curve – but your time isn’t free, so factor your hourly rate. Break-even point is around 5-10 sections if you’re building multiple projects. One-off work? Hiring is often faster. Ongoing development? AI tools pay off.