Skip to main content
Glama
Openworker E-Commerce MCP Server

Openworker E-Commerce MCP Server

Openworker E-Commerce MCP Server

MCP (Model Context Protocol) Server designed for use with Openworker to control Chrome or Microsoft Edge for managing products on major E-Commerce platforms, namely Shopee, TikTok Shop, and Lazada.


🚀 Project Overview

This system was developed to solve the problems of automated browser control by typical bots on Seller Center pages:

  1. Login via Real Session: Connects to a Chrome/Edge instance where the user is already logged in via Remote Debugging Port (9222), no need to log in again or deal with repeated OTP/2FA.

  2. Fast Updates via Internal API Interception: Retrieves Session Cookies/Tokens from the browser and sends update commands directly through the API. Fast and accurate, without relying solely on UI clicks.

  3. Safety Guard & Captcha Pause: Validates price and stock bounds before saving, and pauses when a Captcha is encountered so the user can unlock it immediately.


Related MCP server: camoufox-mcp

👥 Team & Development Roles

  • Jules (Google AI Agent): Develops TypeScript code, develops tools for each category (Browser Attach, Session Interceptor, API Client, Safety Guard), and performs Unit Tests.

  • Controller Agent (Cowork / GitHub Controller): Controls the project structure, reviews Code/PR, designs Task Issues, manages Tag Releases, and deploys to Openworker.


🛠️ Project Structure

openworker-ecommerce-mcp/
├── src/
│   ├── index.ts                # Entry point หลักของ MCP Server
│   ├── types.ts                # Type Definitions & Schemas
│   ├── services/
│   │   ├── cdp-connection.ts   # ตัวจัดการเชื่อมต่อ Chrome/Edge CDP (Port 9222)
│   │   ├── session-extractor.ts# ตัวดึง Auth Cookies / Bearer Tokens จาก Tab
│   │   └── api-client.ts       # Internal API Wrapper สำหรับ Shopee/TikTok/Lazada
│   └── tools/
│       ├── browser-profile.ts  # Tool: browser_attach_existing
│       ├── ecommerce-search.ts # Tool: ecommerce_product_search
│       ├── ecommerce-update.ts # Tool: ecommerce_update_price_stock
│       └── safety-guard.ts     # Tool: ecommerce_safety_guard
├── docs/
│   ├── ARCHITECTURE.md         # สถาปัตยกรรมและรายละเอียด Tool Contracts
│   └── TASKS.md                # รายการงานสำหรับการพัฒนาราย Phase
├── JULES_PROMPT.md             # ข้อแนะนำการสั่งงาน Jules (Google AI Agent)
├── package.json
└── tsconfig.json

💻 Launching Chrome / Edge for Connection

Before getting started, launch Chrome or Microsoft Edge with the Remote Debugging command:

Windows (Chrome):

"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="C:\ChromeAutomationProfile"

Windows (Edge):

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=9222 --user-data-dir="C:\EdgeAutomationProfile"

⚙️ Installation & Build

# ติดตั้ง dependencies
npm install

# Build TypeScript
npm run build

# ทดสอบรัน MCP Server
npm start

📄 License

MIT License - Developed by tukimtk-design


🚀 Phase 7 Features

Auto-Launch on Windows

If the CDP connection fails on Windows, the system will attempt to automatically launch Chrome/Edge with the correct remote debugging port to provide a seamless 1-click experience.

Playwright E2E Mocks

You can run the mocked E2E flows via:

npm test

Openworker Auto-Installer

Run the PowerShell script to build the project and generate the MCP config:

.\scripts\install-openworker-mcp.ps1

🚀 Phase 8 Features

Multi-Platform Stock Sync

Automatically synchronize stock and prices across Shopee, TikTok Shop, and Lazada. The system orchestrates safety bounds and logs operations.

Fuzzy Variant Matching

The system uses string similarity (Levenshtein Distance) to match product variants that are named differently across platforms, leveraging SQLite to cache successful matches for immediate future retrievals.


🚀 Phase 9 Features (Enterprise)

Docker & Headless Run

Deploy 24/7 on the cloud using the official Playwright Docker image with Xvfb:

docker-compose up -d

Visual DOM Self-Correction

Captures viewport screenshots and bounding boxes to allow AI to self-correct during unexpected DOM overlays.

Proxy Rotation

Supports rotating proxies for multi-account isolation.

Available Tools

32 tools
browser_attach_existingA

ตรวจสอบการเชื่อมต่อ Chrome/Edge บนพอร์ต 9222 และแสดงรายการ Tab ร้านค้า Shopee/TikTok/Lazada

Inputs: port.

browser_detect_challengeB

สแกนหา Captcha/OTP บน Tab ที่เปิดอยู่ และส่งสัญญาณแจ้งเตือนเมื่อต้องให้มนุษย์ปลดล็อกหน้าจอ

Inputs: platform (required).

ecommerce_audit_logC

บันทึกและเรียกดูประวัติการเปลี่ยนแปลงราคาสินค้าและสต็อกย้อนหลัง

Inputs: action (required), limit, productId.

ecommerce_autonomous_store_managerC

Background agent loop for autonomous store management

Inputs: action (required), intervalMs.

ecommerce_auto_reply_chatC

Fetch unread messages and auto-reply

Inputs: action (required), platform (required), messageId, replyText.

ecommerce_batch_update_price_stockB

อัปเดตราคาและสต็อกแบบหลายรายการพร้อมระบบชะลอความเร็วเพื่อป้องกันการโดน Rate-Limit

Inputs: items (required), platform (required).

