Skip to main content
SH

Shopee

v0.2.0-alpha.2API Keyalpha

API de partner de marketplace de LatAm — gigante en BR, creciendo en otros lados. Pedidos, productos, devoluciones. Combina con Mercado Libre para alcance total de marketplace. Alpha en npm — recipe de firma vía refs de SDK.

22 herramientas5 env vars🌎 LATAMalpha — validación pendiente

Qué puede hacer tu agente

Shopee le da a tu agente 22 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • 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. Time window cannot exceed 15 days. Returns order_sn list which can be fed into get_order_detail.
  • get_order_detailGet full detail for one or more orders by order_sn (comma-separated, up to 50).
Ejemplo de llamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("get_shop_info", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-shopee@alpha

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "shopee": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-shopee@alpha"
      ],
      "env": {
        "SHOPEE_PARTNER_ID": "<your_shopee_partner_id>",
        "SHOPEE_PARTNER_KEY": "<your_shopee_partner_key>",
        "SHOPEE_ACCESS_TOKEN": "<your_shopee_access_token>",
        "SHOPEE_SHOP_ID": "<your_shopee_shop_id>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 22 herramientas de abajo — probá get_shop_info primero.

Variables de entorno · 5

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

SHOPEE_PARTNER_ID
obligatorio

Shopee Open Platform partner_id (integer) assigned when the app is registered.

SHOPEE_PARTNER_KEY
obligatoriosecret

Shopee partner_key used as the secret for HMAC-SHA256 request signing.

SHOPEE_ACCESS_TOKEN
obligatoriosecret

Merchant access_token obtained via the shop authorization OAuth flow (expires every 4 hours; refresh via refresh_token).

SHOPEE_SHOP_ID
obligatorio

Shop identifier (integer) returned after merchant authorization.

SHOPEE_ENV
opcional

Environment: 'sandbox' uses partner.test-stable.shopeemobile.com, 'production' (default) uses partner.shopeemobile.com.

Herramientas disponibles · 22

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

READget_shop_info
Get basic information about the authorized Shopee shop (shop_name, region, status, auth expiry).
READlist_orders
List orders within a time window, optionally filtered by order_status. Time window cannot exceed 15 days. Returns order_sn list which can be fed into get_order_detail.
READget_order_detail
Get full detail for one or more orders by order_sn (comma-separated, up to 50).
READship_order
Arrange shipment for an order — either request pickup, drop off, or pass a tracking number depending on the logistics channel.
DELETEcancel_order
Cancel an order that has not yet shipped. Seller cancellations require a cancel_reason.
READlist_products
List items (products) in the shop with optional status filter. Returns item_id list which can be fed into get_product_detail.
READget_product_detail
Get detailed base info for up to 50 items by item_id.
WRITEupdate_product_stock
Update stock levels for an item (or its models/variants). Pass stock_list entries with model_id 0 for single-SKU items.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-shopee` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
Shopee — MCP server · 22 tools | CodeSpar