Safeway MCP server for AI agents
Let Claude, ChatGPT or your own agent read and act on Safeway: 14 typed functions through one MCP server. No Safeway API key needed.
- Site
- safeway.com
- Functions
- 14
- Sign-in
- For account actions
- Works with
- MCP, HTTP, Node, Python
Connect
An MCP server for Safeway alone, with one tool per function. Paste it into Claude, ChatGPT, Cursor or any MCP client as a remote server.
https://api.bowmark.ai/mcp/site/safewayOne MCP server for Safeway and every other site Bowmark covers. Your agent looks up what it needs and calls it.
https://api.bowmark.ai/mcpSet it up in your clientBoth need a Bowmark API key. The quickstart gets you one and a first result in a few minutes. Functions that need a login use the person's own account: how sign-in works.
Functions
Open a function to see its arguments, what it returns and how to call it.
findStoresFinds Safeway stores near a ZIP code: store id, address, distance, timezone and whether each offers Drive Up & Go pickup or is the single store the…Arguments
Name Type Required args{ zipcode: string; radiusMiles?: number; limit?: number }Yes Returns
FindStoresResultinterface SafewayStoreAddress { line1: string; city: string; state: string; zipcode: string; country: string; } interface SafewayStore { storeId: string; // what every other store-scoped function takes as storeId address: SafewayStoreAddress; distanceMiles: number; timezone: string; // IANA zone, e.g. "America/Los_Angeles" offersInStoreShopping: boolean; offersPickup: boolean; // Drive Up & Go isNearestDeliveryStore: boolean; // true for at most one row per ZIP } interface FindStoresResult { zipcode: string; stores: SafewayStore[]; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/findStoresCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.findStores({ zipcode: "94611" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.findStores({"zipcode": "94611"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/findStores \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"zipcode":"94611"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.findStores({ zipcode: "94611" });getCartReturns the signed-in customer's cart at their store: items, quantities, prices, substitution preferences and the order minimum.Arguments
None.
Returns
SafewayCartinterface SafewayCartItem { productId: string | null; name: string | null; quantity: number | null; price: number | null; } interface SafewayCart { cartId: string | null; storeId: string | null; items: SafewayCartItem[]; subtotal: number | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/getCartCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.getCart();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.getCart())curl -X POST https://api.bowmark.ai/v1/sites/safeway/getCart \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.getCart();getMyAccountReturns the signed-in customer's profile: name, email, phone, preferred store and Safeway for U loyalty id.Arguments
None.
Returns
SafewayAccountinterface SafewayAccount { customerId: string; firstName: string | null; lastName: string | null; email: string | null; phoneNumber: string | null; preferredStoreId: string | null; loyaltyId: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/getMyAccountCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.getMyAccount();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.getMyAccount())curl -X POST https://api.bowmark.ai/v1/sites/safeway/getMyAccount \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.getMyAccount();getRecipeReturns one recipe by slug: ingredients with the Safeway product matched to each (id, UPC, price), steps, time, servings, diets, cookware and…Arguments
Name Type Required argsGetRecipeArgs | stringYes interface GetRecipeArgs { slug: string; // from searchRecipes, or the recipe url }Returns
SafewayRecipeinterface SafewayRecipeIngredient { name: string; quantity: string | null; // as printed, e.g. "½ cup" shoppable: boolean; product: { productId: string; upc: string | null; name: string; priceCents: number | null; imageUrl: string | null } | null; } interface SafewayRecipe { id: string; slug: string; name: string; url: string; imageUrl: string | null; servings: number | null; cookingMinutes: number | null; course: string[]; cuisine: string[]; diets: string[]; cookware: string[]; ingredients: SafewayRecipeIngredient[]; steps: string[]; nutrition: Record<string, number>; // per serving; energy is kcal storeId: string | null; // the page's default store the product prices are for warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/getRecipeCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.getRecipe("<args>");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.getRecipe("<args>"))curl -X POST https://api.bowmark.ai/v1/sites/safeway/getRecipe \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":"<args>"}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.getRecipe("<args>");getSearchSuggestionsReturns Safeway's type-ahead suggestions for a partial query, each with the department and brands the first suggestion narrows to.Arguments
Name Type Required args{ query: string; storeId?: string } | stringYes Returns
GetSearchSuggestionsResultinterface SafewaySearchSuggestionFilter { departmentName?: string[]; brand?: string[]; } interface SafewaySearchSuggestion { query: string; displayQuery: string; filter: SafewaySearchSuggestionFilter | null; } interface GetSearchSuggestionsResult { query: string; suggestions: SafewaySearchSuggestion[]; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/getSearchSuggestionsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.getSearchSuggestions({ query: "milk", storeId: "3132" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.getSearchSuggestions({"query": "milk", "storeId": "3132"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/getSearchSuggestions \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"query":"milk","storeId":"3132"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.getSearchSuggestions({ query: "milk", storeId: "3132" });getStoreReturns one Safeway store by id (from findStores): address, the rewards-program delivery/pickup flags, and its own SERVICE departments (Floral, Deli…Arguments
Name Type Required args{ storeId: string }Yes Returns
SafewayStoreDetailinterface SafewayStoreAddress { line1: string; city: string; state: string; zipcode: string; country: string; } interface SafewayStoreDepartmentHours { day: string; startHour: string; // "HHmm", e.g. "0800" endHour: string; } interface SafewayStoreDepartment { departmentId: string; departmentName: string; serviceDepartmentType: string; serviceEnabled: boolean; isCateringEnabled: boolean; hours: SafewayStoreDepartmentHours[]; } interface SafewayStoreDetail { storeId: string; storeName: string; address: SafewayStoreAddress; localPageUrl: string; offersGroceryDelivery: boolean; offersPickup: boolean; // Drive Up & Go offersRushDelivery: boolean; offersGroceryRewards: boolean; division: { name: string; number: string }; departments: SafewayStoreDepartment[]; // SERVICE departments (Floral, Deli, …), not storefront hours warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/getStoreCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.getStore({ storeId: "3132" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.getStore({"storeId": "3132"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/getStore \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"storeId":"3132"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.getStore({ storeId: "3132" });getWeeklyAdReturns the one flagship weekly-ad flyer live at a store: its own valid dates, PDF, and every item on it with its sale price as printed.Arguments
Name Type Required args{ storeId: string; zipcode: string }Yes Returns
GetWeeklyAdResultinterface SafewayWeeklyAdItem { productId: number; name: string; brand: string | null; description: string | null; priceText: string | null; // as printed, e.g. "5.99", no currency symbol guaranteed postPriceText: string | null; // e.g. "ea member price", "2 for $5", the only signal for either saleStory: string | null; categories: string[]; imageUrl: string | null; } interface GetWeeklyAdResult { storeId: string; flyerName: string; validFrom: string | null; validTo: string | null; pdfUrl: string | null; items: SafewayWeeklyAdItem[]; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/getWeeklyAdCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.getWeeklyAd({ storeId: "3132", zipcode: "94611" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.getWeeklyAd({"storeId": "3132", "zipcode": "94611"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/getWeeklyAd \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"storeId":"3132","zipcode":"94611"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.getWeeklyAd({ storeId: "3132", zipcode: "94611" });listAisleProductsLists the products in one aisle at one store: name, productId (what getProduct takes) and the product's own url.Arguments
Name Type Required args{ department: string; aisle: string; storeId: string; page?: number }Yes Returns
ListAisleProductsResultinterface SafewayAisleProduct { productId: string; // what getProduct will take name: string; url: string; } interface ListAisleProductsResult { department: string; aisle: string; storeId: string; products: SafewayAisleProduct[]; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/listAisleProductsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.listAisleProducts({ department: "dairy-eggs-cheese", aisle: "milk-cream", storeId: "3132" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.listAisleProducts({ "department": "dairy-eggs-cheese", "aisle": "milk-cream", "storeId": "3132" }))curl -X POST https://api.bowmark.ai/v1/sites/safeway/listAisleProducts \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"department":"dairy-eggs-cheese","aisle":"milk-cream","storeId":"3132"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.listAisleProducts({ department: "dairy-eggs-cheese", aisle: "milk-cream", storeId: "3132" });listAislesLists Safeway's grocery departments and the aisles inside each, with the slug listAisleProducts takes.Arguments
None.
Returns
SafewayDepartment[]interface SafewayAisle { slug: string; // what listAisleProducts takes, with the owning department's slug name: string; } interface SafewayDepartment { slug: string; name: string; aisles: SafewayAisle[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/listAislesCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.listAisles();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.listAisles())curl -X POST https://api.bowmark.ai/v1/sites/safeway/listAisles \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.listAisles();listDealsLists every deal across EVERY live flyer at a store (the weekly ad plus any other concurrent promo flyer), each tagged with which flyer it came from.Arguments
Name Type Required args{ storeId: string; zipcode: string }Yes Returns
ListDealsResultinterface SafewayDeal { productId: number; name: string; brand: string | null; priceText: string | null; postPriceText: string | null; saleStory: string | null; categories: string[]; imageUrl: string | null; flyerName: string; // which live flyer this item came from flyerId: number; } interface ListDealsResult { storeId: string; deals: SafewayDeal[]; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/listDealsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.listDeals({ storeId: "3132", zipcode: "94611" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.listDeals({"storeId": "3132", "zipcode": "94611"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/listDeals \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"storeId":"3132","zipcode":"94611"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.listDeals({ storeId: "3132", zipcode: "94611" });searchRecipesSearches Safeway's recipes by meaning (the site's own semantic search) or lists one cookbook by slug: name, slug (what getRecipe takes), time…Arguments
Name Type Required argsSearchRecipesArgs | stringYes interface SearchRecipesArgs { query?: string; // ranked by meaning, not exact keyword cookbook?: string; // a /recipes/cookbook/<slug> slug, e.g. "quick", pass query OR cookbook storeId?: string; // from findStores; query only limit?: number; // default 20, max 50 }Returns
SearchRecipesResultinterface SafewayRecipePrice { priceCents: number; // US cents, the ingredient basket at the service's store basePriceCents: number | null; pricePerServingCents: number | null; discountPercentage: number | null; } interface SafewayRecipeSummary { id: string; slug: string; // what getRecipe takes name: string; url: string; imageUrl: string | null; calories: number | null; servings: number | null; cookingMinutes: number | null; course: string | null; isSponsored: boolean; price: SafewayRecipePrice | null; } interface SearchRecipesResult { query: string | null; cookbook: string | null; total: number | null; recipes: SafewayRecipeSummary[]; warnings: string[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/searchRecipesCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.searchRecipes({ query: "chicken tacos" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.searchRecipes({"query": "chicken tacos"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/searchRecipes \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"query":"chicken tacos"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.searchRecipes({ query: "chicken tacos" });
addToCartAdds a product to the signed-in customer's cart.Arguments
Name Type Required productIdstringSafeway's numeric product id (bpn), e.g. a listAisleProducts row's id.Yes storeIdstringA store id from findStores.Yes quantitynumber1-99, default 1.No zipCodestring5-digit delivery ZIP.No fulfillment"delivery" | "pickup"No Returns
AddToCartResultinterface SafewayCartItem { productId: string | null; name: string | null; quantity: number | null; price: number | null; } interface SafewayCart { cartId: string | null; storeId: string | null; items: SafewayCartItem[]; subtotal: number | null; } interface AddToCartResult { added: true; productId: string; quantity: number; storeId: string; cart: SafewayCart | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/addToCartCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.addToCart({ productId: "<productId>", storeId: "<storeId>" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.addToCart({"productId": "<productId>", "storeId": "<storeId>"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/addToCart \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"productId":"<productId>","storeId":"<storeId>"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.addToCart({ productId: "<productId>", storeId: "<storeId>" });removeFromCartRemoves an item from the signed-in customer's cart.Arguments
Name Type Required productIdstringYes storeIdstringYes zipCodestringNo fulfillment"delivery" | "pickup"No Returns
RemoveFromCartResultinterface SafewayCartItem { productId: string | null; name: string | null; quantity: number | null; price: number | null; } interface SafewayCart { cartId: string | null; storeId: string | null; items: SafewayCartItem[]; subtotal: number | null; } interface RemoveFromCartResult { removed: true; productId: string; storeId: string; cart: SafewayCart | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/removeFromCartCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.removeFromCart({ productId: "<productId>", storeId: "<storeId>" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.removeFromCart({"productId": "<productId>", "storeId": "<storeId>"}))curl -X POST https://api.bowmark.ai/v1/sites/safeway/removeFromCart \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"productId":"<productId>","storeId":"<storeId>"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.removeFromCart({ productId: "<productId>", storeId: "<storeId>" });updateCartItemChanges an item's quantity, substitution preference or note in the signed-in customer's cart.Arguments
Name Type Required productIdstringA product already in the cart.Yes storeIdstringA store id from findStores.Yes quantitynumberThe NEW total, 1-99.Yes zipCodestringNo fulfillment"delivery" | "pickup"No Returns
UpdateCartItemResultinterface SafewayCartItem { productId: string | null; name: string | null; quantity: number | null; price: number | null; } interface SafewayCart { cartId: string | null; storeId: string | null; items: SafewayCartItem[]; subtotal: number | null; } interface UpdateCartItemResult { updated: true; productId: string; quantity: number; storeId: string; cart: SafewayCart | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/safeway/updateCartItemCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.safeway.updateCartItem({ productId: "<productId>", storeId: "<storeId>", quantity: 1 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.safeway.updateCartItem({ "productId": "<productId>", "storeId": "<storeId>", "quantity": 1 }))curl -X POST https://api.bowmark.ai/v1/sites/safeway/updateCartItem \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"productId":"<productId>","storeId":"<storeId>","quantity":1}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.safeway.updateCartItem({ productId: "<productId>", storeId: "<storeId>", quantity: 1 });
Use it from code
- Node
npm i @bowmark/web - Python
pip install bowmark-web - HTTP
POST /v1/sites/safeway/<function> - OpenAPI
/v1/sites/safeway/openapi.json