Grocery Search MCP Server
Used for data models to structure requests and responses for the grocery search functionality.
Planned for future enhancement to provide caching for price data, though not currently implemented.
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., "@Grocery Search MCP Serversearch for protein bars at Trader Joe's"
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.
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: Instacart MCP Server
Installation
Clone the repository:
git clone <repository-url>
cd MCP_Food_SearchInstall dependencies:
pip install -r requirements.txtOr install in development mode:
pip install -e .Usage
Running the MCP Server
Start the server using:
python -m grocery_search_mcp.serverOr using the script entry point:
grocery-search-mcpTesting the Implementation
Run the test script to verify functionality:
python test_server.pyMCP 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 forstore(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 implementationData Models (
models.py): Pydantic models for requests/responsesScrapers (
scraper.py): Web scraping logic for different storesNutrition 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
This server cannot be deployed
Maintenance
Related MCP Connectors
Cached US grocery prices, age disclosed on every row - search, compare across banners, coverage.
Agent-native product catalog: 300M+ products, 150,000+ stores, deliver_to ranking.
AI-agent product catalog: search, lookup & purchase routing over verified merchant data.
Where to buy a whole grocery list today: local prices, per-unit and cross-store comparison.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.3MIT
- AlicenseAqualityCmaintenanceEnables AI agents to search for products, manage shopping carts, and place grocery orders on Instacart using browser automation. It includes comprehensive tools for store discovery, product searching, and secure checkout with explicit user confirmation.1135 npm10MIT
- FlicenseAqualityDmaintenanceEnables 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.84-
- AlicenseNot gradedqualityCmaintenanceProvides tools to search and retrieve USDA Food Data Central information, including food items, nutrients, and food groups, enabling AI agents to query food data through natural language.1 npmMIT