Skip to main content
SH

Shopee

v0.2.0-alpha.2API 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

What your agent can do

Shopee gives your agent 22 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • 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).
Example call
// 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", { /* ... */ });

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

Run `npx -y @codespar/mcp-shopee` and add the config block above to your MCP client — Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Shopee — MCP server · 22 tools | CodeSpar