kroger-mcp

v0.4.0
kroger-mcp Checked 14 hours ago Published 1 month ago

FastMCP server for Kroger API integration

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_locations

Search for Kroger store locations near a zip code.

ParameterTypeDescription
chainOnly return stores of this chain, for example Kroger. See list_chains.
limitintegerNumber of results to return (1-200)
radius_in_milesintegerSearch radius in miles (1-100)
zip_code5-digit ZIP code. ZIP+4 is not accepted. Defaults to the user's ZIP code (see get_user_zip_code).

get_user_zip_code

Returns user zip code, it is anticipated that by exposing this to the LLM it will choose to use it rather than generating a zip code based on system data. Args: N/A Returns: Dictionary containing user Zip Code

get_location_details

Get detailed information about a specific Kroger store location.

ParameterTypeDescription
location_id *string8-character store locationId, for example 01400513. Get one from search_locations.

set_preferred_location

Set a preferred store location for future operations.

ParameterTypeDescription
location_id *string8-character store locationId, for example 01400513. Get one from search_locations.

get_preferred_location

Get the currently set preferred store location. No preferred location is a normal result (preferred_location_id null), not an error. Returns: Dictionary containing the preferred location information

check_location_exists

Check if a location exists in the Kroger system.

ParameterTypeDescription
location_id *string8-character store locationId, for example 01400513. Get one from search_locations.

get_product_images

Get an image for a specific product from the requested perspective. Use get_product_details first to see what perspectives are available (typically "front", "back", "left", "right").

ParameterTypeDescription
product_id *string13-digit productId or UPC, for example 0001111041700. Get one from search_products.
location_id8-character store locationId, for example 01400513. Defaults to the preferred location set with set_preferred_location.
perspectivestringThe image perspective to retrieve (default: "front")

search_products

Search for products at a Kroger store.

ParameterTypeDescription
search_term *stringProduct search term, for example 'milk' or 'organic apples'. At least 3 characters and at most 8 words separated by single spaces.
brandOnly return products of this brand. Case-sensitive, for example 'Kroger'.
fulfillmentOnly return products available by this fulfillment method: ais (available in store), csp (curbside pickup), dth (delivery to home), sth (ship to home)
limitintegerNumber of results to return (1-50)
location_id8-character store locationId, for example 01400513. Defaults to the preferred location set with set_preferred_location.

bulk_search_products

Search for multiple products in a single tool call to reduce round-trips.

