🤖 Local Agent (MCP) Integration Guide
As the first third-party Alibaba.com browser AI extension supporting the standard Model Context Protocol (MCP), WaiMaoXia Local Agent (MCP) lets your local AI clients (Claude Desktop, Cursor, Antigravity, OpenAI Codex, Windsurf, etc.) query Alibaba.com store analytics, ad spend, product insights, market keywords, visitor/inquiry/CRM records, Scheduled Lead Daily Reports, and human-approved showcase optimization through 34 tools and 6 read-only resources—and runs seamlessly alongside Alibaba.com’s official Accio Work workspace (see WMXia × Accio Work Synergy Guide).
All Alibaba.com session cookies, store analytics, and customer records stay 100% on your machine between Chrome and your local AI client—never passing through any third-party relay server.

🎯 Prerequisites
- Extension: WaiMaoXia Chrome/Edge/360 extension
v1.6.14+signed in with an active AI VIP or Enterprise / Team Store plan. - Alibaba.com Session: Signed in to your Alibaba.com seller backend in the same browser.
- Node.js: Node.js ≥ 20.0.0 installed locally to run
@wmxia/mcp-bridge.
🚀 3-Step Quick Setup
Step 1: Generate a Token & Enable Local MCP
- Open the WaiMaoXia extension → Settings → Local Agent (MCP).
- Click Generate Token (creates a local
wmx_mcp_xxxxxxxxcredential; plaintext is shown once). - Select the business scopes you want to expose (only 3 read-only analytics/product/market scopes are enabled by default).
- Toggle Enable Local MCP Service on.
Step 2: Configure Your AI Client
Option A — One-Click AI Setup Prompt (Recommended)
Click Copy Auto-Setup Prompt for AI in the extension’s MCP settings page and paste it directly into Cursor, Antigravity, Claude Code, or Codex. Your AI assistant will install or upgrade @wmxia/mcp-bridge@latest, merge the MCP config (JSON or Codex TOML) without overwriting existing servers, and verify the connection automatically.
Option B — Manual Configuration
Install the bridge globally for instant local startup:
npm install -g @wmxia/mcp-bridge@latestwmx-mcp-bridge --versionMerge the following into your AI client’s MCP configuration (or use npx -y @wmxia/mcp-bridge@latest if you prefer not to install globally):
{ "mcpServers": { "wmx-alibaba": { "command": "wmx-mcp-bridge", "args": [], "env": { "WMX_MCP_TOKEN": "replace_with_your_wmx_mcp_token" } } }}Step 3: Reload & Verify
Reload or restart your AI client and try:
- “Check WaiMaoXia MCP bridge status and my active Alibaba.com store”
- “Summarize the last 7 days of store KPI trends, star rating health, and ad spend”
- “Show the latest Scheduled Lead Daily Report and highlight leads needing urgent follow-up”
- “Preview a showcase optimization plan for my hot and premium products”
🧩 7 Granular Permission Scopes (34 Tools & 6 Resources)
| Scope | Default | Capabilities | Controls |
|---|---|---|---|
read:analytics | Enabled | Store session status, KPI trends, star rating & product health, full diagnostic reports, GMV benchmark, supplier rankings, geo traffic, 7-day fulfillment alerts, and ad spend/campaign snapshots | Read-only |
read:product | Enabled | Tiered product listings (HOT, GOOD, POTENTIAL, NORMAL, LOW), item-level metrics, MOQ, SKU, keywords, peer benchmarks, and showcase slot overview | Read-only |
read:market | Enabled | Market supply overview, keyword demand & competition, store traffic terms, and category buyer insights | Read-only |
read:visitor | Opt-in | Paginated visitor logs and 30-day local visitor profile archive resource | Team No-Export |
read:inquiry | Opt-in | Inquiry inbox (≤30 days per query), cached inquiry & TM conversations, and 5 Scheduled Lead Daily Report tools (status, config, history & full body, trigger run, retry push) | Team No-Export |
read:crm | Opt-in | Paginated My Customers & Public Pool directory and individual CRM account profile & purchasing stats | Team No-Export |
write:showcase | Disabled | Two-step showcase replacement: dry-run preview (planId, valid 10 min) followed by human approval inside the extension within 90 seconds | Write · HITL |
Built-in Read-Only Resources (6 MCP Resources)
wmx://guide/playbook— Dynamic operational playbook matching your enabled scopeswmx://workspace/status— Account sign-in state, membership tier, export flag, and active store contextwmx://workspace/capabilities— Live catalog of authorized tools and resourceswmx://traffic/visitor-archives— 30-day local visitor profile summarywmx://leads/cached-conversations— Index of cached inquiry/TM conversation IDswmx://leads/daily-reports— Scheduled Lead Daily Report status and recent 7-run index
🛡️ Security & Risk Controls
- Localhost Loopback Only: Binds exclusively to
127.0.0.1(default port18765) with strictHostand Chrome extension Origin validation. - Challenge-Response Auth: Uses per-handshake random
nonce+HMAC-SHA256; tokens are stored hashed in the extension and can be rotated or revoked anytime. - Human-in-the-Loop Write Guard: Write tools such as
showcase_optimize_commitalways require explicit human approval in the extension UI within 90 seconds. - Anti-Leak & Quota Protection: Enforces Team
NO_EXPORTrestrictions, optional store-domain locking (expectedShopDomain), local + server daily quotas (default 500/day), automatic response sanitization, and a one-click kill switch in the extension popup.