Skip to main content
Glama
mcp-buy123-vendor

mcp-buy123-vendor

mcp-buy123-vendor

mcp-buy123-vendor is an open-source Model Context Protocol (MCP) server for the buy123 vendor portal. It gives AI clients such as Claude Desktop, Claude Code, and other MCP-compatible agents read-only tools for querying vendor operations data, including orders, returns, shipments, products, bundles, channels, inventory, permissions, and vendor profile records.

This project is useful when you want an AI assistant to inspect buy123 vendor data through structured MCP tools instead of manually browsing the vendor portal.

Legal prerequisite: This tool requires a legitimate vendor account on the buy123 platform. You must hold a valid vendor identity and comply with the platform's terms of service. Unauthorized access is not supported.

Unofficial project: This repository is community-maintained and is not an official product of, or endorsed by, buy123.

Traditional Chinese documentation is available in README.zh-TW.md.

Highlights

  • MCP server for buy123 vendor portal data access

  • Read-only query tools for vendor operations workflows

  • Claude Desktop and Claude Code compatible local MCP configuration

  • Interactive on-demand login flow with local token storage

  • Offline unit test suite for safe local development

Related MCP server: flin-google-ads-mcp

Provided Tools

59 AI-callable tools — all query-only. Every tool returns the upstream API response envelope: { success, msg, data, pagination? }.

General Enumerations (no login required — 14 tools)

list_banks, list_bundle_types, list_bundle_delivery_notes, list_bundle_delivery_statuses, list_delivery_types, list_packaging_types, list_invoice_types, list_product_statuses, list_event_product_statuses, list_gross_profit_statuses, list_review_statuses, list_announcement_notify_levels, list_announcement_notify_scopes, list_announcement_notify_types

Query Tools (login required — 45 tools)

Category

Tools

User info

get_current_user, get_my_menu

Abnormal orders

list_abnormal_orders

Returns

list_returns, list_uncollected_cvs_returns

Bundles

list_bundles, get_bundle, list_bundle_items, get_bundle_item, list_pricing_channels

Channels

list_channels, list_channel_products

Inventory

list_item_option_inventories

Shipments

list_shipments, list_cvs_shipment_details, list_home_delivery_shipment_details

Permission management

list_vendor_actions, list_vendor_roles, list_vendor_role_actions

Vendor management

get_vendor, get_vendor_profile, list_vendor_attachments, list_vendor_categories, check_vendor_tax_number, get_vendor_return_address, list_vendor_store_pickup_return_dc, list_vendor_store_pickup_return_mode, list_vendor_store_pickups, get_vendor_store_pickup, list_vendor_users, check_vendor_user_email

Product management

list_item_selection, list_items, get_item, list_item_history, list_item_options, list_item_options_selection, list_products, get_product, list_product_annotation_logs, list_product_bundle_prices, list_product_bundles, list_product_versions, list_commodity_categories, get_template_category_form

Not Supported

  • Write operations (POST / PUT / DELETE)

  • Attachment preview or download

  • Excel or other binary file downloads

  • Shipping label printing

Usage

Requirements

  • Python 3.10+

  • A legitimate vendor account on the buy123 platform

Install

git clone https://github.com/asgard-ai-platform/mcp-buy123-vendor.git
cd mcp-buy123-vendor

python3 -m venv .venv
./.venv/bin/pip install -e .

cp .env.example .env
# Edit .env and fill in your vendor credentials

Run as an MCP Server

./.venv/bin/python mcp_server.py

Claude Desktop Configuration

Edit ~/Library/Application Support/Claude/claude_desktop_config.json and replace <PROJECT_DIR> with the absolute path to this project:

{
  "mcpServers": {
    "buy123-vendor": {
      "command": "<PROJECT_DIR>/.venv/bin/python",
      "args": ["<PROJECT_DIR>/mcp_server.py"]
    }
  }
}

Restart Claude Desktop. The buy123-vendor server should appear as running under Settings → Developer.

Claude Code CLI

A .mcp.json is included at the project root. Running claude from this directory will pick it up automatically.

Authentication

The server uses on-demand login. When a query requires authentication and no valid token is cached, the MCP client will be prompted to complete the login flow interactively. A desktop environment (windowed display) is required for the login step.

Development

Install Dev Dependencies

./.venv/bin/pip install -e '.[dev]'

Run Tests

Tests run offline and do not require a real API connection:

./.venv/bin/python -m pytest tests/

Integration tests that require a live API connection are opt-in and must be triggered manually after configuring valid credentials in .env.

Environment Variables

See .env.example for all configurable fields. The authentication token is managed automatically by the login flow and does not need to be set manually.

License

See LICENSE.

Available Tools

61 tools
auth_statusA

Report whether the MCP currently has a usable vendor access token.

Call this before other tools if you're unsure whether login is needed. Does NOT hit the upstream API — purely a local cache check.

Inputs: no named parameters.

check_vendor_tax_numberA

檢查統編是否存在 (GET /v1/vendors/check-tax-number/{tax_number}).

Inputs: tax_number (required).

check_vendor_user_emailB

