Skip to main content
Glama

エージェントセッションの全体像

これは amazon-lyr を実行するエージェントとの実際の会話の一例です。隠されたステップはありません:

1. search_products("noise cancelling headphones", max_price=300, min_rating=4)
2. review_insights("B0X1234567")            # star spread + keyword themes
3. search_in_reviews("B0X1234567", query="broke")     # what actually breaks?
4. add_to_cart("B0X1234567", quantity=1)
5. checkout_preview()                        # totals + address + payment, nothing bought
6. place_order(confirm="PLACE_ORDER")       # only after the user said "buy it"
   ✓ order placed · #111-2223334-5556667
7. track_shipment("111-2223334-5556667")
8. initiate_return("111-2223334-5556667", reason="defective", asin_hint="…")
9. list_returns()                           # refund status confirmed

すべてのステップは型付きのMCPツール呼び出しです。購入ステップは誤って実行されないよう意図的に難しくしてあります — 安全モデル を参照してください。

Related MCP server: Amazon MCP Server

他と何が違うのか

APIキー不要

curl_cffi によるChrome TLS偽装でAmazon独自のWebエンドポイントと通信 — ブラウザと同じセッションを使用

ライフサイクル全体

スクレイピングだけではない:カート操作、ウィッシュリスト書き込み、確認応答解析付きチェックアウト、返品ウィザード、キャンセル

エージェント向けエラー

CAPTCHA、サインアウトリダイレクト、ソフトスロットルは、回復ヒント(possibly_throttled、手動フォールバックURL)付きの型付きエラーとして表示されます — 黙って不正なデータを返すことはありません

仕組み

browser cookies ──▶ AmazonClient (curl_cffi, captcha-aware)
                        │
                        ▼
              bs4 parsers ──▶ normalized dicts ──▶ 21 FastMCP tools
                                                   (readOnly / destructive annotations)

認証は自分のセッションを使用します:amazon-lyr loginobscura-core を介してChrome、Brave、Firefox、Edge、Zenからクッキーをインポートするか、明示的なJSONエクスポートからインポートします。読み取りにはログイントークンが必要です。カート、注文、返品、チェックアウトにはセッションコンテキストクッキーも必要です。

インストール

# Persistent install — uv tool (isolated; bootstraps uv on clean systems)
curl -sSL https://raw.githubusercontent.com/ishan-parihar/amazon-lyr/main/install.sh | bash

# Zero-install run without persistence:
uvx --from git+https://github.com/ishan-parihar/amazon-lyr amazon-lyr --version

その後、一度認証してサーブします:

amazon-lyr login --browser chrome            # or: --cookies-file cookies.json
amazon-lyr search "mechanical keyboard"      # shell works immediately
amazon-lyr serve                             # MCP server (stdio)
{
  "mcpServers": {
    "amazon": {
      "command": "amazon-lyr",
      "args": ["serve"]
    }
  }
}

ツール(21)

カテゴリ

ツール

検索

search_products(部門、価格帯、最低評価フィルター)

商品

get_productcompare_products(最大5つのASIN)

レビュー

get_reviewsreview_insightssearch_in_reviews

カート

add_to_cartview_cartupdate_cart_quantityremove_from_cart

ウィッシュリスト

add_to_wishlistget_wishlist

注文

get_ordersget_order_detailstrack_shipment

返品

list_returnsinitiate_return(わかりやすい理由コード)

購入

checkout_previewplace_order

危険ゾーン

cancel_order

セッション

get_session_status

安全モデル

お金の移動は正確に2つのゲートを通過します:

  1. セッションゲート — すべての変更操作には完全なログインクッキー(at-main + session-id/ubid-main)が必要です。読み取り専用セッションは、リクエストが行われる前に拒否されます。

  2. 同意ゲートplace_order は正確なリテラル confirm="PLACE_ORDER" が渡されない限り実行を拒否します。意図されたフローは:ユーザーにプレビュー → ユーザーが承認 → その後リテラルを渡す、です。cancel_orderinitiate_return も同様に破壊的/非冪等として注釈付けされ、エージェントフレームワークがそれに応じて扱います。

カード検証(OTP / 3-D Secure)はチェックアウト中に検出され、ブラウザの指示とともに needs_verification として報告されます — 推測で通過させることはありません。

制限事項

正直な上限。すべて誤ったデータではなく型付きエラーとして表示されます:

  • CAPTCHAの壁 — アカウント領域のページはカタログより厳格です。新しいクッキーを再インポートするか、待機してください(CaptchaError にヒントが含まれます)

  • ソフトスロットル — 3秒未満の間隔では黙って空のグリッドが返されます。疑わしい場合、レスポンスには possibly_throttled: true が含まれます

  • 地域別価格バリアント — 一部のバリアントは価格をクライアント側でレンダリングします。検索はテキストスキャンにフォールバックし、get_product が信頼できる情報源です

  • 同意なしの自動購入は不可 — 設計上の仕様です。チェックアウトには明示的なconfirmリテラルとユーザー承認が必要です

開発

git clone https://github.com/ishan-parihar/amazon-lyr && cd amazon-lyr
uv sync --extra dev
uv run ruff check . && uv run pytest -q

アーキテクチャのメモ、不変条件、リリースプロセスは AGENTS.md にあります。

ライセンス

MIT © Ishan Parihar

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with Amazon services through AI assistants, allowing users to search products, manage their cart, view order history, and place orders using natural language.
    7
    MIT
  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables scraping Amazon product details and searching for products on Amazon through natural language queries. No API keys required as it scrapes publicly available Amazon pages.
    10
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables users to search for products, retrieve details, and manage their shopping cart on Amazon through the MCP framework. It also supports viewing order history and provides a demonstration of ordering capabilities within AI interfaces.
    7
    42
    MIT

View all related MCP servers

Related MCP Connectors

  • Shopping MCP for AI agents: search, compare, Amazon buy links. Auto-register.

  • Agent-native product catalog for AI shopping agents. 296M+ products, 28 countries.

  • Amazon brand, seller, niche & buy-box intelligence inside your own Claude or ChatGPT.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ishan-parihar/amazon-lyr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server