wegmans-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wegmans-mcpadd a dozen eggs to my shopping list"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
wegmans-mcp
Unofficial Model Context Protocol (MCP) server for the Wegmans web application. It exposes product search plus authenticated shopping-list operations discovered from the browser network flow.
Unofficial / reverse-engineered. This project is not affiliated with or endorsed by Wegmans. The private endpoints can change without notice. Use it only with an account you are authorized to access and in accordance with applicable terms.
Supported tools
Tool | Behavior |
| Search the configured Wegmans store via Wegmans' Algolia product index |
| Get live product details for one product/SKU |
| Read the current grocery list/cart |
| Add a product with quantity |
| Set the absolute quantity of an existing SKU |
| Delete one SKU from the list |
| Delete all grocery-list items; requires |
| Read Wegmans "My Items" purchase-history data |
Related MCP server: lista-compras-mcp
What the server is using
The Wegmans web client currently uses:
Azure AD B2C / OAuth 2.0 for account authentication.
One-hour bearer access tokens.
Rotating refresh tokens.
api.digitaldevelopment.wegmans.cloudfor commerce/cart operations.Algolia index
productsfor product search.
The cart API is versioned with 2024-02-19-preview; product detail currently uses 2023-09-22.
Setup
Requires Node.js 20+.
npm install
npm run buildCopy .env.example values into your MCP host configuration. Do not commit tokens.
Bootstrap authentication
Sign into
wegmans.comnormally.Open Chrome DevTools → Network.
Find the successful request to the Wegmans Azure AD B2C endpoint ending in
/oauth2/v2.0/token.In the JSON response, copy the
refresh_tokenvalue.Set it once as
WEGMANS_REFRESH_TOKEN.
On the first refresh, the server stores the rotated refresh token in:
~/.config/wegmans-mcp/tokens.jsonThe file is written with user-only permissions. The persisted token takes precedence over WEGMANS_REFRESH_TOKEN, so normal token rotation continues without changing environment variables.
If the refresh-token family expires or is revoked, repeat the bootstrap process with a newly signed-in browser session.
Store configuration
Defaults are set to store 59 / Burlington:
WEGMANS_STORE_NUMBER=59
WEGMANS_STORE_KEY=59-BURLINGTONOverride both for a different store. WEGMANS_STORE_KEY is used by the add-to-cart/list endpoint.
MCP host configuration
After npm run build, a stdio MCP host can launch the server like this:
{
"mcpServers": {
"wegmans": {
"command": "node",
"args": ["/absolute/path/to/wegmans-mcp/dist/server.js"],
"env": {
"WEGMANS_REFRESH_TOKEN": "<bootstrap refresh token>",
"WEGMANS_STORE_NUMBER": "59",
"WEGMANS_STORE_KEY": "59-BURLINGTON"
}
}
}
}Do not put the refresh token in a repository-tracked config file.
Empty-list behavior
The Wegmans UI empties the list with a single request:
PUT /commerce/cart/carts/itemdeletion?api-version=2024-02-19-previewwith every current SKU represented in lineItems:
{
"cartData": [{
"cartID": "...",
"cartVersion": 123,
"lineItems": [
{ "sku": "164850" },
{ "sku": "18515" }
]
}]
}empty_shopping_list fetches the latest cart first, derives every current SKU, submits them together, and requires confirm=true to reduce accidental destructive calls.
Authentication implementation
The server uses the currently stored refresh token to request a new access token from Wegmans' B2C token endpoint. When Wegmans returns a rotated refresh_token, the token file is replaced atomically. API calls retry once after a 401 by forcing another refresh.
No passwords, access tokens, refresh tokens, customer IDs, or email addresses are included in this repository.
Development
npm run dev
npm test
npm run buildSecurity
A Wegmans refresh token is a credential. Anyone holding it may be able to act as your account until it expires or is revoked. Keep token files out of source control, do not paste them into issues/logs, and sign out/re-authenticate if you believe a token has been exposed.
This server cannot be deployed
Maintenance
Related MCP Connectors
Turn any shopping list into a ready-to-checkout grocery cart across 26 European supermarkets.
Signed US food & grocery data: Kroger prices, nutrition, allergens, recalls, diet filters.
Grocery meal planning, budgets, and flyer deals for Canadian households. Auth required.
AI shopping gateway for product search, inventory, carts, and merchant-hosted checkout.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables searching for groceries and automatically adding items to cart through various grocery vendor APIs like Rami Levy and Keshet.3-
- FlicenseAqualityDmaintenanceEnables AI assistants to manage shopping lists and items (create, edit, delete, mark as purchased) via integration with a backend API.8-
- AlicenseNot gradedqualityBmaintenanceEnables AI models to manage Kroger/QFC shopping lists, search products, and plan meals via the Kroger API.1MIT

MealCP MCPofficial
AlicenseAqualityAmaintenanceEnables searching grocery product catalogs with faceted filters and retrieving price history statistics via the MealCP grocery price API.2MIT