@bintangtimurlangit/tokopedia-mcp
v1.0.0
Published
A feature-rich MCP server for Tokopedia — search, product detail, shop info, orders, and wishlist
Maintainers
Readme
Tokopedia MCP
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-mcpOr run without a global install:
npx -y @bintangtimurlangit/tokopedia-mcpPoint 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 buildThe 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
- Log in to tokopedia.com.
- Open DevTools (F12) → Application → Cookies →
https://www.tokopedia.com. - For each variable below, find the cookie name in the table (e.g.
_SID_Tokopedia_) and copy its value into the matchingTOKO_*key in your MCPenvblock (or in.envif 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
Contributing & security
CONTRIBUTING.md · SECURITY.md · Code of Conduct
License
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.
