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.

Functions
14
Sign-in
For account actions
Works with
MCP, HTTP, Node, Python

Connect

Just Safeway

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/safeway
Every site

One MCP server for Safeway and every other site Bowmark covers. Your agent looks up what it needs and calls it.

https://api.bowmark.ai/mcp
Set it up in your client

Both 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.

Read 11
  • 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

    NameTypeRequired
    args{ zipcode: string; radiusMiles?: number; limit?: number }Yes

    Returns FindStoresResult

    interface 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/findStores

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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 SafewayCart

    interface 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/getCart

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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 SafewayAccount

    interface 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/getMyAccount

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    argsGetRecipeArgs | stringYes
    interface GetRecipeArgs {
      slug: string;                    // from searchRecipes, or the recipe url
    }

    Returns SafewayRecipe

    interface 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/getRecipe

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    args{ query: string; storeId?: string } | stringYes

    Returns GetSearchSuggestionsResult

    interface 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/getSearchSuggestions

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    args{ storeId: string }Yes

    Returns SafewayStoreDetail

    interface 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/getStore

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    args{ storeId: string; zipcode: string }Yes

    Returns GetWeeklyAdResult

    interface 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/getWeeklyAd

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    args{ department: string; aisle: string; storeId: string; page?: number }Yes

    Returns ListAisleProductsResult

    interface 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/listAisleProducts

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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/listAisles

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    args{ storeId: string; zipcode: string }Yes

    Returns ListDealsResult

    interface 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/listDeals

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    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 SearchRecipesResult

    interface 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/searchRecipes

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.safeway.searchRecipes({ query: "chicken tacos" });
Act 3
  • addToCartAdds a product to the signed-in customer's cart.

    Arguments

    NameTypeRequired
    productIdstring
    Safeway's numeric product id (bpn), e.g. a listAisleProducts row's id.
    Yes
    storeIdstring
    A store id from findStores.
    Yes
    quantitynumber
    1-99, default 1.
    No
    zipCodestring
    5-digit delivery ZIP.
    No
    fulfillment"delivery" | "pickup"No

    Returns AddToCartResult

    interface 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/addToCart

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.safeway.addToCart({ productId: "<productId>", storeId: "<storeId>" });
  • removeFromCartRemoves an item from the signed-in customer's cart.

    Arguments

    NameTypeRequired
    productIdstringYes
    storeIdstringYes
    zipCodestringNo
    fulfillment"delivery" | "pickup"No

    Returns RemoveFromCartResult

    interface 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/removeFromCart

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = 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

    NameTypeRequired
    productIdstring
    A product already in the cart.
    Yes
    storeIdstring
    A store id from findStores.
    Yes
    quantitynumber
    The NEW total, 1-99.
    Yes
    zipCodestringNo
    fulfillment"delivery" | "pickup"No

    Returns UpdateCartItemResult

    interface 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/updateCartItem

    Call it

    import { bowmark } from "@bowmark/web";
    
    const result = await bowmark.providers.safeway.updateCartItem({
      productId: "<productId>",
      storeId: "<storeId>",
      quantity: 1
    });

Use it from code