檢查使用者 Email 是否存在 (GET /v1/vendors/check-vendor-user-email/{email}).

Inputs: email (required).

get_bundleB

檢視指定方案 (GET /v1/bundles/{bundle_id}).

Inputs: bundle_id (required).

get_bundle_itemA

取得單一方案商品選項 (GET /v1/bundles/{bundle_id}/items/{item_id}).

Inputs: item_id (required), bundle_id (required), item_version, bundle_version.

get_current_userA

取得目前登入供應商使用者的資訊 (GET /v1/auth/me).

Inputs: no named parameters.

get_itemA

取得商品詳細資訊 (GET /v1/items/{id}).

Inputs: id (required).

get_my_menuC

取得供應商使用者選單 (GET /v1/auth/me/menu).

Inputs: mock.

get_productB

取得商品 (GET /v1/products/{product_id}).

Inputs: product_id (required), version.

get_template_category_formB

取得最新版的分類題組表單 (GET /v1/vendors/commodities/template-category-form/{category_id}).

Inputs: category_id (required).

get_vendorB

取得廠商資訊 (GET /v1/vendors).

Inputs: no named parameters.

get_vendor_profileB

取得廠商基本資料 (GET /v1/vendors/profile).

Inputs: no named parameters.

get_vendor_return_addressC

取得廠商退貨地址 (GET /v1/vendors/return-address).

Inputs: no named parameters.

get_vendor_store_pickupB

獲取供應商超商取貨申請 (GET /v1/vendors/store-pickups/{store_type}).

Inputs: store_type (required).

list_abnormal_ordersC

列出異常訂單 (GET /v1/abnormal-orders).

Inputs: page, size, type, order_id, +3 more.

list_announcement_notify_levelsA

獲取公告通知等級列表 (GET /v1/common/announcement-notify-level).

Inputs: no named parameters.

list_announcement_notify_scopesA

獲取公告通知範圍列表 (GET /v1/common/announcement-notify-scope).

Inputs: no named parameters.

list_announcement_notify_typesB

獲取公告通知類型列表 (GET /v1/common/announcement-notify-type).

Inputs: no named parameters.

list_banksB

獲取銀行列表 (GET /v1/common/banks).

Inputs: no named parameters.

list_bundle_delivery_notesA

獲取方案出貨備註列表 (GET /v1/common/bundle-delivery-note).

Inputs: no named parameters.

list_bundle_delivery_statusesA

獲取方案出貨狀態列表 (GET /v1/common/bundle-delivery-status).

Inputs: no named parameters.

list_bundle_itemsC

取得方案商品選項列表 (GET /v1/bundles/{bundle_id}/items).

Inputs: bundle_id (required), bundle_version.

list_bundlesC

取得商品方案列表 (GET /v1/bundles).

Inputs: name, page, page_size, sort_field, +2 more.

list_bundle_typesA

獲取方案類型列表 (GET /v1/common/bundle-type).

Inputs: no named parameters.

list_channel_productsC

渠道商品列表 (GET /v1/channel-products).

Inputs: page, size, keyword, channel_id, +4 more.

list_channelsC

渠道列表 (GET /v1/channels).

Inputs: page, size, status, sort_field, +2 more.

list_commodity_categoriesC

取得商品類別選單 (GET /v1/vendors/commodities/categories).

Inputs: layer, limit, parent_id.

list_cvs_shipment_detailsC

超取出貨明細列表 (GET /v1/shipments/cvs/details).

Inputs: delivery_type (required), page, limit, end_date, +5 more.

list_delivery_typesA

獲取出貨方式列表 (GET /v1/common/delivery-type).

Inputs: no named parameters.

list_event_product_statusesB

獲取活動商品狀態列表 (GET /v1/common/event-product-status).

Inputs: no named parameters.

list_gross_profit_statusesB

獲取毛利狀態列表 (GET /v1/common/gross-profit-status).

Inputs: no named parameters.

list_home_delivery_shipment_detailsC

宅配出貨明細列表 (GET /v1/shipments/home-delivery/details).

Inputs: page, size, is_shipped, product_id, +1 more.

list_invoice_typesA

獲取發票類型列表 (GET /v1/common/invoice-type).

Inputs: no named parameters.

list_item_historyB

取得商品歷史紀錄 (GET /v1/items/{id}/history).

Inputs: id (required), page, limit, sort_field, +1 more.

list_item_option_inventoriesB

取得商品選項庫存列表 (GET /v1/item-option-inventories).

Inputs: page, sort, limit, order, +6 more.

list_item_optionsC

取得商品選項列表 (GET /v1/items/{id}/options).

Inputs: id (required), page, limit, sort_field, +1 more.

list_item_options_selectionC

取得商品選項選擇列表 (GET /v1/items/{id}/options-selection).

Inputs: id (required), keyword.

list_itemsB

取得商品列表 (GET /v1/items).

Inputs: upc, page, sort, limit, +4 more.

list_item_selectionA

取得商品選擇列表 (GET /v1/item-selection) — 只包含審核通過的商品,供方案選擇商品用。

Inputs: is_gift, keyword, item_ids.

list_packaging_typesB

獲取包材類型列表 (GET /v1/common/packaging-type).

