
Alza Mcp
io.github.lukabudikv0.4.0更新於 Oct 7, 2026
Unofficial MCP server for Alza.cz: catalog search plus token-guarded account and checkout.
概覽
非官方 Alza.cz 購物伺服器,讓助理搜尋商品目錄、比較商品、尋找取貨點,並管理購物車與結帳。
- 功能
- 它提供 Alza.cz 商品目錄工具,例如 search_products、get_product、compare_products、get_product_reviews、recommend_alternatives、find_pickup_points、list_categories、get_deals 和 autocomplete,以及 PC 零組件配置工具。工具依工具集分組,預設只啟用 catalog 和 auth,其他工具集(購物車與結帳、帳戶管理、訂單與付款、評論與訂閱、監控、聊天、原始行動端讀取)需透過 set_toolset 啟用。目錄頁面以無頭瀏覽器擷取,帳戶與結帳流程則呼叫逆向取得的行動端與網頁 API。
- 適用情境
- 適合讓助理在 Alza.cz 上研究商品、價格、庫存、評論與取貨點,或在真實 Alza 帳戶上準備並送出訂單。鎖定個人或研究用途,不適合大規模使用。
- 執行需求
- 透過 npx alza-mcp 以 stdio 在本機執行,需要 Node.js。首次呼叫會下載 Playwright 的無頭 Chromium(約 92 MB);postinstall 會嘗試設定選用的 Python curl_cffi 側車。目錄功能不需要環境變數或密鑰;帳戶功能需要 OAuth 登入,選用變數包括 ALZA_BASE_URL、ALZA_CDP_URL、ALZA_HEADLESS 和 ALZA_TOKEN_FILE。選用的 HTTP 模式只綁定本機。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Alza Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
alza-mcp
Let your AI agent shop on Alza.cz — Central Europe's largest e-commerce store.
[npm version] [CI] [License: MIT] [TypeScript] [Playwright] [MCP]
alza-mcp is an unofficial Model Context Protocol server that gives Claude (or any MCP-aware agent) an interface to Alza through browser-based catalog scraping and reverse-engineered mobile/web APIs: search products, pull full detail, read reviews, use anonymous/account data, manage a cart, select delivery/AlzaBox pickup, preview checkout, and submit an order only with an explicit one-time confirmation token.
Real session, catalog toolset only, no account. Re-record: docs/demo-recording.md. Static version: docs/demo.svg.
Ask: "Find me the best pro-grade wheel cleaner under 600 Kč and tell me where I can pick it up in Prague." The agent calls search_products → get_product → find_pickup_points and gives you a real answer with real prices and a real address.
[!IMPORTANT] This project is unofficial — not affiliated with, endorsed by, or sponsored by Alza.cz a.s. It's a community wrapper for personal/research use. Read the disclaimer before deploying or sharing widely.
Quick install
One-click install
[Install in Cursor] [Install in VS Code]
Both buttons install the same thing as the manual config below: npx -y alza-mcp, no environment variables, no secrets. The first tool call downloads Playwright's headless Chromium (~92 MB, ~30 s); every call after that is a few seconds. For Claude Desktop, download the one-click alza-mcp-<version>.mcpb bundle from the latest release (attached from the next release onward) and open it, or use the JSON config below.
Claude Code
That's it. Restart Claude Code, type /mcp to confirm, and start asking. First call takes ~30 s while Playwright downloads its headless Chromium browser (~92 MB) — every call after that is a few seconds.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Restart the app. Same first-call download.
Cursor / Continue / any MCP client
Same shape — command: "npx", args: ["-y", "alza-mcp"]. Stdio transport, standard MCP everywhere.
What you can ask
A real session captured during testing:
You: Find me the best pro-grade wheel cleaner on Alza, around 500 Kč. I want a detailer-tier brand.
Claude: (calls
search_products"čistič disků kol" sort=rating, thenget_producton the top picks)Top three from the live catalog:
Pick: Sonax Xtreme Full Effect 750 ml — the de-facto detailer recommendation. It's iron-fallout reactive (turns purple on contact with brake-dust particles so you can watch it work), Sonax is a German workshop standard, and it's in stock.
That's the agent calling four MCP tools across two parallel searches and synthesizing real Alza data. No hallucinated SKUs.
What it does
With 63 domain tools (65 including list_toolsets and set_toolset), listing every tool on every tools/list call would front-load an agent's context with dozens of tools it may never touch in a given conversation. So they're grouped into toolsets, and only two are enabled by default, exposing 12 domain tools plus the two toolset controls:
Call list_toolsets to see every group and set_toolset({id, enabled: true}) to turn one on before using its tools — e.g. enable basket_and_checkout before adding something to a cart. This is standard MCP progressive disclosure (RegisteredTool.enable()/.disable(), which fires the normal tools/list_changed notification) — no functionality is removed, it's just not all visible at once.
Catalog tools:
PC builder tools (enable pc_builder):
Account and checkout tools:
User-management, payments, orders, and post-purchase tools:
High-impact mutations require one-time confirmation tokens (checkout_preview for mobile place_order, prepare_mutation for the other guarded mutations); the full route inventory, exposure decisions, and verification labels live in docs/mobile-endpoint-coverage.md.
OAuth sign-in happens outside the MCP; auth_exchange exchanges the returned code and the server holds access/refresh tokens in memory or loads them from the configured token file.
"Při přihlášení došlo k chybě." after signing in? The sign-in usually worked. Alza redirects to
alza://identity?code=…&state=…, which a desktop browser can't open, so the page stalls and a 40-second timer in Alza's login page shows that message. Before signing in, open DevTools and turn on Network → Preserve log. After you sign in, copy thealza://identity?code=…URL from the redirect'sLocationheader, or from the Console error about failing to launchalza://. Pass the whole URL toauth_exchangeascode. The code expires quickly, so exchange it right away. Registration and credential-change tools do accept passwords or verification codes as arguments, guarded by one-time confirmation tokens. Account/cart/order tools issue API requests and can fall back to browser-backed requests when challenged; they do not automate checkout forms.
Checkout paths: web_place_order submits the cart populated by add_to_cart, after delivery_options and any cart-scoped web_pickup_places lookup. The web_add_to_cart → web_cart HATEOAS basket is separate. The mobile place_order route was blocked by server-side HTTP 500 in the recorded live tests; the legacy WCF path was live-verified. See known limitations for dated evidence.
Mobile API environment variables:
Plus:
- 📦 Resource —
alza://product/{code}lets agents read a product as a URI. - 💬 Prompt —
/find-productis a guided shopping helper. - 🌍 Multi-locale — catalog locale configuration supports
alza.cz,.sk,.hu,.at,.de,.co.ukviaALZA_BASE_URL; account/checkout verification is for CZ and some routes are fixed to the CZ host.
Configuration
All optional — alza-mcp works out of the box.
Running over HTTP (Streamable HTTP)
stdio is the default and what the install snippets above use. To serve the same server over MCP Streamable HTTP instead, for example for a client that only takes a URL:
On HTTP the server is stricter than on stdio, because a network endpoint can be reached by more than one client:
- Catalog only by default. Only the read-only, anonymous toolsets are usable:
catalog(on) andpc_builder(enable withset_toolset). Every other toolset (auth, basket/checkout, account, orders/payments, reviews/subscriptions, chat,advanced_raw) is locked:list_toolsetsshows it with the reason, andset_toolsetrefuses to enable it. These tools sign in to and act on a real Alza account (orders, payments, credentials), so a shared endpoint must not offer them by accident. SetALZA_HTTP_ENABLE_ACCOUNT=1to unlock them. - One server per MCP session. Each
Mcp-Session-Idgets its own server instance: its own toolset state, OAuth tokens and one-time confirmation tokens. WithALZA_HTTP_ENABLE_ACCOUNT=1, each session also gets its own browser context and Chrome-fingerprint sidecar, because both keep Alza cookies. Sessions expire after 30 idle minutes. - No token file.
ALZA_TOKEN_FILE(~/.alza-mcp/tokens.json) holds one person's login, so HTTP mode does not load it. Each session signs in withauth_start→auth_exchange. For a single-user localhost setup you can setALZA_HTTP_ALLOW_TOKEN_FILE=1(together withALZA_HTTP_ENABLE_ACCOUNT=1); every session then starts signed in as that account, so never do this on a shared host. All sessions start from the same refresh token and Alza rotates it on refresh, so the first session that refreshes invalidates the copy the others hold (they then needauth_start→auth_exchange); keep to one active session in this mode. - Localhost only by default. It binds
127.0.0.1and rejects requests whoseHostorOriginis not a loopback name (DNS-rebinding protection). There is no built-in authentication or TLS. If you bind elsewhere (--host 0.0.0.0), put it behind a reverse proxy that does both, and setALZA_HTTP_ALLOWED_HOSTS.
Hosting is not supported yet. A hosted endpoint (Vercel mcp-handler, Fly, Railway, …) is a follow-up. The main obstacle is Cloudflare, not the transport: Alza is behind Cloudflare Bot Management, and both the headless browser and the curl_cffi sidecar get through it from a residential IP (live-verified) but are far more likely to be challenged from a datacenter IP. A hosted instance will probably need a residential proxy or a browser-as-a-service (for example Browserbase via ALZA_CDP_URL). The daily canary's GitHub-hosted runs show this: they get Cloudflare's interactive challenge. Other things a host needs: Chromium and Python with curl_cffi in the image, enough memory for one browser per account session, sticky routing (sessions live in one process's memory), and authentication in front of the endpoint. Keep the account toolsets locked on any multi-user host.
Pi agent integration
Register the local build in pi's global MCP config (~/.pi/agent/mcp.json):
Run /reload (or mcp connect alza — the gateway respawns the stdio process, so a freshly built dist/ takes effect without /reload). The gateway exposes the tools (55 domain tools plus list_toolsets/set_toolset; only the catalog and auth toolsets are enabled until you call set_toolset) under the alza_ prefix (alza_search_products, alza_get_product, alza_cart, …). Auth auto-loads from ~/.alza-mcp/tokens.json. Verified in both modes: (a) in-session through the gateway — search/filter/detail, authenticated add-to-cart, bogus-coupon round-trip → server-side err:1 envelope (docs/live-evidence/pi-integration-2026-09-10.md); and (b) headless (pi -p one-shot prompt), where the agent discovers the alza_* tools, calls search_products with the right args, and reports the correct cheapest in-stock product (docs/live-evidence/headless-pi-2026-09-12.json); the 2026-09-13 re-run adds three more headless scenarios — catalog search with price-ascending sort, the authenticated account stack (account_status + cart), and the one-time mutation token flow (prepare_mutation) — all captured in docs/live-evidence/headless-pi-2026-09-13.json.
How it works
Alza has no public consumer API. This project reverse-engineers the Android app's REST surface (route names and DTOs recovered from the APK) and the website's own checkout pipeline. Neither is a supported or documented interface, so any of it can change or break without notice.
Cloudflare Bot Management. Alza sits behind it and returns HTTP 403 to plain HTTP clients. This server gets past it in two ways: a headless Chromium (catalog scraping) and a Chrome-fingerprint HTTP sidecar (scripts/cf-transport.py, using curl_cffi to impersonate Chrome's TLS/HTTP2 fingerprint) for the account/checkout API. That is circumvention of a bot-protection measure, which Alza's terms of use may prohibit. The sidecar and its setup script ship in the npm package, and postinstall tries to set up its curl_cffi venv. It stays optional: without Python or curl_cffi, the account stack (including OAuth sign-in) falls back to plain fetch and, for same-origin API calls, the browser. See the Disclaimer and SECURITY.md before using it.
No generic arbitrary-route tool is exposed. What is and isn't covered:
- Excluded: administrative login routes, telemetry/audit routes, device-token and anonymous-activity routes, and external payment hand-offs (Klarna, Google Pay) plus the quick-order payment family (documented as
blockedin the coverage matrix). - Included, behind one-time tokens: order placement and cancellation, account registration, and credential/identity changes (password, 2FA, phone, email, account deletion —
delete_accountis irreversible). - Server-driven action URLs are followed only when returned by a confirmed response, through the origin-validated
AppActionExecutor(GET/POST, path allowlist, sensitive-field blocklist, one-time confirmation token); they are not accepted as arbitrary MCP URLs.
The complete 12-family route inventory with method, DTO, prerequisites, side effects, exposure, and verification status is maintained in docs/mobile-endpoint-coverage.md.
Legacy catalog compatibility still uses the original page adapter:
- Search navigates
/search.htm?exps=...and scrapes.browsingitemcards. - Product detail comes from page JSON-LD.
- Reviews use JSON-LD aggregate ratings.
- Pickup points combine branch data and geocoding.
- Per-process caching remains enabled.
Image, font, and analytics requests are blocked at the route level. Catalog pages still load scripts, and sorted searches may fetch multiple result pages. Typical latencies: search ~2 s, product detail ~5 s warm.
For deeper architecture notes — including why we don't ship the HTTP/okhttp recipe — see ARCHITECTURE.md.
Development
Further reading:
- ARCHITECTURE.md — why the code looks the way it does (CF, Playwright, hydration strategy)
- ROADMAP.md — what's planned next
- CONTRIBUTING.md — repo layout and how to add a tool
Roadmap
main already covers catalog, filtering, cart, checkout, order placement/cancellation and account management (see What it does and the known limitations in docs/gap-analysis.md). Next up:
- PC builder follow-ups (#15;
pc_buildertoolset shipped) and a hosted HTTP endpoint (follow-up to #16; local--httpmode is shipped)
Priorities live in ROADMAP.md; everything is tracked in issues — good first issue is the place to start.
FAQ
Why the 92 MB Chromium download?
Alza's bot protection can challenge ordinary HTTP requests. The catalog uses headless Chromium to render product pages; the account stack can also use the optional Chrome-fingerprint sidecar, with browser-backed requests as a fallback. Chromium is installed by the postinstall hook or on first launch if needed. See How it works.
How are login and ordering protected?
- OAuth sign-in does not pass the Alza password as an MCP tool argument — sign-in happens in the user's browser (OAuth PKCE) and the MCP only exchanges the returned code. Tools that necessarily carry credentials as arguments (
register,change_password,phone_change,email_change) require an explicit one-time token and should only be called with the user's direct instruction. checkout_previewcreates a one-time confirmation token after the cart and delivery choice are reviewed;place_orderrefuses arbitrary tokens.web_place_order(the currently working submission path — mobileplace_orderreturns HTTP 500 server-side) and every other high-impact mutation (cancel_order,pay_after_order,delete_account, …) require a one-time token fromprepare_mutation. Tokens are single-use and bound to one action. MFA and 3-D Secure remain user-controlled browser interactions.- These tools create, change and cancel real orders and accounts. The token is a guard against accidental calls by an agent, not a substitute for the user confirming the action — have your agent show the order summary and ask first.
Can I avoid the Chromium download?
Yes. Set ALZA_CDP_URL to your existing Chrome's debug port:
The MCP will use your Chrome — no separate download, faster cold starts, and it inherits any Alza cookies you already have.
Will Alza take this down?
It might, and you should assume that's possible. The project has no commercial intent, caches to minimize traffic, and provides a takedown contact path via issues — if Alza requests removal, we'll comply. But it does get past Alza's bot protection (see How it works), so it is not a polite scraper by Alza's standards, and Alza's terms of use may forbid it. Use it for personal automation, not at scale.
How does this compare to rohlik-mcp?
tomaspavlin/rohlik-mcp is the inspiration. Differences:
- Rohlik isn't behind a Cloudflare challenge → rohlik-mcp uses plain HTTP. We're forced to a real browser because Alza is.
- Alza is a much larger catalog (millions of SKUs vs. a grocery list).
- We cover the whole purchase path (cart, checkout, order placement and cancellation) plus account management, not only catalog reads, and group the tools into toolsets so only the catalog and auth toolsets are enabled by default.
- We expose MCP resources and prompts in addition to tools.
Disclaimer
alza-mcp is not affiliated with, endorsed by, or sponsored by Alza.cz a.s. "Alza", "Alza.cz", and "AlzaBox" are trademarks of their respective owners.
What this software does. It is a reverse-engineered client. Its mobile-API routes and data shapes were recovered from the Alza Android application, and its catalog tools scrape alza.cz pages with a headless browser. To reach Alza's servers it circumvents Cloudflare Bot Management (headless Chromium plus a Chrome-fingerprint HTTP sidecar). The Android app's OAuth client credential, which is embedded in the public APK, is used as the default for the token exchange.
Legal. None of this is a published or supported interface, and Alza's terms of use may prohibit automated access, bot-protection circumvention and reverse engineering. Whether and how you may use this software depends on your jurisdiction and your agreement with Alza. You are solely responsible for that determination. This is not legal advice, and the maintainers make no representation that use of this software is lawful or permitted.
It acts on real accounts and spends real money. The checkout, order, payment, registration and account-deletion tools operate on live Alza accounts. Orders placed are real and binding; cancellation is not guaranteed to succeed. One-time tokens guard against accidental agent calls but are not a substitute for confirming each action yourself. Test only with accounts and orders you are prepared to lose, and never with credentials you are not prepared to expose to your agent's context.
No warranty. Provided "as is" under the MIT license. The maintainers make no guarantees of availability, accuracy, or fitness for any purpose, and are not liable for orders, charges, account lockouts or bans resulting from its use. The upstream interfaces can change without notice, so any tool may stop working. Do not rely on this for commercial decisions.
Security issues — see SECURITY.md. Alza employees or rights holders with concerns: please open an issue or contact the maintainers — we will respond promptly and comply with reasonable removal requests.
License
MIT. See LICENSE.
Contributors
A big thank you to Samuel Seidel, the project's first outside contributor and now a co-maintainer. He built the account, cart, checkout and order tools, toolsets, typed output schemas, category filtering and the live-verified test harness, which together took alza-mcp from a 5-tool catalog browser to a full shopping agent (#1, #5).
Contributions are welcome — see CONTRIBUTING.md and the open issues.
Acknowledgements
- tomaspavlin/rohlik-mcp — direct inspiration; layout patterns we mirror.
- topmonks/hlidac-shopu — reference Alza scraper recipe (HTTP + proxies).
- microsoft/playwright-mcp — official Playwright MCP, proof that browser-driven MCPs are the right abstraction for many websites.
- Model Context Protocol and the TypeScript SDK.
來源:README.md,提交 c6169f1
工具
0版本歷史
1- v0.4.0最新Oct 7, 2026


