Albert Heijn
io.github.olekpuchkav1.4.0更新於 Oct 5, 2026
Unofficial Albert Heijn server: products, bonus deals, recipes, shopping list, orders and receipts.
概覽
讓助理搜尋 Albert Heijn 商品與優惠、規劃食譜、管理購物清單與收藏清單,並查看訂單與收據。
- 功能
- 這是針對荷蘭超市 Albert Heijn 的非官方 MCP 伺服器。它提供工具來搜尋商品與本週優惠、取得商品詳細資料、營養資訊與替代商品,搜尋 Allerhande 食譜並把食材加入購物清單,管理購物清單與收藏清單,查看配送時段與目前訂單的購物車,以及讀取歷史訂單與門市收據。唯讀工具會標示為唯讀,刪除資料的工具需要確認。
- 適用情境
- 如果你有 Albert Heijn 帳號,並希望助理協助採買規劃,例如尋找優惠、依人數換算食譜、建立購物清單、調整進行中的配送訂單或回顧已購買的商品,就適合使用。不在 Albert Heijn 購物則不需要安裝。
- 執行需求
- 需要 Node.js 24 與 Albert Heijn 帳號。可透過 npx 以 stdio 在本機執行,也可作為 Streamable HTTP 伺服器供遠端用戶端使用。登入是兩步瀏覽器流程:助理回傳登入連結,你從瀏覽器開發者主控台複製 appie://login-exit 代碼貼回去。權杖儲存在本機,路徑可用 AH_TOKENS_PATH 覆寫。HTTP 傳輸需要 AH_MCP_TOKEN,伺服器部署還涉及 AH_MCP_BASE_URL、AH_MCP_HOST 與 AH_MCP_PORT。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Albert Heijn,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
albert-heijn-mcp
[npm] [License: Apache-2.0] [Node.js 24] [MCP]
Your Albert Heijn account, in your AI assistant.
albert-heijn-mcp is a Model Context Protocol server for Albert Heijn 🇳🇱. Connect it to any MCP client and just ask: find products and bonus deals, plan meals from Allerhande recipes, keep your shopping list and delivery order up to date, and look back at what you've bought.
[!NOTE] An unofficial project, not affiliated with or endorsed by Albert Heijn. It uses the same API as the AH mobile app, which may change without notice.
Contents
- What you can ask
- Quick start
- Logging in
- Connecting a client
- Configuration
- Deploying to a server
- Tools and limitations
- Development
- Troubleshooting
What you can ask
Ask in Dutch, English or any language your assistant speaks:
"Wat is er deze week in de bonus van wat ik meestal koop?"
Plan meals
"Find a vegetarian Allerhande recipe under 30 minutes for two, and put the ingredients on my shopping list. I already have olive oil and salt."
"Scale the panlasagne recipe to six people and tell me how much salmon I need."
"Plan three weeknight dinners around what's on bonus this week."
Save money
"Which products I usually buy are on bonus this week?"
"Rebuild tonight's stir-fry with ingredients that are on bonus, without changing the recipe too much."
"Is next week's bonus out yet? If not, when does it appear?"
"What's in the 2+1 gratis kaas deal?"
Shop
"Put the products I've had delivered at least three times back on my list."
"Find organic, gluten-free pasta, cheapest first."
"Compare the protein and sugar in these three yoghurts and add the best one to my list."
"When can AH deliver on Saturday?"
"The courgettes are sold out. What else would work in this recipe?"
"Add two more packs of milk to my upcoming delivery."
"Make a favourites list called Pasta night with everything from this recipe."
"Any vandaag-af bread or vegetables at my local AH worth picking up tonight?"
Look back
"How much did my in-store receipts add up to in September, and what were the five priciest items?"
"Show the receipt from my last shop and list anything I bought more than once."
Quick start
Requirements: Node.js 24 (LTS) and an Albert Heijn account.
There's nothing to install: connect a client with npx -y albert-heijn-mcp, which downloads and runs the latest version, then ask it to log you in to Albert Heijn.
To install it permanently instead, run npm install --global albert-heijn-mcp and use the albert-heijn-mcp command. To build from source, clone the repository.
Logging in
AH's login page has a captcha that only works on AH's own site, so logging in takes two steps:
-
Ask your assistant to log you in. It calls
ah_loginand gives you a link to AH's login page; locally, it also opens in your browser. Log in as usual. -
Paste the code back. After you log in, AH redirects to a link meant for its iPhone app, which the browser can't open, so the page stays put. Open the developer console (Chrome: ⌘ ⌥ J on Mac, Ctrl Shift J on Windows/Linux) and find this line:
Copy the
appie://login-exit?code=…link into the chat. The code works once and expires quickly, so paste it right away.
You only log in once. Tokens are stored on your machine and refreshed automatically:
The file is readable only by your user. Override the location with AH_TOKENS_PATH.
Connecting a client
albert-heijn-mcp works with any MCP client. It runs locally over stdio, or on a server over Streamable HTTP.
Local clients (stdio)
Install it in one click:
[Install in Cursor]
[Install in VS Code]
Other clients that start MCP servers as a local command run npx -y albert-heijn-mcp. Most of them take this JSON in their MCP settings:
Where the settings live differs per client; see its documentation. Clients with a CLI usually have an add command instead, e.g. <client> mcp add ah -- npx -y albert-heijn-mcp. It is also listed in the MCP Registry, which some clients install from.
[!TIP] Desktop apps don't load your shell profile, so they may not find
npx(common with nvm). Then setcommandto the output ofwhich npx. For a source checkout, usenodewith the argument/path/to/albert-heijn-mcp/dist/index.js.
Remote clients (Streamable HTTP)
Web apps such as ChatGPT and Claude.ai only connect to servers on the internet. Set one up first (Deploying to a server). The endpoint is https://your-server/mcp.
Clients that support OAuth log in to the server themselves: add the endpoint with OAuth (or automatic) authentication, and the client opens a login page on your server. Enter your AH_MCP_TOKEN there once; the client then gets its own tokens and renews them. Clients without OAuth send AH_MCP_TOKEN as an Authorization: Bearer YOUR_TOKEN header, or in the URL as https://your-server/mcp?token=YOUR_TOKEN.
ChatGPT: needs Developer mode (Plus, Pro, Business, Enterprise and Education). Open Settings → advanced settings, turn on Developer mode, and create a connector with the endpoint. Set authentication to OAuth.
Claude.ai: Settings → Connectors → Add custom connector, then paste the endpoint and choose Connect.
[!IMPORTANT] Anyone with
AH_MCP_TOKENcan use your Albert Heijn account. Use a long random value (openssl rand -hex 32). Changing it also logs out every OAuth client. A token in a URL can end up in proxy logs, so prefer OAuth or the header.
Configuration
Settings are environment variables. They can also go in a .env file in the working directory (see .env.example); variables already set in the environment take precedence.
Command-line flags:
stdio (the default) is for local clients; streamable-http serves MCP at /mcp, with OAuth login at /authorize.
Deploying to a server
albert-heijn-mcp runs as a hardened systemd service behind a reverse proxy, installed from the latest release.
-
Prepare the server. Install Node.js 24 and create a service user:
-
Configure it in
/home/albert-heijn-mcp/.env: -
Install it with the service unit that comes with the package (it runs in
--remotemode):To update, run the same commands, then
sudo systemctl restart albert-heijn-mcp. -
Add TLS with a reverse proxy that forwards to
127.0.0.1:3000. With Caddy:
The service can write only to /home/albert-heijn-mcp, where it keeps its tokens. If you point AH_LOG_FILE elsewhere, add that path to ReadWritePaths in the unit file.
Tools
Read-only tools are marked as such, so clients can run them without asking. Tools that remove data are marked destructive, so clients ask for confirmation first.
Tools that return data also return it as structured output with a declared schema, for clients that use it. Products and recipes in tool results include a url to their page on ah.nl, and the server asks the assistant to link their names to it.
Account
Products & offers
Recipes
Shopping list & favourites
Delivery order
Choosing a delivery or pick-up slot in the AH app moves your shopping list into an order. ah_get_delivery_slots shows when delivery is possible; the other tools work on that order.
Orders & receipts
Limitations
- Delivery orders can't be started through the API.
ah_get_delivery_slotslists the windows, but booking one, which starts the order, happens in the AH app or on ah.nl. While the order is active, AH doesn't serve the shopping list; the tools say so and point to the order tools. - Ticking off shopping-list items isn't supported: the API returns no usable item IDs.
- Bonus Box, AH's personal weekly deals, is not available: its API is unknown.
Development
Run it from the checkout with node dist/index.js, or use /path/to/albert-heijn-mcp/dist/index.js as the argument in your client's config with node as the command.
The only runtime dependencies are the official MCP TypeScript SDK and Zod, which the SDK uses for tool schemas.
To call tools by hand, use the MCP Inspector:
Before deploying a change, run a quick check against a real account: log in, search for melk, add a product to your shopping list and remove it again, then view your cart and orders.
To release, set the new version in package.json and in both places in server.json, merge it to main, and push a tag: git tag v1.2.3 && git push origin v1.2.3. The release workflow checks that the versions match, builds the package, attaches it to the GitHub release as albert-heijn-mcp.tgz, and stages it on npm through trusted publishing, so no npm token is stored. Approve the staged version on npmjs.com (or with npm stage approve) to make it live; the workflow then updates the MCP Registry entry.
Troubleshooting
Login fails with "exchange code"
Codes work once and expire quickly. Ask to log in again and paste the new link straight away.
No "Failed to launch" line after logging in
Open the developer console before you submit the login form, or look for the appie://login-exit?code=… request in the Network tab. Browsers other than Chrome may show the link in an error page or dialog instead.
"Not logged in", or the session seems broken
Log out and back in through the assistant, or delete tokens.json from the token location and log in again.
"There is no active delivery order to change"
AH accepts order changes only once an order exists. Choose a delivery slot in the AH app or on ah.nl first.
"The shopping list is not available while a delivery order is active"
Choosing a slot moved your list into the order. Use ah_get_cart and ah_update_cart_item until the order is delivered or cancelled.
OAuth login opens at localhost, or the client can't reach it
Set AH_MCP_BASE_URL to the server's public https:// URL and restart it. Clients are sent there to log in.
Port 3000 is in use
Set AH_MCP_PORT to another port, in the environment or .env.
License
來源:README.md,提交 bec3876
工具
0版本歷史
1- v1.4.0最新Oct 5, 2026

