Skip to main content
Glama
ajaykallepalli

Grocery Search MCP Server

Grocery Search MCP Server

An MCP (Model Context Protocol) server that provides grocery price and nutritional information search capabilities. This server allows AI agents to search for food products, compare prices, and analyze nutritional content across different grocery stores.

Features

  • Product Search: Search for grocery items by name across supported stores

  • Price Comparison: Get current pricing information for food products

  • Nutritional Analysis: Retrieve protein, calorie, and other macro information

  • Protein-per-Dollar Ranking: Automatically rank products by protein content per dollar spent

  • Store Support: Currently supports Trader Joe's (more stores coming soon)

Related MCP server: Food Data Central MCP Server

Installation

  1. Clone the repository:

git clone <repository-url>
cd MCP_Food_Search
  1. Install dependencies:

pip install -r requirements.txt

Or install in development mode:

pip install -e .

Usage

Running the MCP Server

Start the server using:

python -m grocery_search_mcp.server

Or using the script entry point:

grocery-search-mcp

Testing the Implementation

Run the test script to verify functionality:

python test_server.py

MCP Tool Usage

The server provides one main tool:

GroceryPrices.search

Search for grocery items with price and nutritional information.

Parameters:

  • query (required): Food or product name to search for

  • store (optional): Store to search, defaults to "trader_joes"

Example:

{
  "query": "protein bar",
  "store": "trader_joes"
}

Response: Returns a formatted list of products with:

  • Product name and brand

  • Price and package size

  • Protein content and calories

  • Protein-per-dollar ratio

  • Nutritional information status

Architecture

The server consists of several key components:

  • MCP Server (server.py): Main MCP protocol implementation

  • Data Models (models.py): Pydantic models for requests/responses

  • Scrapers (scraper.py): Web scraping logic for different stores

  • Nutrition Estimation: Basic nutritional information estimation

Current Implementation

This initial version includes:

  • ✅ Basic MCP server setup

  • ✅ Trader Joe's product search (mock data for now)

  • ✅ Nutritional estimation based on product names

  • ✅ Protein-per-dollar calculation

  • ✅ Error handling and logging

Future Enhancements

  • Real web scraping implementation

  • Integration with USDA FoodData Central API

  • Redis caching for price data

  • Additional store support (Safeway, Kroger, etc.)

  • Real-time inventory checking

  • Advanced nutritional analysis

Contributing

This is a learning project. Feel free to submit issues and enhancement requests.

License

MIT License

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to access the Open Food Facts database to query detailed food product information, nutritional data, and environmental scores. Supports product lookup by barcode, smart search with filtering, nutritional analysis, product comparison, and dietary recommendations to help users make informed food choices.
    5
    1
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables AI agents to search the USDA's FoodData Central database and retrieve detailed nutritional information and ingredient lists. It supports comprehensive food data access through keyword searches and structured queries for specific food items.
    3
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to track global food prices, search products by barcode or name, and compare costs across 27 countries. It provides tools for real-time price scraping and data aggregation from major international supermarket chains.
    8
    4

View all related MCP servers

Related MCP Connectors

  • Agent-native product catalog for AI shopping agents. 296M+ products, 28 countries.

  • Search products in nearby stores. Agents can also list items for sale on a user's behalf.

  • Web search, page extraction and structured commerce, social and business data for AI agents

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ajaykallepalli/MCP_Food_Search'

If you have feedback or need assistance with the MCP directory API, please join our Discord server