Skip to main content
Shopify via MCP allows your ChatbotX AI Agents to connect directly to your Shopify store using the Model Context Protocol (MCP) standard. With this setup, your AI Agent transforms into an autonomous 24/7 e-commerce sales representative with full operational capabilities:
  • Search live products, check variant stock (sizes, colors), and retrieve high-resolution images in real time.
  • Present interactive product Carousels with action buttons.
  • Automatically create customer profiles and register official orders in Shopify Admin with normalized address components (Address, City, Province).
  • Generate unified multi-item checkout cart links for combined purchases.
  • Automatically cancel orders and restock inventory directly on Shopify when requested.
  • Track real-time fulfillment status, delivery milestones, and tracking numbers.

How It Works

The architecture operates as a 3-tier bridge:
  1. Customer sends messages across any supported channel (Facebook Messenger, Instagram, Webchat, WhatsApp, Zalo).
  2. AI Agent (ChatbotX) processes natural language and automatically calls corresponding MCP tools.
  3. Shopify MCP Server acts as a bridge to process customer details (formatting phone numbers, shipping addresses) and sync directly with your Shopify store.

Step 1: Create an App in Shopify Dev Dashboard

To allow ChatbotX to query your store catalog and manage orders, create an app in the Shopify Dev Dashboard to generate your API credentials:
1

Access Develop apps from Shopify Settings

From your Shopify Admin, navigate to Settings ➔ select Apps from the left menu ➔ click the Develop apps button in the top-right corner.
Develop Apps In Shopify Settings
1

Start creating an app in Dev Dashboard

On the Dev Dashboard interface, locate the Get API credentials card and click Create app.
Create App In Shopify Dev Dashboard
1

Enter your app name

Under Start from Dev Dashboard, enter a memorable app name into the App name field (such as BotX MCP) and click Create app.
Set App Name In Dev Dashboard
1

Open Admin API Scopes modal

On the newly created app page, scroll down to the API access section and click the blue Select scopes button next to Scopes.
Select Scopes In API Access
1

Search and enable required scopes

Use the search bar at the top of the popup modal to enter scope names and tick the required checkboxes.
Search And Select Scopes In Modal

Fast-Search Scopes Cheat Sheet

To configure permissions quickly, copy each search keyword below, paste it into the Search bar at the top of the Select scopes modal, and tick the corresponding checkboxes:
1

Release version

After selecting the required scopes, click Done in the modal. Then click the white Release button in the top-right corner to activate this version.
2

Copy Client ID and Client Secret

From the left menu, go to App settings. In the Credentials card, copy your:
  • Client ID
  • Secret (Client Secret)
Copy Client ID And Secret In Credentials
1

Install app on your store

Click Overview in the left menu, locate the Installs section, and click the Install app button. Choose your store and click Install to grant full access.
Click Install App In Overview
Choose Store To Install App
App Successfully Installed In Shopify
After installation, verify that the app appears under Settings ➔ Apps ➔ Installed as BotX MCP. If your browser displays a “connection refused” warning due to iframe restrictions, rest assured that the app installation has already succeeded on Shopify’s servers.

Step 2: Deploy Shopify MCP Server on Cloudflare Workers

You can deploy a serverless MCP Server on Cloudflare Workers running 24/7.
1

Navigate to Workers & Pages

Log in to your Cloudflare Dashboard, from the left menu select Compute ➔ select Workers & Pages ➔ click the Create application button in the top-right corner.
Navigate To Workers And Pages In Cloudflare
1

Create a Worker using Hello World template

Under Create a Worker, select Start with Hello World!. Enter a worker name (such as shopify-mcp-server) and click Deploy.
Create A Worker Start With Hello World
1

Open Worker Code Editor

On your Worker overview page, click the Edit code button in the top-right corner.
Click Edit Code In Worker Overview
1

Paste 11-tool MCP Server code

Paste the full standardized MCP Server code below into worker.js:
1

Configure Store variables and Deploy

Fill in your SHOP_DOMAIN, CLIENT_ID, and CLIENT_SECRET in the CONFIG section at the top, then click Deploy in the top-right corner.
Edit Worker Code Deploy And Preview SSE
1

Copy MCP Server URL

Your MCP Server connection URL will follow this format: https://[worker-name].[account-subdomain].workers.dev/sse

Step 3: Connect MCP Server to ChatbotX

Once your MCP Server endpoint is active:
1

Open MCP Servers

From the left navigation menu in ChatbotX, select MCP Servers ➔ click the + Create MCP Server button.
Click Create MCP Server In ChatbotX
1

Enter connection details and fetch tools

Fill in:
  • Name: A memorable name (such as BotX Shopify or Shopify Store).
  • URL: Paste your Worker URL (https://.../sse).
  • Auth: Select None.
Then, click the Get Tools button.
Create MCP Server Modal And Get Tools
1

Confirm and save 11 tools

ChatbotX will validate the MCP handshake and load all 11 available tools. Ensure the tools are selected and click Confirm to save.
List 11 Tools And Confirm

Step 4: Enable Rich Responses and Configure AI Agent

1

Open AI Agents

Go to AI HubAI Agents ➔ Click + Create AI Agent (or edit an existing sales agent).
2

Set Model and Parameters

  • AI Model: Select a capable model such as Claude 3.5 Sonnet, GPT-4o, or GPT-4o mini.
  • Temperature: Set to 0.2 or 0.3 to ensure factual, accurate product details and pricing.
3

Attach MCP Server and Enable Rich Response

  • Under the Tools / MCP Servers section, enable your BotX Shopify connection.
  • Scroll down to the Rich Response switch and turn it to ON to enable structured JSON templates.
Attach MCP Server And Enable Rich Response Toggle
1

Set System Message (Prompt)

Paste the production-grade operational prompt below into the Prompt field:

Step 5: Test Across Any Connected Channel

Open any channel connected to your ChatbotX workspace (such as Facebook Messenger, Instagram, WhatsApp, Web Chat, or Zalo) to start testing the AI Agent’s full automated sales cycle:
1

Open your messaging channel

Start a conversation with your connected Facebook Page, WhatsApp Business number, Instagram account, or Web Chat widget.
2

Test product browsing and interactive size selection

Type “What products do you have available?” or “Hi! Show me your available products.” ➔ The AI Agent queries live Shopify catalog data and renders a Product Carousel with direct checkout buttons and Quick Replies for size selection:
ChatbotX AI Agent Shopify Product Carousel and Size Quick Replies
1

Test automated order creation and real-time tracking

  • Direct order creation: Pick a size and provide name, phone number, and address ➔ The AI Agent creates a new customer profile and places an official draft order in Shopify Admin, then returns a structured Order Confirmation card.
  • Delivery tracking: Type “Can you check the delivery status for my order #1005?” ➔ The AI Agent retrieves real-time fulfillment status and tracking numbers:
ChatbotX AI Agent Shopify Order Creation and Tracking
1

Test additional e-commerce scenarios

  • Multi-item cart checkout: Type “Send me a checkout link for both items” ➔ AI generates a single combined checkout link (/cart/variant_1:qty_1,variant_2:qty_2).
  • Automated order cancellation: Type “Please cancel order #1005” ➔ AI cancels the order on Shopify and automatically restocks inventory.