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/tokopedia-mcp

v1.0.0

Published

A feature-rich MCP server for Tokopedia — search, product detail, shop info, orders, and wishlist

Readme

Tokopedia MCP

npm license GitHub Repo

A Model Context Protocol (MCP) server that connects AI assistants to Tokopedia — Indonesia’s marketplace — so they can search products, read details, inspect shops, and (with your session) manage orders and wishlists.

Languages: Bahasa Indonesia

Full reference: Documentation (install, configuration, MCP clients, development). Changelog: CHANGELOG.md. Versioning & releases: docs/RELEASES.md.


What you get

  • stdio transport — Works with Cursor, Claude Code, Claude Desktop, VS Code, and any MCP client that launches a local process.
  • Tokopedia GraphQL — Sensible defaults (headers, user agent, Indonesian locale).
  • In-memory caching — Short TTL for repeated lookups.
  • TypeScript + Zod — Validated tool inputs.
  • Clear errors — MCP text responses with hints for auth and rate limits.

Tools

Search and discovery

| Tool | Description | |------|-------------| | search_products | Keyword search with pagination (page, rows), sort (orderBy), condition, rating, price range, location filters. | | get_filters_and_sorts | Valid filter and sort options for a query — use before tightening search_products. |

Product and shop

| Tool | Description | |------|-------------| | get_product_detail | Full product page data: pricing, description, variants, stock, ratings, images. | | get_shop_info | Shop profile: badges (Gold/Official), stats, open hours, location, URLs. | | get_shop_products | Paginated catalog for a shop domain. |

Account (requires session cookies)

| Tool | Description | |------|-------------| | get_order_history | Orders with filters: status, date range (YYYY-MM-DD), category, search, pagination. | | get_wishlist | Saved products. | | add_to_wishlist | Add a product by ID. | | remove_from_wishlist | Remove items using wishlist IDs from get_wishlist. |

Search and product tools work without logging in. Orders and wishlist need browser cookies — copy them into env or .env as below.


Prerequisites

  • Node.js 18 or newer

Installation

From npm (recommended)

Package name: @bintangtimurlangit/tokopedia-mcp. The CLI on your PATH is still tokopedia-mcp.

npm install -g @bintangtimurlangit/tokopedia-mcp

Or run without a global install:

npx -y @bintangtimurlangit/tokopedia-mcp

Point your MCP client at tokopedia-mcp, or use npx with ["-y", "@bintangtimurlangit/tokopedia-mcp"] in args (see Configuration).

From source (this repository)

git clone https://github.com/bintangtimurlangit/tokopedia-mcp.git
cd tokopedia-mcp
npm install
npm run build

The repo does not commit build/; you must run npm run build after cloning before wiring MCP to build/index.js, or use npm start / npm link and the tokopedia-mcp command locally.

Configuration

Cookies → env

  1. Log in to tokopedia.com.
  2. Open DevTools (F12) → ApplicationCookieshttps://www.tokopedia.com.
  3. For each variable below, find the cookie name in the table (e.g. _SID_Tokopedia_) and copy its value into the matching TOKO_* key in your MCP env block (or in .env if you use an env file).

| Env key | Browser cookie name | |---------|----------------------| | TOKO_SID | _SID_Tokopedia_ | | TOKO_UUID_CAS | _UUID_CAS_ | | TOKO_USER_ID | tuid | | TOKO_DID | DID | | TOKO_DID_JS | DID_JS (optional) |

Minimum for orders/wishlist: TOKO_SID. Optional tuning: CACHE_TTL_MS (default 30000), DEBUG (true / false).

mcpServers example (all env keys)

Merge into your client’s config. Replace placeholders with your cookie values:

{
  "mcpServers": {
    "tokopedia": {
      "command": "npx",
      "args": ["-y", "@bintangtimurlangit/tokopedia-mcp"],
      "env": {
        "TOKO_SID": "paste_value_from_cookie__SID_Tokopedia_",
        "TOKO_UUID_CAS": "paste_value_from_cookie__UUID_CAS_",
        "TOKO_USER_ID": "paste_value_from_cookie_tuid",
        "TOKO_DID": "paste_value_from_cookie_DID",
        "TOKO_DID_JS": "paste_value_from_cookie_DID_JS",
        "CACHE_TTL_MS": "30000",
        "DEBUG": "false"
      }
    }
  }
}

Cursor, Claude Code, Claude Desktop, and other hosts use the same mcpServers shape — see docs/CONFIGURATION.md for global install, local node path, and client-specific file locations.


Example prompts

Once the server is wired to your assistant:

  • “Search Tokopedia for gaming laptops under Rp 15 million, sort by best seller.”
  • “Show product detail for this URL: …”
  • “What orders are still being shipped?”
  • “Add the product with ID … to my wishlist.”

Development

docs/DEVELOPMENT.md

Contributing & security

CONTRIBUTING.md · SECURITY.md · Code of Conduct

License

MIT


Legal

This project is an unofficial MCP bridge. It is not affiliated with or endorsed by Tokopedia or PT Tokopedia. Use it responsibly and in line with Tokopedia’s terms of service.