JA

justinritchie/aliexpress-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

18 stars 12 forks 品質 65 トレンド 26

読み取り専用 AliExpress MCP サーバー — 検索、製品の詳細、出荷見積もり。 署名された MTOP API 呼び出し (mtop.js のレプリケーション) を mcp-auth-bridge から Cookie で使用します.

概要

カナダの買い物客のためにAlipexの検索と製品詳細スクレイピングをラップするMCPサーバー - CADの価格は、バンクーバー、BCに出荷します。 設計によって読まれて下さい:それはプロダクト細部を捜し、出荷を点検します。 カートに追加、チェックアウト、または支払いを行います。 - search products(query, min rating, max price, sort by) — 公開卸売検索URLを検索し、埋め込まれたJSONを解析します。 - get product details(item id | url) — タイトル、価格、割引、評価、販売数、売り手、送料&ETA。 - get shipping estimate(item id) — 出荷コスト + ETA を構成国へ。 - view cart() — 署名されたmtop.aliexpress.trade.cart.renderエンドポイントを介して現在のカートコンテンツ。 読むだけ。 初期製品ページは、クライアント側レンダリングされたシェル(window. d c .isCSR = true、window.runParams = {})であり、JSが実行した後にAJAXから実際の製品データが読み込まれます。 そのため、HTMLスクレイピングはPDPデータでは動作しません。 代わりに、このサーバーはmtopをレプリカします.

概要(AI 翻訳)

カナダの買い物客のためにAlipexの検索と製品詳細スクレイピングをラップするMCPサーバー - CADの価格は、バンクーバー、BCに出荷します。

設計によって読まれて下さい:それはプロダクト細部を捜し、出荷を点検します。 カートに入れたり、チェックアウトしたり、支払いたりすることはできません。

ツール

  • [search_products(query, min_rating, max_price, sort_by) — 公開卸売検索URLを検索し、埋め込まれたJSONを解析します。
  • [[get_product_details(item_id | url)] — タイトル、価格、割引、評価、販売数、販売者、送料とETA。
  • [get_shipping_estimate(item_id) — 出荷コスト + ETA 設定された国へ。
  • [view_cart() — 署名された[mtop.aliexpress.trade.cart.render]エンドポイントを介して現在のカートのコンテンツ。 読むだけ。

使い方

初期製品ページは、クライアント側レンダリングされたシェル([window._d_c_.isCSR = true])、[[[window.runParams = {}])です。 — 本製品は、JSが実行した後に AliExpress の MTOP API から AJAX 経由で読み込みます。 そのため、HTMLスクレイピングはPDPデータでは動作しません。

代わりに、このサーバーは[mtop.js]がブラウザで何をするかをレプリカします。セッションの[_m_h5_tk]を使用して、署名された呼び出しをmtop.aliexpress.pdp.pc.queryにします。 署名アルゴリズム:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

AliExpress MCP Server

An MCP server that wraps AliExpress search and product detail scraping for a Canadian shopper — prices in CAD, shipping to Vancouver, BC.

Read-only by design: it searches, fetches product details, and checks shipping. It does not add to cart, check out, or pay.

Tools

  • search_products(query, min_rating, max_price, sort_by) — searches the public wholesale search URL and parses the embedded JSON.
  • get_product_details(item_id | url) — title, price, discount, rating, sold count, seller, shipping cost & ETA.
  • get_shipping_estimate(item_id) — shipping cost + ETA to the configured country.
  • view_cart() — current cart contents via the signed mtop.aliexpress.trade.cart.render endpoint. Read-only.

How it works

The initial product page is a client-side-rendered shell (window._d_c_.isCSR = true, window.runParams = {}) — real product data loads over AJAX from AliExpress’s MTOP API after the JS runs. So HTML scraping doesn’t work for PDP data.

Instead, this server replicates what mtop.js does in the browser: it makes signed calls to mtop.aliexpress.pdp.pc.query using the session’s _m_h5_tk cookie as the HMAC token. The signing algorithm:

sign = md5(token + "&" + t_ms + "&" + "12574478" + "&" + json_payload)

where token is the prefix of _m_h5_tk before the underscore, and 12574478 is AliExpress’s public web appKey. Token refresh on FAIL_SYS_TOKEN_EXPIRED is handled automatically.

Search still uses the simpler HTML path (embedded window.runParams JSON from the search SSR HTML) — no signed calls needed.

Setup

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Install the MCP Auth Bridge Chrome extension. The aliexpress entry is already in its sites.json.

  3. Open https://www.aliexpress.com, log in, then click Save AliExpress in the extension popup. This writes cookies to ~/.mcp-credentials/aliexpress.json.

  4. Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

    {
      "mcpServers": {
        "aliexpress": {
          "command": "python3",
          "args": ["/Users/YOUR_USER/justinritchie-mcp-servers/aliexpress-mcp-server/aliexpress_mcp_server.py"],
          "env": {
            "ALIEXPRESS_CREDENTIALS": "~/.mcp-credentials/aliexpress.json",
            "ALIEXPRESS_COUNTRY": "CA",
            "ALIEXPRESS_CURRENCY": "CAD"
          }
        }
      }
    }
    
  5. Restart Claude Desktop.

Known limitations

  • Low-volume / brand-new listings sometimes return empty MTOP responses (endpoint returns SUCCESS but an empty data block). Likely a region/visibility gate. Search results still show the listing fine.
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "aliexpress": { "command": "python3", "args": ["/Users/YOUR_USER/justinritchie-mcp-servers/aliexpress-mcp-server/aliexpress_mcp_server.py"], "env": { "ALIEXPRESS_CREDENTIALS": "~/.mcp-credentials/aliexpress.json", "ALIEXPRESS_COUNTRY": "CA", "ALIEXPRESS_CURRENCY": "CAD" } } } }