ParameterTypeDescription
searches *arrayList of search queries (1-25). Each item should have: - term: The search term (e.g., "milk", "bread"); 3+ characters, at most 8 words - limit: Number of results per search (1-50, default:…
location_id8-character store locationId, for example 01400513. Defaults to the preferred location set with set_preferred_location.

get_product_details

Get detailed information about a specific product.

ParameterTypeDescription
product_id *string13-digit productId or UPC, for example 0001111041700. Get one from search_products.
location_id8-character store locationId, for example 01400513. Defaults to the preferred location set with set_preferred_location.

search_products_by_id

Search for products by their specific product ID.

ParameterTypeDescription
product_id *string13-digit productId or UPC, for example 0001111041700. Get one from search_products.
location_id8-character store locationId, for example 01400513. Defaults to the preferred location set with set_preferred_location.

add_items_to_cart

Add a single item to the user's Kroger cart and track it locally. If the user doesn't specifically indicate a preference for pickup or delivery, you should ask them which modality they prefer before calling this tool.

ParameterTypeDescription
product_id *string13-digit productId or UPC, for example 0001111041700. Get one from search_products.
modalitystringHow the order will be fulfilled: PICKUP or DELIVERY (uppercase)
quantityintegerQuantity to add, 1 or more

bulk_add_to_cart

Add multiple items to the user's Kroger cart in a single operation. If the user doesn't specifically indicate a preference for pickup or delivery, you should ask them which modality they prefer before calling this tool.

ParameterTypeDescription
items *arrayList of items to add. Each item should have: - product_id: The product ID or UPC - quantity: Quantity to add (default: 1) - modality: PICKUP or DELIVERY (default: PICKUP)

view_current_cart

View the current cart contents tracked locally. Note: This tool can only see items that were added via this MCP server. The Kroger API does not provide permission to query the actual user cart contents. Returns: Dictionary containing current cart items and summary

remove_from_cart

Remove an item from the local cart tracking only. IMPORTANT: This tool CANNOT remove items from the actual Kroger cart in the app/website. It only updates our local tracking to stay in sync. The user must remove the item from their actual cart through the Kroger app or website themselves. Use this tool only when: 1. The user has already removed an item from their Kroger cart through the app/website 2. You need to update the local tracking to reflect that change

ParameterTypeDescription
product_id *stringThe product ID to remove from the local tracking
modalitySpecific modality to remove (if None, removes all instances)

clear_current_cart

Clear all items from the local cart tracking only. IMPORTANT: This tool CANNOT remove items from the actual Kroger cart in the app/website. It only clears our local tracking. The user must remove items from their actual cart through the Kroger app or website themselves. Use this tool only when: 1. The user has already cleared their Kroger cart through the app/website 2. You need to update the local tracking to reflect that change 3. Or when the local tracking is out of sync with the actual cart Returns: Dictionary confirming the local cart tracking was cleared

mark_order_placed

Mark the current cart as an order that has been placed and move it to order history. Use this after you've completed checkout on the Kroger website/app.

ParameterTypeDescription
order_notesOptional notes about the order

view_order_history

View the history of placed orders. Note: This tool can only see orders that were explicitly marked as placed via this MCP server. The Kroger API does not provide permission to query the actual order history from Kroger's systems.

ParameterTypeDescription
limitintegerNumber of recent orders to show (1-50)

list_chains

Get a list of all Kroger-owned chains. Returns: Dictionary containing chain information

get_chain_details

Get detailed information about a specific Kroger chain.

ParameterTypeDescription
chain_name *stringChain name, for example Kroger or Ralphs. See list_chains.

check_chain_exists

Check if a chain exists in the Kroger system.

ParameterTypeDescription
chain_name *stringChain name, for example Kroger or Ralphs. See list_chains.

list_departments

Get a list of all available departments in Kroger stores. Returns: Dictionary containing department information

get_department_details

Get detailed information about a specific department.

ParameterTypeDescription
department_id *string2-character department ID. Get one from list_departments.

check_department_exists

Check if a department exists in the Kroger system.

ParameterTypeDescription
department_id *string2-character department ID. Get one from list_departments.

get_user_profile

Get the authenticated user's Kroger profile information. The Identity API needs a sign-in that grants the profile.compact scope. Returns: Dictionary containing user profile data

test_authentication

Check whether the user is signed in and the saved token has not expired. An expired token is refreshed if possible. The check compares the token's expiry time with the clock, so a sign-in that Kroger revoked early still reports token_valid true until a cart call fails. A user who is not signed in is a normal result (token_valid false), not an error. Returns: Dictionary indicating authentication status

get_authentication_info

Get information about the current authentication state and token. A user who is not signed in is a normal result (authenticated false), not an error. Returns: Dictionary containing authentication information

force_reauthenticate

Force re-authentication by clearing the current authentication token. Use this if you're having authentication issues or need to log in as a different user. This deletes the saved user token. The local cart tracking and order history are kept. Returns: Dictionary indicating the re-authentication was initiated

get_current_datetime

Get the current system date and time. This tool is useful for comparing with cart checkout dates, order history, or any other time-sensitive operations. Returns: Dictionary containing current date and time information

start_authentication

Start the OAuth authentication flow with Kroger. This tool returns a URL that the user needs to open in their browser to authenticate with Kroger. After authorization, the user will be redirected to a callback URL that they need to copy and paste back. If Kroger shows invalid_scope instead of the sign-in page, the app is not registered for one of the requested scopes (the scope field of the result, set by KROGER_USER_SCOPES in the server's configuration). Returns: Dictionary with authorization URL, the requested scopes, and instructions

complete_authentication

Complete the OAuth flow using the redirect URL from Kroger. After opening the auth URL in your browser and authorizing the app, you'll be redirected to a callback URL. Copy that entire URL and pass it to this tool to complete the authentication process.

ParameterTypeDescription
redirect_url *stringThe full URL from your browser after authorization