Shopify
Make your Shopify contact form, newsletter signup, customer login, registration, and account
forms callable by AI agents. Edit theme.liquid in the Shopify admin and paste
one script tag — every storefront form is instantly AI-ready.
Works with all Shopify themes
⏱ ~3 min to deploy
Shopify 2.0 compatible
1
Add the script via theme.liquid
-
1
In your Shopify admin, go to Online Store › Themes.
-
2
Next to your active theme, click the … menu and choose Edit code.
-
3
In the file list, open Layout › theme.liquid.
-
4
Find the closing
</body>tag and paste the snippet directly above it. -
5
Click Save. Visit your storefront and open the browser console — you should see
[auto-webmcp] registered N tools.
<script src="https://cdn.jsdelivr.net/npm/auto-webmcp@0.2.1/dist/auto-webmcp.iife.js" async></script>
One tag. auto-webmcp auto-initialises on load and registers every <form> on the page.
Checkout pages require Shopify Plus. Shopify restricts custom JavaScript on
/checkout pages to Shopify Plus merchants only (via
checkout.liquid or Checkout Extensibility). On standard Shopify plans,
auto-webmcp will cover all other storefront pages but not the checkout funnel itself.
2
Alternative: Shopify Script Tags API (for app developers)
If you are building a Shopify app or prefer to manage the script programmatically, use the Shopify Script Tags REST API to register auto-webmcp across all storefronts that install your app.
POST /admin/api/2024-01/script_tags.json
{
"script_tag": {
"event": "onload",
"src": "https://cdn.jsdelivr.net/npm/auto-webmcp@0.2.1/dist/auto-webmcp.iife.js"
}
}
3
What gets registered automatically
Shopify form types that become AI-callable out of the box
- Contact form: name, email, phone, message (page type: contact)
- Newsletter signup: email, optional name (footer / popup forms)
- Customer login: email, password
- Customer registration: first name, last name, email, password
- Account address: billing/shipping address edit forms
- Product reviews: rating, title, body (theme-dependent)
- Search: keyword query form
Cart and checkout: Shopify's native cart form uses non-standard markup that
varies by theme. auto-webmcp registers it using the inferred name from the submit button or form
id. For a richer description, add
toolname and
tooldescription attributes to the <form>
element in your theme's cart.liquid.
4
Optional: enrich with spec attributes
Add WebMCP spec attributes to your Liquid template's <form>
tags to give AI agents precise, structured descriptions.
{% form 'contact', id: 'contact-form',
toolname: 'submit_contact_enquiry',
tooldescription: 'Send a customer enquiry. Requires name, email, and message.',
toolautosubmit: 'true' %}
...
{% endform %}
Next steps