Ametller Origen
Enables shopping Ametller Origen online groceries through Claude, allowing catalog browsing, cart management, and order history access, with payment handled directly on the retailer's site.
README
Ametller Origen — Claude Desktop shopping extension
Shop your Ametller Origen online groceries by talking to Claude. The extension drives your own authenticated Ametller Origen session: it browses the catalog, reads your purchase history, and adds, changes, or removes items in your real cart so you and Claude fill it together.
You stay in control of payment. There is no checkout or payment tool, by design — Claude fills the cart and you review and pay on the Ametller Origen site, where Strong Customer Authentication (SCA) happens. Sign in once through a browser window (handling any 2FA); the session is stored locally on your machine and never leaves it.
It installs as a Claude Desktop extension (described by manifest.json) — load it unpacked via
developer mode (see Install; the packed .mcpb doesn't install reliably). It can also run as a
plain local MCP server.
Independent project. Not affiliated with, endorsed by, or sponsored by Ametller Origen.
How it works
The /ca/online store is a headless Salesforce Commerce Cloud (PWA Kit) storefront, so the extension talks
to the documented SCAPI shopper APIs, authenticated with a SLAS token.
- Auth — a headed browser login (
playwright-coredriving your installed Chrome) lets you sign in; the extension captures the registered SLAS token (access + refresh + customer id) straight from the/oauth2/tokenresponse and saves it to~/.ametller/session.json. Access tokens last ~30 min and are refreshed silently from the refresh token, so you only sign in about every ~90 days. - Catalog —
shopper-search(product search) andshopper-products(product detail). - Cart —
shopper-baskets(your real basket: add / set quantity / remove). Every mutation returns the updated basket, so there are no redundant round-trips. - Orders —
shopper-customersorder history, used by reorder / "buy again".
Storefront config (public, read from the page): siteId=ametller, org=f_ecom_blzv_prd,
shortCode=4jppt37a, API base https://4jppt37a.api.commercecloud.salesforce.com.
Tools
All tools are prefixed with ametller_ so they never collide with another grocery extension's tools
(e.g. a Mercadona one) when both are installed in Claude Desktop at the same time.
| Tool | What it does |
|---|---|
ametller_get_shopping_guide |
The shopping playbook — read first. |
ametller_auth_status |
Whether the session is valid. |
ametller_login |
Open a browser to sign in (handles 2FA); saves the session. |
ametller_search_products |
Find products + ids (Catalan works best). |
ametller_get_product |
Details for one product. |
ametller_get_cart |
The current real cart. |
ametller_get_purchase_history |
Past orders (date, total, status, count). |
ametller_get_order_items |
Items in a past order (no changes). |
ametller_add_to_cart / ametller_set_quantity / ametller_remove_from_cart |
Mutate the real cart (reversible). |
ametller_reorder_order |
Add a whole past order to the cart ("buy again"). |
No checkout / pay tool — ever.
Deferred: a "my regulars" suggestion and delivery-slot lookup. Ametller fulfils via Instaleap, so slots live in a separate system, not SCAPI — to be added after recon.
Install
Install it unpacked (developer mode). This is the recommended and reliable path — the packed
.mcpbdoes not currently install cleanly in Claude Desktop, so use the unpacked folder below.
As an unpacked Claude Desktop extension (recommended)
Load this folder directly. The build output (dist/) and runtime dependency (node_modules/playwright-core)
are git-ignored, so after cloning you must produce them first:
npm install # installs playwright-core into node_modules/
npm run build # writes dist/server.mjs (inlines the shopping guide)
The folder then contains everything an unpacked extension needs:
manifest.json
icon.png
dist/server.mjs
node_modules/playwright-core
In Claude Desktop: Settings → Extensions → Advanced settings → "Install unpacked extension…", then select
this folder (the one containing manifest.json). It loads as the "Ametller Origen" extension; run the
ametller_login tool once, then try "show me milk options" (expect a photo-grid artifact) and "add 2 to my cart".
Requirements: Node ≥ 18 on your PATH and Google Chrome installed (the ametller_login tool opens it).
Rebuild (npm run build) after changing anything under src/, then reload the extension.
As a local MCP server
If you don't want a Claude Desktop extension at all, run it as a plain MCP server:
npm install && npm run build
node dist/server.mjs
Point any MCP client at node /path/to/dist/server.mjs (set AMETLLER_BROWSER_CHANNEL=chrome).
As a packed Claude Desktop extension (.mcpb)
⚠️ Not currently recommended — Claude Desktop does not install the packed bundle reliably. Use the unpacked path above instead. Kept here for completeness.
npm run pack # builds dist/, then packs ametller-origen.mcpb via @anthropic-ai/mcpb
Then open the resulting .mcpb with Claude Desktop. (The bundle includes dist/ and the production
node_modules, i.e. playwright-core.)
Development
npm install
npm run spike # guest read + basket round-trip against the live API (no login)
npm run login # headed browser login -> ~/.ametller/session.json
npm run whoami # verify the registered session (cart + orders)
npm run build # esbuild bundle -> dist/server.mjs (inlines the shopping guide)
npm run test:mcp # drive the built server over MCP, incl. a real cart round-trip
npm run icon # regenerate the placeholder icon (icon.png)
npm run pack # build -> ametller-unpacked/ + ametller-origen.mcpb + zip
Layout:
src/
server.mjs MCP server (the 12 tools)
ametller/api.mjs SCAPI client + compact mappers
auth/slas.mjs SLAS: guest PKCE token, refresh, JWT status
auth/login.mjs headed-browser token harvest
auth/store.mjs load the saved session
shopping-guide.md shopping playbook (bundled into the server)
scripts/ spike / login / whoami / test-mcp / make-icon / pack
Privacy
The session token lives only in ~/.ametller/session.json on your machine. The packaged bundle contains
only the server, icon, manifest, and playwright-core — no credentials. All API calls go directly from your
Mac to Salesforce Commerce.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。