Skip to main content
SH

Shopee

v0.2.0-alpha.2API Keyalpha

API de parceiro de marketplace da LatAm — gigante no BR, crescendo em outros lugares. Pedidos, produtos, devoluções. Combina com o Mercado Libre pra alcance total de marketplace. Alpha no npm — recipe de assinatura via refs de SDK.

22 ferramentas5 env vars🌎 LATAMalpha — validação pendente

O que seu agente faz

O Shopee dá ao seu agente 22 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer 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).
Exemplo de chamada
// 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

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com 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>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 22 ferramentas abaixo — teste get_shop_info primeiro.

Variáveis de ambiente · 5

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

SHOPEE_PARTNER_ID
obrigatório

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

SHOPEE_PARTNER_KEY
obrigatóriosecret

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

SHOPEE_ACCESS_TOKEN
obrigatóriosecret

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

SHOPEE_SHOP_ID
obrigatório

Shop identifier (integer) returned after merchant authorization.

SHOPEE_ENV
opcional

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

Ferramentas disponíveis · 22

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

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 compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

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

Perguntas frequentes

Rode `npx -y @codespar/mcp-shopee` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
Shopee — MCP server · 22 tools | CodeSpar