Connector guide9-minute read23 MCP tools7 languages

Connect OpenCart to ChatGPT via MCP: Orders and Sales

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

HCBy HelpCode teamUpdated 9 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

OpenCart

OpenCart

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

tools

23

Region

INTL

Category

E-commerce

Authentication

Connection string

Required env vars

OPENCART_DB_HOSTOPENCART_DB_PORTOPENCART_DB_NAMEOPENCART_DB_USEROPENCART_DB_PASSWORD
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Summary

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

Guided setup

Connect OpenCart to ChatGPT in 2 minutes

Start a free trial on AnythingMCP Cloud, connect OpenCart in the guided setup, then add your MCP URL to ChatGPT. No code and no server to run.

No credit card · 7-day trial · Self-host alternative available

AnythingMCP's plugin in ChatGPT's directory answers questions from your company databases on AnythingMCP Cloud (PostgreSQL, MySQL, SQL Server, Oracle, SAP HANA, SQLite, MongoDB, read-only): open the listing (opens in a new tab) and click Install plugin. Every other connector is added to ChatGPT as a custom MCP server with your AnythingMCP MCP URL.

Try asking

Example prompts for OpenCart

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

OpenCart · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → OpenCart, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

OpenCart + ChatGPT

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

OPENCART_DB_HOST, OPENCART_DB_PORT, OPENCART_DB_NAME, OPENCART_DB_USER, OPENCART_DB_PASSWORD

Step 1 — Get credentials

  1. Create a database user that may only read. In cPanel: MySQL Databases, add a new user, add it to the shop's database and tick only SELECT. With SQL:
    CREATE USER 'amcp_reader'@'%' IDENTIFIED BY 'a-long-password';
    GRANT SELECT ON shop_database.* TO 'amcp_reader'@'%';
    
    The shop's own database user also works, but it can write. This connector never does, and a user with SELECT only makes that certain.
  2. Allow the AnythingMCP outbound address to reach MySQL. In cPanel: Remote MySQL (or Remote Database Access), add the address shown on the setup page. On Plesk it is the database user's Access control; on your own server open port 3306 in the firewall for that address only and check that bind-address is not 127.0.0.1.
  3. Fill in the connection. The values are in the shop's config.php:
    • DB_HOSTNAME is localhost there; from outside use the shop's domain or the server's IP address as OPENCART_DB_HOST.
    • DB_PORT (usually 3306) goes to OPENCART_DB_PORT, DB_DATABASE to OPENCART_DB_NAME.
    • OPENCART_DB_USER and OPENCART_DB_PASSWORD are the read-only user from step 1, not DB_USERNAME.
    • DB_PREFIX goes to OPENCART_DB_PREFIX. It is almost always oc_. Leave the field empty only when DB_PREFIX is empty.

Self-hosted AnythingMCP next to the shop: use the internal host name or address of the database (the value of DB_HOSTNAME when both run on the same machine or Docker network), skip step 2, and add that host to SSRF_ALLOWED_HOSTS, because private addresses are blocked by default.

Where to start

  • opencart_guide explains the data model and costs nothing. opencart_get_shop_overview returns the language, store and currency ids and how much data there is.
  • Sales: opencart_list_order_statuses first, then opencart_sales_summary and opencart_top_products with the status ids that count as sales; opencart_list_orders and opencart_get_order for single orders.
  • Catalogue: opencart_search_products, opencart_get_product, opencart_list_product_specials, opencart_low_stock, opencart_products_missing_content, opencart_list_categories.
  • Customers and service: opencart_list_customers, opencart_get_customer, opencart_list_returns, opencart_list_reviews.
  • Marketing and set-up: opencart_list_coupons, opencart_list_seo_urls, opencart_list_extensions.
  • Anything else: opencart_list_tables, opencart_describe_table and opencart_query.

Data notes

  • An order with order_status_id 0 is a checkout that was never completed. The fixed tools leave those out. Which statuses are sales is the shop's choice: pass them as status_ids. Without it, every order with a status counts, cancelled and refunded ones too.
  • Order totals include tax and shipping and are in the shop's default currency. Line prices on an order are without tax.
  • Texts exist once per language. Tools take language_id; 0 means the shop's first active language.
  • Dates are in the shop server's local time. Date filters take YYYY-MM-DD and include both days.
  • Lists return 50 to 200 rows per call; page with limit and offset. Any result stops at 1000 rows and any statement at 60 seconds.
  • Version differences are handled by the fixed tools where possible: SKU and the other product codes left the product table in OpenCart 4.1.0.4, sale prices moved into the discount table in 4.1, SEO URLs changed columns in 4.0. opencart_list_product_specials needs OpenCart 3.x or 4.0.
  • Stock kept per option value (size, colour) is not in the stock tools; read product_option_value with opencart_query.
  • The standard order table has no index on date or customer, so reports over many years read the whole table. Keep date ranges reasonable on shops with hundreds of thousands of orders.

