AliExpress Affiliate MCP
Provides tools for AliExpress affiliate workflows: searching products and hot products, retrieving product details, generating and refreshing affiliate links, resolving short links, listing promotions and promotion products, listing categories, and listing orders with estimated commissions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
AliExpress Affiliate MCP
AliExpressのアフィリエイトAPIを、Claude・ChatGPTなどMCPに対応したAIから直接使うためのリモートMCPサーバーです。Cloudflare Workers上で動き、OAuth 2.1とパスワードで認証します。
構成
Claude / ChatGPT(カスタムコネクタ)
│ Streamable HTTP + OAuth 2.1(PKCE・動的クライアント登録)
▼
Cloudflare Worker aliexpress-affiliate-mcp
├─ /authorize ……… パスワード入力+接続許可の画面(src/auth.ts)
├─ /oauth/* ………… トークン発行・登録(workers-oauth-provider)
├─ /mcp ………………… MCPツール群(src/tools.ts)
└─ KV: OAUTH_KV …… トークン(ハッシュ化して保存)・ログイン失敗回数
│ HMAC-SHA256で署名したリクエスト(src/aliexpress.ts)
▼
AliExpress Open Platform https://api-sg.aliexpress.com/syncApp Secretはサーバーの外に出ません(Workerのシークレットにだけ置きます)。第三者のMCPサービスにキーを預ける必要もありません。
結果は必要な項目に絞ったJSONで返すので、AIが消費するトークンを抑えられます。
Related MCP server: E-Commerce MCP Server
ツール一覧
ツール | 使うAPI | 用途 |
| productdetail.get / link.generate | 記事内のAliExpressリンク(短縮リンク可)をまとめて渡すと、現在の価格・割引・クーポン・販売状況を調べ、新しいアフィリエイトリンクを返す。過去記事の更新用 |
| product.query | キーワード・カテゴリ・価格帯・売れ筋順で商品を検索 |
| hotproduct.query | ホット商品(高コミッション)を検索 |
| productdetail.get | 商品ID・URL(最大50件)の詳細とアフィリエイトリンク |
| link.generate | 商品・キャンペーン・ストアのURLをアフィリエイトリンクに変換 |
| (APIなし) | 短縮リンクを展開して商品IDを取り出す |
| featuredpromo.get | 開催中の特集・キャンペーン一覧 |
| featuredpromo.products.get | キャンペーン対象の商品 |
| category.get | カテゴリIDの一覧(名前で絞り込み可) |
| order.list | 期間内の注文と見込み報酬、その合計 |
既定値は通貨JPY、言語JA、配送先JPです(wrangler.jsonc の vars で変えられます)。ツールごとに currency / language / ship_to を指定して上書きすることもできます。
事前準備(AliExpress側)
AliExpress Open Platform に登録し、開発者タイプで Affiliate (individual) を選んで審査を受けます。
アプリを作成し、App Key と App Secret を控えます。
アフィリエイトポータル(portals.aliexpress.com)で、使う Tracking ID を確認します。既存のものを使うか、MCP用に新しく作ると成果を分けて見られます。
デプロイ手順
git clone https://github.com/AndroPlus-org/aliexpress-affiliate-mcp.git
cd aliexpress-affiliate-mcp
npm install
# 1) トークン保存用のKVを作成し、表示されたidを wrangler.jsonc の OAUTH_KV に書く
npx wrangler kv namespace create OAUTH_KV
# 2) シークレットを登録
npx wrangler secret put ALIEXPRESS_APP_KEY
npx wrangler secret put ALIEXPRESS_APP_SECRET
npx wrangler secret put ALIEXPRESS_TRACKING_ID
npx wrangler secret put LOGIN_PASSWORD # 接続時に入力するパスワード(長めのランダム文字列を推奨)
# 3) 1回デプロイして表示されたURLを確認 → wrangler.jsonc の PUBLIC_URL に書いて、もう一度デプロイ
npx wrangler deploy
npx wrangler deployPUBLIC_URL は https://aliexpress-affiliate-mcp.<サブドメイン>.workers.dev のような、Workerの公開URLです。末尾に / は付けません。OAuthのトークンはこのURL宛てに発行されるので、ここが間違っていると接続できません。
Claude / ChatGPT への追加
claude.ai:設定 → コネクタ → カスタムコネクタを追加 → URLに
https://…workers.dev/mcpを入力 → 開いた画面でLOGIN_PASSWORDを入れて「許可する」。ChatGPT:開発者モードを有効にし、コネクタにURLを追加します。認証は同じくOAuthです。
使い方の例
「この記事のAliExpressリンクを全部
refresh_linksで確認して、価格とクーポンが変わっている箇所を一覧にして」 → ブログ(WordPressなど)のMCPやコネクタで本文を取得 → このMCPで最新化 → 差分を確認してから記事を更新、という流れで使えます。「
list_promotionsで今のキャンペーンを出して、ガジェット系の対象商品を割引率順に10件」「先月(PST基準)の注文を
list_ordersで集計して、報酬が多かった商品トップ5」
ローカルでの確認
cp .dev.vars.example .dev.vars # 値を入れる。PUBLIC_URL=http://localhost:8787
npm run dev # http://localhost:8787/mcp
npm test # 署名・URL解析・レスポンス整形のテスト
npm run typecheck注意点・本番で確認すること
デプロイしたら、最初に
list_categoriesを呼んで疎通を確認してください。hot_products(hotproduct.query)は、アプリにこのAPIの権限がないとInsufficientPermissionになります。必要ならOpen Platformで権限を申請してください。list_ordersの金額はAPIがセント単位で返すため、通貨単位(通常USD)に直して返しています。価格フィルタ(
min_price/max_price)は表示通貨の単位で指定します。APIへは通貨の最小単位(USDならセント、JPYなら円)に直して送っています。絞り込みはAPI側の基準価格(セール前の価格など)で行われるようで、返ってくる
price(セール後の価格)が指定範囲から外れることがあります。例:2000〜3000円の指定で、セール前2838円・セール後1618円の商品や、3490円の商品が返りました。厳密な範囲が必要な場合は、結果のpriceで絞り直してください。
refresh_linksとresolve_urlで短縮リンクを展開すると、リンク先へのアクセスが1回発生します。成果には影響しませんが、クリック数に計上される可能性があります。list_ordersの期間は、AliExpress側の太平洋時間で解釈されます。ログインに15分間で10回失敗すると、そのIPからの試行をロックします。
ファイル構成
src/index.ts OAuthProviderとルーティング
src/auth.ts /authorize(パスワード+接続許可)
src/tools.ts MCPツールの定義
src/aliexpress.ts APIクライアント(署名・呼び出し・整形)
src/urls.ts 短縮リンクの展開と商品IDの抽出
test/ vitestのテスト
wrangler.jsonc Workerの設定(KV・vars)使用ライブラリ:agents(createMcpHandler)、@modelcontextprotocol/server v2、@cloudflare/workers-oauth-provider 1.x、zod v4
ライセンス
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Remote MCP server for AI.TV creators — delegate account operations to your AI agent over MCP.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to search products and generate affiliate links across European and global affiliate networks, automating product discovery and link creation for monetization.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage products, shopping carts, and orders in an online store through a well-defined MCP API.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to search products across affiliate networks, compare commissions, find arbitrage opportunities, and get auto-injected affiliate links via MCP.-
- AlicenseAqualityDmaintenanceEnables AI agents to automate the full affiliate e-commerce workflow across Shopee and TikTok Shop, including product hunting, seller auditing, review mining, and generating video storyboards and VideoFactory projects. It provides nine MCP tools for search, intelligence extraction, database queries, and system health checks.92MIT