I reverse-engineered Tesco's API so an AI agent can do my grocery shop (and rank food by nutrition)

TL;DR AI
2 min readKey summary
A developer reverse-engineered Tesco’s private web API to build basketeer, a typed TypeScript SDK and MCP server for AI-assisted grocery shopping.
The system can search products, query nutrition data, and normalize labels through Tesco’s public GraphQL gateway, with agent-friendly support for ranking by macros.
For account actions, basketeer uses a browser-based Playwright login flow to obtain session credentials, while leaving checkout and payment to the human user.
The project shows how a reverse-engineered supermarket API can enable automation and nutrition-aware shopping without taking control of sensitive transactions.