Not included

  • No writes: prices, stock, order statuses and content cannot be changed. OpenCart keeps derived data in several tables and caches (order history, stock, SEO URLs, the admin's own events), so a direct database write can leave the shop inconsistent, and writes would need a database user with more than SELECT.
  • Blocked on purpose, also in opencart_query: admin users, API keys and sessions, customer sign-in attempts and tokens, IP logs and the setting table, which holds the mail password and the payment providers' keys. Passwords, tokens and IP addresses are never selected by the fixed tools. The customer table still contains password hashes: name the columns you need in opencart_query and never use SELECT * there.
  • Files, images, themes, caches and anything outside the database.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in ChatGPT

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

ChatGPT adds MCP servers as plugins on its Plugins page, on the web and on paid plans. Developer mode is no longer needed. In a Business workspace only admins and owners can add one; in Enterprise and Edu an admin can grant the Create plugins with MCPs permission.

  1. Go to chatgpt.com/plugins, click Add, then Add custom MCP server.
  2. Enter a name, e.g. Name: OpenCart.
  3. Under Connection, enter the Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID and keep Authentication on OAuth.
  4. Select I understand and want to continue, then Create as a plugin. When ChatGPT asks, sign in to AnythingMCP and allow access.
  5. Install the new plugin from your personal plugins, then type @ in a chat and pick it.

Available tools

ToolWhat it does
opencart_guideHow the OpenCart database is organised: orders and which statuses count as sales, totals and currencies, products and stock, customers…
opencart_get_shop_overviewThe ids every other tool needs, in one call: languages (id, code, name, status), currencies (code, title, status; value is the exchange…
opencart_list_order_statusesOrder statuses with their id, name and the number of orders in each. Use the ids as status_ids in the order tools and decide with the shop…
opencart_list_ordersOrders, newest first: order_id, date_added, status, customer_id (0 = guest), customer name and e-mail as given at checkout, total (incl.…
opencart_get_orderOne order in full, as rows with a section column. order: customer name (name), status (detail), total, date, customer_id, e-mail, phone…
opencart_sales_summarySales per day or per month for a date range: period, number of orders, revenue (sum of the order totals incl. tax and shipping, in the…
opencart_top_productsBest-selling products in a date range, by units sold or by revenue: product_id, name and model as written on the orders, quantity, revenue…
opencart_search_productsFind products by part of their name, model or SKU, or by exact product_id: product_id, name, model, sku, price (base price without tax)…
opencart_get_productOne product in full, as rows with a section column. product: name, model, sku, base price without tax, quantity in stock, status (1 =…
opencart_list_product_specialsSale prices (specials) on OpenCart 3.x and 4.0: product_id, name, model, regular price, special price, customer_group_id, priority and the…
opencart_low_stockProducts whose stock is at or below a threshold, lowest first: product_id, name, model, quantity, the label shown when out of stock…
opencart_products_missing_contentProducts with gaps in their content, for one language: product_id, name, model, status and four flags (1 = missing): missing_image (no main…
opencart_list_customersCustomer accounts: customer_id, name, e-mail, phone, customer group, status (1 = enabled), newsletter (1 = subscribed), store_id…
opencart_get_customerOne customer account, as rows with a section column. customer: name, e-mail, phone, customer group, status (1 = enabled), newsletter…
opencart_list_categoriesThe category tree: category_id, parent_id (0 = top level), name, path (the names from the top level down, joined with " > "), status (1 =…
opencart_list_couponsDiscount coupons, newest first: coupon_id, name, code, type (P = percent, F = fixed amount), discount, minimum order total, logged (1 =…
opencart_list_returnsProduct returns, newest first: return_id, order_id, date_added, date_ordered, customer_id, customer name and e-mail, product_id, product…
opencart_list_reviewsProduct reviews, newest first: review_id, product_id and product name, author, customer_id (0 = guest), rating (1 to 5), the text, status…
opencart_list_seo_urlsSEO URL keywords: seo_url_id, store_id, language_id, keyword (the readable part of the address) and target (what it points to, e.g.…
opencart_list_extensionsInstalled extensions: type (payment, shipping, total, module, theme, analytics, captcha, fraud, feed, report, dashboard and others) and…
opencart_list_tablesThe shop's tables: full table_name (what to write in opencart_query), name (without the shop's prefix), approximate row count and size in…
opencart_describe_tableThe columns of one table: column_name, column_type, is_nullable, column_key (PRI = primary key, MUL = indexed) and column_default. Read it…
opencart_queryRun one read-only SQL SELECT on the shop database and get up to 1000 rows, for questions the other tools do not answer. Write full table…

Example prompts

  • "What were my OpenCart sales per day last week, counting only completed orders?"
  • "Which 10 products sold best in October, by revenue?"
  • "Which products have fewer than 5 units in stock?"
  • "Which products have no description or no image yet?"
  • "Show the open returns and the latest one-star reviews."

FAQ

How does it connect to my shop? It reads the shop's own MySQL or MariaDB database with a user that may only SELECT. The database must be reachable from the AnythingMCP server: on Cloud, allow its outbound address under Remote MySQL; a self-hosted AnythingMCP next to the shop uses the internal database host.

Can it change orders or products? No. Every tool is read-only SQL, and a database user with SELECT only makes that certain. No tool installs switched off because none writes. OpenCart's own API is not used.

Which OpenCart versions does it support? OpenCart 3.0, 4.0 and 4.1 and forks such as ocStore. Enter the table prefix from config.php (almost always oc_).

Does the free ChatGPT plan work with custom MCP servers? OpenAI documents custom MCP servers for paid plans only; the Free plan is not on its list.

Next steps

Was this guide helpful?

Connect OpenCart to ChatGPT in 2 minutes

Start a free trial on AnythingMCP Cloud, connect OpenCart in the guided setup, then add your MCP URL to ChatGPT. No code and no server to run.

Related guides

Connectors

Connect OpenCart to Claude via MCP: Sales and Stock

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

Connectors

Connect OpenCart to Microsoft Copilot via MCP

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

Connectors

Connect OpenCart to Cursor via MCP: Products and Stock

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

Connectors

Connect OpenCart to Gemini CLI via MCP

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

Connectors

Connect OpenCart to Meta Muse via MCP

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.

Connectors

OpenCart MCP Server: Sales, Products and Stock

Ask questions about an OpenCart shop from its own MySQL database, read-only: orders and sales per day, best-selling products, stock and missing content, customers, categories, coupons, returns, reviews and SEO URLs. OpenCart 3 and 4. A database user with SELECT only.