Skip to main content
SH

Shopee

v0.2.0-alpha.1API Keyalpha

LATAM marketplace partner API โ€” huge in BR, growing elsewhere. Orders, products, returns. Pairs with Mercado Libre for full marketplace reach. Alpha on npm โ€” signing recipe via SDK refs.

22 tools5 env vars๐ŸŒŽ LATAMalpha โ€” pending validation

Install

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

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

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>"
      }
    }
  }
}

After restart, your agent can call any of the 22 tools below โ€” try get_shop_info first.

Environment variables ยท 5

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

SHOPEE_PARTNER_ID
required

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

SHOPEE_PARTNER_KEY
requiredsecret

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

SHOPEE_ACCESS_TOKEN
requiredsecret

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

SHOPEE_SHOP_ID
required

Shop identifier (integer) returned after merchant authorization.

SHOPEE_ENV
optional

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

Available tools ยท 22

Each tool is independent โ€” your agent loads only what it needs to reduce context and response time.

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.

Compatible frameworks

MCP is a protocol โ€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets โ€” it receives scoped, short-lived session tokens.
Servers โ€” Every LatAm commerce API your agent needs | CodeSpar