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.
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
- 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:
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.CREATE USER 'amcp_reader'@'%' IDENTIFIED BY 'a-long-password'; GRANT SELECT ON shop_database.* TO 'amcp_reader'@'%'; - 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-addressis not127.0.0.1. - Fill in the connection. The values are in the shop's
config.php:DB_HOSTNAMEislocalhostthere; from outside use the shop's domain or the server's IP address asOPENCART_DB_HOST.DB_PORT(usually 3306) goes toOPENCART_DB_PORT,DB_DATABASEtoOPENCART_DB_NAME.OPENCART_DB_USERandOPENCART_DB_PASSWORDare the read-only user from step 1, notDB_USERNAME.DB_PREFIXgoes toOPENCART_DB_PREFIX. It is almost alwaysoc_. Leave the field empty only whenDB_PREFIXis 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_guideexplains the data model and costs nothing.opencart_get_shop_overviewreturns the language, store and currency ids and how much data there is.- Sales:
opencart_list_order_statusesfirst, thenopencart_sales_summaryandopencart_top_productswith the status ids that count as sales;opencart_list_ordersandopencart_get_orderfor 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_tableandopencart_query.
Data notes
- An order with
order_status_id0 is a checkout that was never completed. The fixed tools leave those out. Which statuses are sales is the shop's choice: pass them asstatus_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-DDand include both days. - Lists return 50 to 200 rows per call; page with
limitandoffset. 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_specialsneeds OpenCart 3.x or 4.0. - Stock kept per option value (size, colour) is not in the stock tools; read
product_option_valuewithopencart_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 thesettingtable, 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 inopencart_queryand never useSELECT *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 showsYOUR_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.
- Go to chatgpt.com/plugins, click Add, then Add custom MCP server.
- Enter a name, e.g. Name:
OpenCart. - Under Connection, enter the Server URL
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDand keep Authentication on OAuth. - Select I understand and want to continue, then Create as a plugin. When ChatGPT asks, sign in to AnythingMCP and allow access.
- Install the new plugin from your personal plugins, then type @ in a chat and pick it.
Available tools
| Tool | What it does |
|---|---|
opencart_guide | How the OpenCart database is organised: orders and which statuses count as sales, totals and currencies, products and stock, customers… |
opencart_get_shop_overview | The ids every other tool needs, in one call: languages (id, code, name, status), currencies (code, title, status; value is the exchange… |
opencart_list_order_statuses | Order 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_orders | Orders, newest first: order_id, date_added, status, customer_id (0 = guest), customer name and e-mail as given at checkout, total (incl.… |
opencart_get_order | One order in full, as rows with a section column. order: customer name (name), status (detail), total, date, customer_id, e-mail, phone… |
opencart_sales_summary | Sales 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_products | Best-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_products | Find 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_product | One 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_specials | Sale 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_stock | Products 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_content | Products with gaps in their content, for one language: product_id, name, model, status and four flags (1 = missing): missing_image (no main… |
opencart_list_customers | Customer accounts: customer_id, name, e-mail, phone, customer group, status (1 = enabled), newsletter (1 = subscribed), store_id… |
opencart_get_customer | One customer account, as rows with a section column. customer: name, e-mail, phone, customer group, status (1 = enabled), newsletter… |
opencart_list_categories | The category tree: category_id, parent_id (0 = top level), name, path (the names from the top level down, joined with " > "), status (1 =… |
opencart_list_coupons | Discount coupons, newest first: coupon_id, name, code, type (P = percent, F = fixed amount), discount, minimum order total, logged (1 =… |
opencart_list_returns | Product returns, newest first: return_id, order_id, date_added, date_ordered, customer_id, customer name and e-mail, product_id, product… |
opencart_list_reviews | Product 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_urls | SEO 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_extensions | Installed extensions: type (payment, shipping, total, module, theme, analytics, captcha, fraud, feed, report, dashboard and others) and… |
opencart_list_tables | The 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_table | The columns of one table: column_name, column_type, is_nullable, column_key (PRI = primary key, MUL = indexed) and column_default. Read it… |
opencart_query | Run 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
- Connector landing page
- Connect to Claude
- OpenCart Bridge connector: through the free extension, no database access needed
Was this guide helpful?