Shopee

Finance and commerce

MCP server for Shopee, LatAm marketplace Partner API v2 (orders, products, shipping, returns).

Your AI app calls the Shopee MCP server, which does the finance and commerce work and sends the result back to the chat.

About Shopee

Shopee is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for Shopee, LatAm marketplace Partner API v2 (orders, products, shipping, returns).

Shopee runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-shopee@0.2.0-alpha.3 and talks to it over standard input and output. It needs SHOPEE_PARTNER_ID, SHOPEE_PARTNER_KEY, SHOPEE_ACCESS_TOKEN and SHOPEE_SHOP_ID set before Shopee starts.

Shopee is listed in the official MCP registry as io.github.codespar/mcp-shopee, version 0.2.0-alpha.3.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-shopee
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-shopee

How to set up Shopee

  1. Install Node.js on the machine that runs your AI app, because Shopee starts with npx and downloads its package on first run.
  2. Create SHOPEE_PARTNER_ID, SHOPEE_PARTNER_KEY, SHOPEE_ACCESS_TOKEN and SHOPEE_SHOP_ID for Shopee in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Shopee to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Shopee tools to confirm the connection.
  5. Run one read-only task with Shopee first, and keep your app asking before each tool call until the results look right.

Shopee compared with similar servers

  • Shopify by codespar has fewer GitHub stars than Shopee (278 against 278); both are community servers, and both run locally.
  • Santander by codespar has fewer GitHub stars than Shopee (278 against 278); both are community servers, and both run locally.
  • Sicoob by codespar has fewer GitHub stars than Shopee (278 against 278); both are community servers, and both run locally.

Before you connect Shopee

  • Give Shopee its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Shopee tool call until you trust what it does with them.
  • Treat text that Shopee fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Shopee on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Shopee

How marketing and sales teams put Shopee to work, by company size. Pick the size closest to yours and start Shopee on one use case.

Small business

  • A small business can ask Shopee which products and customers drive margin, then plan promotions around them.
  • Owners can use Shopee to check refunds, failed payments and churn reasons without opening three dashboards.
  • Shopee runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Shopee to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Shopee to check spend against budget each week and move money to what's working.
  • Start Shopee on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Shopee read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Shopee to answer revenue questions by channel and region with figures finance signs off on.
  • Shopee is a community server, so have security review the code and pin a version before Shopee touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Shopee README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-shopee

MCP server for Shopee, the Shopee Open Platform Partner API v2.

Shopee is one of the two marketplaces where LatAm merchants concentrate the bulk of their online GMV (dominant in Brazil, rapidly expanding across the region). Paired with @codespar/mcp-mercadolibre, this package gives agents full reach across LatAm's major ecommerce marketplaces, each has its own seller ecosystem, so merchants typically operate on both.

Tools (22)

Tool Purpose
get_shop_info Get basic information about the authorized Shopee shop (shop_name, region, status, auth expiry).
list_orders List orders within a time window, optionally filtered by order_status.
get_order_detail Get full detail for one or more orders by order_sn (comma-separated, up to 50).
ship_order Arrange shipment for an order, either request pickup, drop off, or pass a tracking number depending on the...
cancel_order Cancel an order that has not yet shipped.
list_products List items (products) in the shop with optional status filter.
get_product_detail Get detailed base info for up to 50 items by item_id.
update_product_stock Update stock levels for an item (or its models/variants).
update_product_price Update prices for an item (or its models/variants).
get_shipment_list List orders currently in shipment (status SHIPPED or in-transit).
get_return_list List return/refund requests on the shop, optionally filtered by status and time window.
confirm_return Confirm (accept) a buyer-initiated return request by return_sn.
add_item Create a new product (item) in the shop.
update_item Update an existing product.
delete_item Delete an item (product) from the shop by item_id.
get_shipping_parameter Fetch the required shipping parameters for an order before calling ship_order.
get_tracking_number Get the tracking number (and courier info when available) for a shipped order.
download_shipping_document Request the shipping label / air waybill PDF for one or more orders.
accept_return_offer Accept the buyer's return offer (proposed solution) for a return_sn, ending negotiation in the buyer's favor.
add_discount Create a new shop-level discount (promotion) with a time window.
add_bundle_deal Create a bundle-deal promotion (e.g.
send_chat_message Send a text or sticker message to a buyer in Shopee's seller chat.

Install

npm install @codespar/mcp-shopee@alpha

Environment

SHOPEE_PARTNER_ID="2001234"        # partner_id (integer) from Shopee Open Platform
SHOPEE_PARTNER_KEY="..."           # partner_key (secret) for HMAC signing
SHOPEE_ACCESS_TOKEN="..."          # merchant access_token (4h lifetime; refresh via refresh_token)
SHOPEE_SHOP_ID="123456789"         # shop_id (integer) from authorization flow
SHOPEE_ENV="production"            # or "sandbox"

Authentication

Shopee uses partner-signed requests. For shop-level endpoints the signature is:

base_string = partner_id + api_path + timestamp + access_token + shop_id
sign        = hex(HMAC_SHA256(partner_key, base_string))

partner_id, timestamp, access_token, shop_id, and sign are attached as URL query parameters on every request. The signing helper (src/index.ts) handles this on each call.

The access_token is obtained via the merchant authorization OAuth flow on Shopee Open Platform; it expires every 4 hours. Refresh it using the refresh_token (30-day lifetime), that exchange lives outside this MCP's scope, typically in a separate token-management service.

Run

# stdio (default, for Claude Desktop, Cursor, etc)
npx @codespar/mcp-shopee

# HTTP (server-to-server testing)
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-shopee

Base URLs

  • Production: https://partner.shopeemobile.com/api/v2
  • Sandbox: https://partner.test-stable.shopeemobile.com/api/v2

Select with SHOPEE_ENV.

Status

0.1.0-alpha.1, Shopee's Partner API documentation portal requires developer registration, so some endpoint payloads and field-level contracts (especially around ship_order pickup/dropoff objects and logistics channel specifics) should be validated against the live docs before production use. The signing recipe and base-URL selection are implemented to spec.

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Questions about Shopee

What is the Shopee MCP server?

MCP server for Shopee, LatAm marketplace Partner API v2 (orders, products, shipping, returns). Shopee is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Shopee MCP server?

Add Shopee to your AI app's MCP config with the command npx -y @codespar/mcp-shopee@0.2.0-alpha.3. In Claude Code, run claude mcp add --transport stdio codespar-shopee -- npx -y @codespar/mcp-shopee@0.2.0-alpha.3. To run Shopee this way you need Node.js installed.

Does Shopee need an API key?

Yes. Shopee expects SHOPEE_PARTNER_ID, SHOPEE_PARTNER_KEY, SHOPEE_ACCESS_TOKEN and SHOPEE_SHOP_ID to be set. Create the key for Shopee in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Shopee an official MCP server?

No. Shopee is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Shopee access to company data.

What license is Shopee under?

Shopee is released under the MIT license, according to its GitHub repository. The license covers the code of Shopee; the service it connects to has its own terms.