mcp-shopee — Claude Code MCP server: what it does, how to install
Brings Shopee Partner API v2 to coding agents. It automates inventory updates, order tracking, returns processing, and chat communication.
claude mcp add --env SHOPEE_PARTNER_ID=<SHOPEE_PARTNER_ID> --env SHOPEE_PARTNER_KEY=<SHOPEE_PARTNER_KEY> --env SHOPEE_ACCESS_TOKEN=<SHOPEE_ACCESS_TOKEN> --env SHOPEE_SHOP_ID=<SHOPEE_SHOP_ID> --env SHOPEE_ENV=<SHOPEE_ENV> --transport stdio shopee -- npx -y @codespar/mcp-shopeeWhat mcp-shopee does
This server registers 22 tools targeting the Shopee Open Platform. It lets agents inspect orders in batches of up to 50 items, manage listing prices, and create new catalog entries. Tools also cover shipment documents, discount creation, and buyer messaging.
Requests require HMAC-SHA256 signatures, which the package calculates automatically before sending HTTP calls. Running the server requires your partner credentials, shop ID, and an active access token. Because merchant access tokens expire every 4 hours, token refresh via the 30-day token must run in an external background service.
The package is currently at 0.1.0-alpha.1. Checking delivery channel fields and ship_order payloads against current API documentation is necessary before processing live store dispatches.
What it helps with
- pull pending orders across custom time intervals
- adjust stock levels and item prices directly
- download air waybill PDF documents for shipping
- handle buyer return requests and approve resolutions
Example prompts for the agent
- Check recent unfulfilled orders from today
- Update the stock count for item 123456 to 25 units
- Fetch the air waybill PDF for order 240501ABC
How to install mcp-shopee
Platform CLI
claude mcp add --env SHOPEE_PARTNER_ID=<SHOPEE_PARTNER_ID> --env SHOPEE_PARTNER_KEY=<SHOPEE_PARTNER_KEY> --env SHOPEE_ACCESS_TOKEN=<SHOPEE_ACCESS_TOKEN> --env SHOPEE_SHOP_ID=<SHOPEE_SHOP_ID> --env SHOPEE_ENV=<SHOPEE_ENV> --transport stdio shopee -- npx -y @codespar/mcp-shopeeReplace <…> with your own values
Platform CLI
codex mcp add shopee --env SHOPEE_PARTNER_ID=<SHOPEE_PARTNER_ID> --env SHOPEE_PARTNER_KEY=<SHOPEE_PARTNER_KEY> --env SHOPEE_ACCESS_TOKEN=<SHOPEE_ACCESS_TOKEN> --env SHOPEE_SHOP_ID=<SHOPEE_SHOP_ID> --env SHOPEE_ENV=<SHOPEE_ENV> -- npx -y @codespar/mcp-shopeeReplace <…> with your own values
Config file
{
"mcpServers": {
"shopee": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-shopee"
],
"env": {
"SHOPEE_PARTNER_ID": "<SHOPEE_PARTNER_ID>",
"SHOPEE_PARTNER_KEY": "<SHOPEE_PARTNER_KEY>",
"SHOPEE_ACCESS_TOKEN": "<SHOPEE_ACCESS_TOKEN>",
"SHOPEE_SHOP_ID": "<SHOPEE_SHOP_ID>",
"SHOPEE_ENV": "<SHOPEE_ENV>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"shopee": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-shopee"
],
"env": {
"SHOPEE_PARTNER_ID": "<SHOPEE_PARTNER_ID>",
"SHOPEE_PARTNER_KEY": "<SHOPEE_PARTNER_KEY>",
"SHOPEE_ACCESS_TOKEN": "<SHOPEE_ACCESS_TOKEN>",
"SHOPEE_SHOP_ID": "<SHOPEE_SHOP_ID>",
"SHOPEE_ENV": "<SHOPEE_ENV>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e SHOPEE_PARTNER_ID=<SHOPEE_PARTNER_ID> -e SHOPEE_PARTNER_KEY=<SHOPEE_PARTNER_KEY> -e SHOPEE_ACCESS_TOKEN=<SHOPEE_ACCESS_TOKEN> -e SHOPEE_SHOP_ID=<SHOPEE_SHOP_ID> -e SHOPEE_ENV=<SHOPEE_ENV> shopee npx -y @codespar/mcp-shopeeReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-shopee
How to install mcp-shopee in Claude Code?
Run `claude mcp add mcp-shopee -e SHOPEE_PARTNER_ID=<SHOPEE_PARTNER_ID> -e SHOPEE_PARTNER_KEY=<SHOPEE_PARTNER_KEY> -e SHOPEE_ACCESS_TOKEN=<SHOPEE_ACCESS_TOKEN> -e SHOPEE_SHOP_ID=<SHOPEE_SHOP_ID> -- npx -y @codespar/mcp-shopee`.
What does mcp-shopee do?
It connects assistants to Shopee Partner API v2. The server exposes tools for handling listings, orders, shipments, seller chat, and buyer refunds.
How are API access tokens refreshed?
The server does not handle OAuth token renewal. You must refresh SHOPEE_ACCESS_TOKEN externally before its 4-hour validity window runs out.