npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bintangtimurlangit/shopee-mcp

v0.1.1

Published

An MCP server for exploring Shopee — product search and prices via an authenticated browser session. Discovery only, no seller features.

Readme

shopee-mcp

npm license CI GitHub Repo

An MCP server for exploring Shopee — product search and prices — from any MCP client (Claude Desktop, Claude Code, etc.). Discovery only: no seller features.

Login required, read-only. Shopee blocks anonymous requests, so this unofficial server reads public data through your own logged-in browser session (see Why a browser?). It performs no seller or account actions.

Full reference: Documentation · Changelog: CHANGELOG.md · Versioning & releases: docs/RELEASES.md

Tools

| Tool | What it returns | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | search_products | Keyword search with sorting & pagination — names, prices, sold counts, ratings, seller location, product IDs, URLs. | | get_product_detail | One product — price & discount, brand, condition, category, rating, review count, sold count, stock, location, description. |

Tool annotations

Per the MCP annotations spec — both tools are read-only, with no side effects.

| Tool | Read-only | Idempotent | Destructive | | -------------------- | :-------: | :--------: | :---------: | | search_products | ✓ | ✓ | – | | get_product_detail | ✓ | ✓ | – |

Why a browser?

Shopee does not expose an open API or server-rendered product HTML. Its /api/v4/* endpoints are guarded by an anti-fraud gate (error 90309999) that requires per-request signature headers (af-ac-enc-dat, x-sap-sec, …) minted by Shopee's own obfuscated SDK. Plain fetch, headless Chromium, and even a hand-rolled fetch from inside the page all get rejected.

So this server:

  1. Drives CloakBrowser — a Chromium with binary-level fingerprint patches — against a persistent profile you log into once.
  2. Navigates to the real Shopee page and intercepts the response its own app fetches, so the request carries valid signatures.

The browser must run headed (Shopee detects headless); on a server use a virtual display (xvfb).

From npm (recommended)

npm install -g @bintangtimurlangit/shopee-mcp   # downloads the CloakBrowser binary (~200 MB, cached)

This puts two commands on your PATH: shopee-mcp (the server) and shopee-mcp-login (one-time login). Or run without installing: npx -y @bintangtimurlangit/shopee-mcp.

From source

git clone https://github.com/bintangtimurlangit/shopee-mcp.git
cd shopee-mcp
npm install          # also downloads the CloakBrowser binary (~200 MB, cached)
npm run build

1. Log in once

Shopee blocks anonymous requests, so you sign in one time. This saves a session to ~/.shopee-mcp/chrome-profile.

shopee-mcp-login     # global install — or, from a source checkout:  npm run login
  • Opens a CloakBrowser window — log in, then press Enter.
  • On a desktop / WSLg, the window appears normally.
  • Re-run only when the session expires.

2. Register with your MCP client

The server launches a headed browser, so it needs a display. On a headless machine, wrap it with xvfb-run.

Claude Desktop / Claude Code mcpServers entry:

{
  "mcpServers": {
    "shopee": {
      "command": "xvfb-run",
      "args": ["-a", "shopee-mcp"]
    }
  }
}

On a machine with a real display, drop xvfb-run: "command": "shopee-mcp", "args": []. From a source checkout, use "command": "node", "args": ["/absolute/path/to/shopee-mcp/build/index.js"] (wrapped in xvfb-run on a headless box).

Configuration

All optional — see .env.example. Copy to .env to override.

| Variable | Default | Purpose | | -------------------- | ------------------------------ | ------------------------------------ | | SHOPEE_DOMAIN | shopee.co.id | Regional Shopee domain. | | SHOPEE_PROFILE_DIR | ~/.shopee-mcp/chrome-profile | Where the saved login lives. | | SHOPEE_HEADLESS | false | Keep false — headless is detected. | | CACHE_TTL_MS | 30000 | In-memory cache lifetime. | | DEBUG | false | Log startup/debug info to stderr. |

Development

npm run lint         # eslint
npm run format       # prettier --write (format:check to verify)
npm run typecheck
npm test             # live smoke test (needs a display; use xvfb-run on servers)
npm run dev          # tsx watch

More detail: docs/DEVELOPMENT.md.

Troubleshooting

| Symptom | Likely cause / fix | | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | 🔒 Not signed in / anonymous-request errors | No/expired session → run npm run login. | | error 90309999 or empty results | Shopee's anti-bot gate rejected the request. Ensure you're logged in and running headed (or via xvfb-run); retry. | | A read returns empty for a valid product | Shopee lazy-loads; retry, and run with DEBUG=true to inspect. | | Empty or stale results right after a change | In-memory cache — lower CACHE_TTL_MS or wait for the TTL to expire. | | Headless / server has no display | Wrap the command in xvfb-run -a …. |

Caveats

  • Login required. No session → tools return a friendly "run npm run login" prompt.
  • Anti-bot is a moving target. The free CloakBrowser binary can go stale as Shopee updates detection; CloakBrowser Pro ships newer patches.
  • Respect Shopee's Terms of Service. This is for personal market exploration, not scraping at scale.

Contributing & security

CONTRIBUTING.md · SECURITY.md · Code of Conduct

License

MIT


Disclaimer

This is an unofficial project. It is not affiliated with, authorized, maintained, sponsored, or endorsed by Shopee or Sea Limited.

It works by driving a real logged-in browser session against Shopee's web app, which can change without notice — a tool may break when Shopee updates its site or anti-bot behavior. It reads only publicly available product data and performs no account actions.

You are responsible for using this software in compliance with Shopee's Terms of Service and applicable law. Use reasonable request volumes. All product names, logos, and brands are property of their respective owners.