Inputs: no named parameters.

list_pricing_channelsA

取得方案價格渠道列表 (GET /v1/bundles/pricing-channels).

Inputs: no named parameters.

list_product_annotation_logsA

取得商品註解紀錄列表 (GET /v1/products/{product_id}/annotation-logs).

Inputs: product_id (required), product_version (required), page, sort, +2 more.

list_product_bundle_pricesB

取得商品方案渠道價錢列表 (GET /v1/products/{product_id}/bundle-prices).

Inputs: channel_id (required), product_id (required), product_version, bundle_pricing_ids.

list_product_bundlesB

取得商品方案列表 (GET /v1/products/{product_id}/bundles).

Inputs: product_id (required), product_version.

list_productsC

取得商品列表 (GET /v1/products).

Inputs: page, sort, limit, order, +5 more.

list_product_statusesB

獲取商品狀態列表 (GET /v1/common/product-status).

Inputs: no named parameters.

list_product_versionsA

取得商品版本列表 (GET /v1/products/{product_id}/versions).

Inputs: product_id (required).

list_returnsD

退貨大表 (GET /v1/returns).

Inputs: page, size, order_id, product_id, +3 more.

list_review_statusesA

獲取審核狀態列表 (GET /v1/common/review-status).

Inputs: no named parameters.

list_shipmentsC

廠商出貨列表 (GET /v1/shipments).

Inputs: delivery_type (required), page, size, end_date, +5 more.

list_uncollected_cvs_returnsC

超商未取退回大表 (GET /v1/uncollected-cvs-returns).

Inputs: page, size, cvs_type, end_date, +4 more.

list_vendor_actionsB

取得廠商權限列表 (GET /v1/vendors/actions).

Inputs: no named parameters.

list_vendor_attachmentsA

取得廠商上傳文件列表 (GET /v1/vendors/attachments).

檔案本體下載屬於 binary endpoint,Phase 1 未實作。

Inputs: no named parameters.

list_vendor_categoriesB

取得廠商分類列表 (GET /v1/vendors/categories).

Inputs: no named parameters.

list_vendor_role_actionsC

取得廠商角色權限 (GET /v1/vendors/roles/actions).

Inputs: role_id (required).

list_vendor_rolesC

取得廠商角色列表 (GET /v1/vendors/roles).

Inputs: page, limit.

list_vendor_store_pickup_return_dcB

獲取供應商超商退貨 DC (GET /v1/vendors/store-pickup-return-dc).

Inputs: no named parameters.

list_vendor_store_pickup_return_modeB

獲取供應商超商取貨退貨方式 (GET /v1/vendors/store-pickup-return-mode).

Inputs: store_type.

list_vendor_store_pickupsC

獲取超商取貨申請資料 (GET /v1/vendors/store-pickups).

Inputs: type (required), store_type (required).

list_vendor_usersC

取得廠商使用者列表 (GET /v1/vendors/users).

Inputs: name, page, sort, limit, +1 more.

vendor_loginA

Open a real Chromium window so the user can log in to the vendor frontend.

Use this when:

  • auth_status reports authenticated=false

  • Another tool has returned a "No vendor access token" / "token refresh failed" error

Flow:

  1. A Chromium window opens at the vendor frontend.

  2. Email / password / vendor_id are best-effort prefilled from env.

  3. The user solves the reCAPTCHA and clicks submit themselves.

  4. This tool captures the POST /v1/auth/login response, updates the in-memory cache, and writes VENDOR_ACCESS_TOKEN / VENDOR_REFRESH_TOKEN back to .env so future MCP restarts are also authenticated.

Blocks until the user completes the login (up to 10 minutes) or aborts.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.6/5.0

    Scored across 61 tools

    Disambiguation2/5

    Many tools have overlapping names and concepts, such as list_product_bundles vs list_bundles, list_items vs list_products, and multiple similar list_* endpoints for different resource types. An agent can easily confuse which list to call for a given purpose.

    Naming Consistency4/5

    The naming convention is mostly consistent with snake_case and verb_noun pattern (list_*, get_*, check_*). Minor exceptions like auth_status and vendor_login deviate slightly but remain readable and predictable.

    Tool Count2/5

    With 61 tools, the server is heavily over-scoped for most use cases. Many tools simply list enum values or static configurations, which bloats the tool surface and increases selection complexity.

    Completeness2/5

    The toolset is almost entirely read-only (list/get/check), lacking create, update, or delete operations for core entities like products, bundles, and vendors. This creates dead ends for management workflows and limits the server's practical utility.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A read-only MCP server for SimpleShop accounting data, enabling AI agents to find documents, download PDFs, inspect products, and review sales exports.
      5
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Read-only MCP server for Google Ads, enabling querying campaigns, ad groups, ads, insights, and keywords without create/update/delete operations.
      17
      166 PyPI
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A read-only MCP server that lets AI assistants answer Shopify store operations questions via tools like get_shop, list_products, get_product, and list_orders.
      4
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      A secure, read-only MCP server that enables AI assistants to inspect transactions, vendor performance, wallet balances, and analytics through validated REST API calls.
      19
      -