Mcp Shopee

io.github.codespar由 GitHub 账号 codespar 发布v0.2.0-alpha.3更新于 Nov 10, 2026

MCP server for Shopee — LatAm marketplace Partner API v2 (orders, products, shipping, returns)

已验证STDIO仅桌面效率与工作流商业与电商

概览

AI 生成的概览

让助手通过 Shopee 合作伙伴 API v2 管理卖家店铺:订单、商品、物流、退货、促销和买家聊天。

可以做什么
把 Shopee 开放平台合作伙伴 API v2 封装为 22 个工具,涵盖店铺信息、订单列表与详情、发货安排、取消订单、物流单号和面单 PDF。还支持商品管理(列表、详情、新建、更新、删除、改库存和改价)、退货退款(列表、确认、接受买家方案)、店铺级折扣和捆绑促销,以及在卖家聊天中向买家发送文字或表情消息。
适用场景
适合经营 Shopee 店铺的卖家或代运营团队,让助手读取订单和商品数据、调整库存或价格、安排发货、处理退货请求或起草买家消息。主要面向拉美市场的电商运营;README 提到可与另一个 Mercado Libre 服务器配合,供同时在两个平台销售的商家使用。
运行要求
通过 npm 包 @codespar/mcp-shopee 以 stdio 方式在本地运行(需要 Node.js);另有 HTTP 模式用于服务端到服务端测试。需要 Shopee 开放平台应用凭据:SHOPEE_PARTNER_ID、SHOPEE_PARTNER_KEY、SHOPEE_SHOP_ID 和 SHOPEE_ACCESS_TOKEN,以及可选的 SHOPEE_ENV 用于选择沙箱或生产环境。access_token 来自 Shopee 的商家授权 OAuth 流程,每 4 小时过期;用 refresh_token 刷新不在本服务器范围内。需要能访问 Shopee 的 API 端点。
安装前请注意
需要密钥 SHOPEE_PARTNER_KEY 和 SHOPEE_ACCESS_TOKEN,它们用于签名和授权每个请求,请勿写入日志或共享配置。多个工具会改动真实店铺数据:ship_order、cancel_order、update_product_stock、update_product_price、add_item、update_item、delete_item、confirm_return、accept_return_offer、add_discount、add_bundle_deal 和 send_chat_message 都会作用于线上店铺,部分操作难以撤销。README 提示该包为 alpha 版本,部分端点载荷(尤其是 ship_order 的取件/投递对象和物流渠道细节)在生产使用前应对照 Shopee 最新文档核实。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Shopee,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@codespar/mcp-shopee

MCP server for Shopee — the Shopee Open Platform Partner API v2.

Shopee is one of the two marketplaces where LatAm merchants concentrate the bulk of their online GMV (dominant in Brazil, rapidly expanding across the region). Paired with @codespar/mcp-mercadolibre, this package gives agents full reach across LatAm's major ecommerce marketplaces — each has its own seller ecosystem, so merchants typically operate on both.

Tools (22)

ToolPurpose
get_shop_infoGet basic information about the authorized Shopee shop (shop_name, region, status, auth expiry).
list_ordersList orders within a time window, optionally filtered by order_status.
get_order_detailGet full detail for one or more orders by order_sn (comma-separated, up to 50).
ship_orderArrange shipment for an order — either request pickup, drop off, or pass a tracking number depending on the...
cancel_orderCancel an order that has not yet shipped.
list_productsList items (products) in the shop with optional status filter.
get_product_detailGet detailed base info for up to 50 items by item_id.
update_product_stockUpdate stock levels for an item (or its models/variants).
update_product_priceUpdate prices for an item (or its models/variants).
get_shipment_listList orders currently in shipment (status SHIPPED or in-transit).
get_return_listList return/refund requests on the shop, optionally filtered by status and time window.
confirm_returnConfirm (accept) a buyer-initiated return request by return_sn.
add_itemCreate a new product (item) in the shop.
update_itemUpdate an existing product.
delete_itemDelete an item (product) from the shop by item_id.
get_shipping_parameterFetch the required shipping parameters for an order before calling ship_order.
get_tracking_numberGet the tracking number (and courier info when available) for a shipped order.
download_shipping_documentRequest the shipping label / air waybill PDF for one or more orders.
accept_return_offerAccept the buyer's return offer (proposed solution) for a return_sn, ending negotiation in the buyer's favor.
add_discountCreate a new shop-level discount (promotion) with a time window.
add_bundle_dealCreate a bundle-deal promotion (e.g.
send_chat_messageSend a text or sticker message to a buyer in Shopee's seller chat.

Install

bash
npm install @codespar/mcp-shopee@alpha

Environment

bash
SHOPEE_PARTNER_ID="2001234"        # partner_id (integer) from Shopee Open PlatformSHOPEE_PARTNER_KEY="..."           # partner_key (secret) for HMAC signingSHOPEE_ACCESS_TOKEN="..."          # merchant access_token (4h lifetime; refresh via refresh_token)SHOPEE_SHOP_ID="123456789"         # shop_id (integer) from authorization flowSHOPEE_ENV="production"            # or "sandbox"

Authentication

Shopee uses partner-signed requests. For shop-level endpoints the signature is:

base_string = partner_id + api_path + timestamp + access_token + shop_idsign        = hex(HMAC_SHA256(partner_key, base_string))

partner_id, timestamp, access_token, shop_id, and sign are attached as URL query parameters on every request. The signing helper (src/index.ts) handles this on each call.

The access_token is obtained via the merchant authorization OAuth flow on Shopee Open Platform; it expires every 4 hours. Refresh it using the refresh_token (30-day lifetime) — that exchange lives outside this MCP's scope, typically in a separate token-management service.

Run

bash
# stdio (default — for Claude Desktop, Cursor, etc)npx @codespar/mcp-shopee
# HTTP (server-to-server testing)MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-shopee

Base URLs

  • Production: https://partner.shopeemobile.com/api/v2
  • Sandbox: https://partner.test-stable.shopeemobile.com/api/v2

Select with SHOPEE_ENV.

Status

0.1.0-alpha.1 — Shopee's Partner API documentation portal requires developer registration, so some endpoint payloads and field-level contracts (especially around ship_order pickup/dropoff objects and logistics channel specifics) should be validated against the live docs before production use. The signing recipe and base-URL selection are implemented to spec.

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

来源:packages/ecommerce/shopee/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.0-alpha.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分