Shopee MCP
Provides tools for interacting with the Shopee Open Platform shop-level API, enabling management of shops, orders, order income, logistics tracking, products, product models, returns/refunds, inventory, pricing, order notes, and cancellations. It also supports exploring and calling read or write Shopee API endpoints, with read-only or read+write access controls.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Shopee MCPshow my Shopee orders from the last 7 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Shopee MCP
A ready-to-deploy remote MCP server for the Shopee Open Platform that lets
Claude, Cursor, VS Code and other MCP clients work with a Shopee shop. It's built on
@congminh1254/shopee-sdk and runs on Vercel + Supabase.
Both have free tiers that are enough for this demo.
Sellers open your deployment, choose read-only or read + write access, sign in with Shopee, and get an API key for their MCP client:
Seller ──► your-app.vercel.app ──► Shopee login ──► /api/auth/callback ──► API key smcp_… (shown once)
Claude / Cursor ──(Authorization: Bearer smcp_…)──► /api/mcp ──► Shopee API v2Fork it for your own Shopee app. You need your own Shopee partner app, a Supabase project and a Vercel account. Setup takes about 15 minutes; see Quick start.
Features
Multiple regions: Global (SG, MY, TH, VN, PH, ID, TW, MX, CO, CL, PL…), Brazil, China (CNSC), and both sandboxes.
Multiple shops: one key covers a shop, or every shop under a Shopee main account.
Read-only or read + write keys, chosen by the seller. Write tools are hidden from read-only keys, and write calls from them are rejected on the server.
The whole shop-level API: 344 endpoints reachable via
search_endpoints→describe_endpoint→call_read_endpoint/call_write_endpoint, plus task-specific tools for everyday work.Automatic Shopee token refresh, with tokens stored per shop in Supabase.
Audit log of every Shopee call.
Stateless Streamable HTTP, so it runs as a normal serverless function.
Tools
Tool | Access | What it does |
| read | Shops on this key, shop profile |
| read | Orders in a time window, full order data |
| read | Escrow breakdown: fees, commission, payout |
| read | Logistics tracking history |
| read | Items, base info, variations |
| read | Return/refund requests |
| read | Explore the API catalog |
| read | Any read endpoint |
| write | Inventory and pricing |
| write | Order actions |
| write | Any other endpoint |
Write tools are marked destructiveHint, so clients ask for confirmation before running them.
Related MCP server: Amazon Seller MCP
Quick start
You need:
A Shopee partner app from open.shopee.com. A sandbox app is fine to start with.
A Supabase project.
A Vercel account.
Node.js 20+ for local setup.
The detailed setup guide has every step and a troubleshooting table.
Option A: deploy to Vercel
Fork or "Use this template" to get your own copy of this repo.
Create the database. In your Supabase project, open the SQL Editor, paste
supabase/migrations/0001_init.sqland run it.Deploy. In Vercel choose Add New → Project and import your copy. Set these environment variables:
Variable
Where to find it
SHOPEE_PARTNER_ID,SHOPEE_PARTNER_KEYShopee console → your app
SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEYSupabase → Project Settings → API
For a sandbox-only setup, use
SHOPEE_PARTNER_ID_TEST_GLOBAL/SHOPEE_PARTNER_KEY_TEST_GLOBALinstead (see regions).Or use the button. It works once your copy is public; replace the repo URL with your own:
Register the redirect domain. In the Shopee console, set your app's redirect URL domain to the Vercel production domain, e.g.
shopee-mcp-yourname.vercel.app.Connect a shop. Open the deployment, pick a region and access level, sign in, and copy the key.
Option B: run locally
git clone https://github.com/<you>/shopee-mcp && cd shopee-mcp
npm install
npm run setup # asks for your credentials, writes .env.local, creates tables, runs checks
npm run dev # http://localhost:3000npm run setup can create the tables if you give it the Supabase Session pooler connection
string. Otherwise run the SQL by hand as in step 2 above. npm run doctor re-checks everything at any
time: env vars, Supabase tables, and whether Shopee accepts your partner credentials for each region.
Shopee only redirects to the domain registered in the console. To finish the sign-in flow locally,
expose the dev server through a tunnel (e.g. cloudflared tunnel --url http://localhost:3000),
register that domain, and set APP_URL to it.
Connect an MCP client
The success page shows these snippets with your real URL and key.
Claude Code
claude mcp add --transport http shopee https://your-app.vercel.app/api/mcp \
--header "Authorization: Bearer smcp_…"Cursor, VS Code and other clients with a JSON config
{
"mcpServers": {
"shopee": {
"type": "http",
"url": "https://your-app.vercel.app/api/mcp",
"headers": { "Authorization": "Bearer smcp_…" }
}
}
}MCP Inspector: run npx @modelcontextprotocol/inspector, choose Streamable HTTP, enter the URL, and add the
Authorization header.
Revoke a key:
curl -X POST https://your-app.vercel.app/api/keys/revoke -H "Authorization: Bearer smcp_…"
Regions and credentials
Region on the connect page | API host | Credentials used |
Global | partner.shopeemobile.com |
|
Brazil | openplatform.shopee.com.br |
|
China (CNSC) | openplatform.shopee.cn |
|
Sandbox (Global) | openplatform.sandbox.test-stable.shopee.sg |
|
Sandbox (China) | openplatform.test-stable.shopee.cn |
|
A region-specific variable (e.g. SHOPEE_PARTNER_KEY_TEST_GLOBAL) wins over the shared
SHOPEE_PARTNER_ID / SHOPEE_PARTNER_KEY. A region only appears on the connect page when it has
credentials, so set only the regions you actually support. See .env.example for all
variables.
Scripts
Command | |
| Interactive first-time setup: writes |
| Checks env vars, Supabase tables and Shopee credentials per region |
| Applies |
| Next.js |
| End-to-end tests (Supabase and Shopee faked at the |
| TypeScript |
| Regenerates the endpoint catalog from the latest SDK |
Project layout
src/app/page.tsx Connect page (region + access level)
src/app/api/auth/start/route.ts Saves the choice, redirects to Shopee
src/app/api/auth/callback/route.ts Exchanges the code, stores tokens, shows the API key
src/app/api/mcp/route.ts MCP endpoint (Streamable HTTP, stateless)
src/app/api/keys/revoke/route.ts Revokes a key
src/lib/mcp-server.ts Tools, access checks, audit logging
src/lib/shopee.ts ShopeeSDK factory + Supabase-backed TokenStorage
src/lib/api-keys.ts Key generation, hashing, verification
src/lib/catalog.generated.ts All shop-level endpoints (generated)
supabase/migrations/ Database schema
scripts/ setup, doctor, db:migrate, gen:catalog
test/mcp.test.ts End-to-end testsCustomizing
Add a tool. Register it in src/lib/mcp-server.ts and route the call through callEndpoint, so the
shop and access checks and the audit log apply automatically:
server.registerTool(
"get_shop_performance",
{
title: "Get shop performance",
description: "Shop performance metrics (late shipment rate, ratings, …).",
inputSchema: { shop_id: shopIdArg },
annotations: ro,
},
safe(async ({ shop_id }) => callEndpoint("account_health.get_shop_performance", shop_id, {}))
);Read or write access is decided by the endpoint's entry in the catalog, not by the tool.
Upgrade the SDK. Run npm i @congminh1254/shopee-sdk@latest && npm run gen:catalog to pick up new endpoints.
Change the read/write rule. An endpoint counts as read when its name starts with get_, search_,
check_, query_, list_, view_ or download_; everything else is write. The rule is in
scripts/build-catalog.ts.
Only endpoints whose spec type is Shop are exposed. Partner-, merchant- and user-level endpoints
(e.g. public.get_shops_by_partner) are excluded, because they could reveal shops a key wasn't issued for.
Limitations
This is a demo. Before running it for real sellers, consider:
Token encryption. Shopee tokens are stored in plain text, so encrypt them, e.g. with Supabase Vault or AES-GCM.
Concurrent refreshes. Two requests for the same shop can both refresh an expired token. Add a row lock.
Rate limiting. There is none per key or shop.
File uploads. Endpoints that take files (
media.*, invoice uploads) can't receive binary data as JSON tool arguments.OAuth-only clients. Clients like claude.ai custom connectors can't send an API key header and would need an OAuth layer in front of
/api/mcp.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Managed Amazon Seller Central and Ads access for OAuth-capable MCP clients.
Discover, plan and run tools across your connected business systems through one OAuth MCP endpoint
Managed MCP gateway with OAuth, per-agent permissions, shared accounts and activity logs.
Unified MCP server for 70+ eCommerce platforms: products, orders, customers, and more.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables managing Ozon Seller and Performance APIs through MCP, covering products, stocks, prices, orders, finance, analytics, advertising, reviews, and chat operations.MIT
- AlicenseAqualityAmaintenanceEnables managing Amazon seller listings, orders, pricing, inventory, and reports through the SP-API via MCP tools.158 npm3MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to access Amazon Selling Partner and Advertising APIs for orders, inventory, pricing, ads, reports, and related read paths.MIT

PurchasePlus MCPofficial
AlicenseNot gradedqualityAmaintenanceEnables MCP-capable clients to sign in with OAuth and perform purchaser tasks such as browsing catalogues, checking inventory, managing stocktakes and recipes, drafting requisitions, updating buy lists, exporting reports, and processing invoices. It also supports supplier access for listing and inspecting connections, catalogues, products, purchase orders, invoices, and entitled reports.MIT