Get the FREE Ultimate OpenClaw Setup Guide →

chatbot_Shopify

Agentic Shopify Chatbot with MCP integration, embedded directly into Shopify via a Theme Extension

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mobeen-dev-chatbot_shopify docker run -i chatbot_shopify:latest

How to use

Shopify ChatBot is an intelligent commerce assistant that integrates with a Shopify storefront to provide natural language customer interactions, product discovery via a hybrid retrieval system, and autonomous actions such as cart management and checkout flows. The system uses a FastAPI server for the web API, OpenAI for conversational AI, FAISS for semantic search, and Elasticsearch for lexical search, with Redis for session management and MongoDB for chat history. To operate, the bot connects to Shopify GraphQL APIs to fetch live store data, query product catalogs, and manage customer orders. You can interact with the bot via the provided API endpoints to initiate chats, request product suggestions, or trigger agentic actions like creating or updating carts and initiating checkouts. The MCP server orchestrates the OpenAI response, routes queries through the hybrid retriever, and then delegates any required Shopify actions to the Shopify integration layer.

How to install

Prerequisites:

  • Docker and Docker Compose
  • Python 3.10+ (for local development if you choose to run components directly)
  • Access to a Shopify Partner store and OpenAI API key
  1. Clone the repository and navigate to the project root: git clone https://github.com/Mobeen-Dev/chatbot_Shopify.git cd chatbot_Shopify

  2. Create and configure environment variables:

    • Copy the example env file to a real env file and fill in credentials: cp credentials/.env.example credentials/.env
    • Edit credentials/.env with your OpenAI, Shopify, database, and search service credentials
  3. Install dependencies (if running components locally):

    • Python dependencies (optional if using Docker): pip install -r requirements.txt
  4. Run supporting services (using Docker Compose): docker-compose up -d redis mongodb elasticsearch

    Ensure all services start correctly

  5. Start the application (Docker-based):

    • Build and run the Docker image as defined in Dockerfile/Docker Compose docker-compose build docker-compose up
  6. Verify API endpoints (example):

  7. Optional: for local development without Docker, run the FastAPI app directly: python src/server.py

  8. For production deployment, follow the CI/CD and GitHub Actions guidance in the repository:

    • Build and push Docker images
    • Deploy using docker-compose.prod.yaml or your orchestrator of choice

Additional notes

Tips and common issues:

  • Ensure your environment variables are loaded correctly (OpenAI, Shopify, MongoDB, Redis, and search services).
  • If you encounter slow search performance, consider rebuilding the FAISS index or checking Elasticsearch cluster health.
  • When running in production, tune LOG_LEVEL and APP_ENV to appropriate values and enable secure session handling with Redis.
  • If Shopify API rate limits become an issue, implement retry strategies and caching of frequent queries.
  • Monitor container logs with docker-compose logs to diagnose startup or runtime problems.
  • The system relies on several services (Redis, MongoDB, Elasticsearch, FAISS). Ensure network connectivity and proper startup order.

Related MCP Servers

Sponsor this space

Reach thousands of developers