ecommerce_cached_selector_mapD

Manage cached DOM selectors

Inputs: action (required), key, selectors.

ecommerce_clone_productC

Clone a product from a source URL to multiple target platforms

Inputs: sourceUrl (required), targetPlatforms (required), translationTemplate.

ecommerce_context_compressorC

Compress DOM to micro-JSON

Inputs: domString (required).

ecommerce_extract_sessionC

ดึง Cookies, CSRF Tokens และ Authorization Headers จาก Tab ร้านค้าที่เปิดอยู่

Inputs: platform (required).

ecommerce_fulfill_orderC

Trigger shipment arrangement

Inputs: orderId (required), platform (required), trackingProvider.

ecommerce_get_pending_ordersC

Query unfulfilled orders

Inputs: platform (required).

ecommerce_get_store_metricsB

ดึงข้อมูลสรุปออเดอร์ค้างจัดส่งและรายการ SKU ที่สต็อกกำลังหมด

Inputs: platform (required).

ecommerce_google_ads_integrationC

Integrate Google Ads Campaign Payload dispatcher and offline conversion tracking for platforms like CapsuleFill (lnwshop)

Inputs: action (required), platform (required), conversionData, campaignPayload.

ecommerce_hybrid_executorD

Hybrid API/CDP/Human execution

Inputs: taskDetails (required).

ecommerce_list_recipesA

List all available workflow recipes

Inputs: _dummy.

ecommerce_local_sqlite_cacheD

Local SQLite caching

Inputs: key (required), action (required), value.

ecommerce_m365_copilot_bridgeD

Bridge to Microsoft 365 Copilot Chat interface

Inputs: action (required), prompt.

ecommerce_manage_promotionsC

Query and update store Flash Sales and voucher campaigns

Inputs: action (required), platform (required), promoDetails.

ecommerce_match_variantsC

Fuzzy match product variants across platforms

Inputs: action (required), sourceName (required), candidates, targetCandidate.

ecommerce_ow_lnwshop_safe_seo_updaterC

Safe update for meta titles and keywords without disrupting live product layout.

Inputs: platform (required), productId (required), metaTitle, metaKeywords, +1 more.

ecommerce_run_recipeC

Run a predefined workflow recipe

Inputs: recipeId (required), params.

ecommerce_safety_guardC

ตรวจสอบความปลอดภัยและส่วนต่างของราคาสินค้าก่อนทำการอัปเดตบันทึกจริง

Inputs: currentPrice (required), proposedPrice (required), maxPriceDropPercent.

ecommerce_save_custom_recipeD

Save a custom macro recipe

Inputs: recipe (required).

ecommerce_seo_optimizerC

Fast HTML DOM parsing and rewriting to generate entity-based JSON-LD schemas and optimize on-page SEO

Inputs: htmlString (required), title, entityData, entityType, +1 more.

ecommerce_smart_diff_updateC

Calculate deltas between states

Inputs: targetState (required), currentState (required).

ecommerce_sync_multiplatform_stockC

Sync stock and prices across multiple platforms

Inputs: targets (required), sourcePlatform (required), sourceProductName (required), newPrice, +1 more.

ecommerce_sync_product_imagesC

Extract, re-format, and upload product gallery images across platforms

Inputs: productId (required), sourcePlatform (required), targetPlatforms (required).

ecommerce_token_telemetryD

Record token telemetry

Inputs: action (required), inputTokens, savedTokens, outputTokens.

ecommerce_update_price_stockC

ปรับเปลี่ยนราคาสินค้าและจำนวนสต็อก

Inputs: platform (required), productId (required), skuId, newPrice, +1 more.

ecommerce_visual_dom_analysisC

Capture viewport screenshots and bounding boxes for self-correction

Inputs: simulate.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.1/5.0

    Scored across 32 tools

    Disambiguation2/5

    Several tools have fuzzy boundaries: update_price_stock, batch_update_price_stock, and sync_multiplatform_stock all mutate price/stock with only scale/destination differences, while SEO optimizer and SEO updater overlap. Infrastructure tools like context_compressor, smart_diff_update, cached_selector_map, and hybrid_executor also lack clear functional separation.

    Naming Consistency2/5

    Most tools share an ecommerce_ prefix, but naming style is inconsistent: some are verb_noun (update_price_stock), some are noun-only (local_sqlite_cache, token_telemetry), and there are odd exceptions like browser_attach_existing and ecommerce_ow_lnwshop_safe_seo_updater. The mixed prefixes and inconsistent verb usage make the set feel unpatterned.

    Tool Count2/5

    32 tools is excessive for a coherent MCP surface. Many tools expose internal implementation details such as caching, token telemetry, context compression, and selector maps that should not be directly callable, making the set feel bloated rather than well-scoped.

    Completeness3/5

    The tool set covers a broad range of e-commerce operations including search, price/stock updates, orders, fulfillment, promotions, SEO, ads, and multi-platform sync. However, there are notable gaps such as no product deletion or full product CRUD, no order cancellation/refund flow, and limited promotion lifecycle management beyond flash sales/vouchers.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables browser automation and web scraping with multi-session management, supporting page navigation, element interaction, network request capture, and content extraction across multiple concurrent browser instances.
      11 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables browser automation with anti-detection features, including navigation, interaction, form filling, and session management.
      22
      10
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      Enables AI agents to drive your real, logged-in Chrome browser with existing sessions and cookies, bypassing CAPTCHA and anti-bot measures, with support for multi-session and human-in-the-loop workflows.
      40
      64
      MIT