Food Safety & Recall MCP avatar

Food Safety & Recall MCP

Pricing

from $50.00 / 1,000 tool calls

Go to Apify Store
Food Safety & Recall MCP

Food Safety & Recall MCP

Production-ready MCP server for FDA food safety intelligence. Query food recalls, adverse events, and safety alerts via OpenFDA. Built for supply chain compliance, food industry risk monitoring, and AI agent workflows.

Pricing

from $50.00 / 1,000 tool calls

Rating

0.0

(0)

Developer

MCP Pro

MCP Pro

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

Share

A production-ready Model Context Protocol (MCP) server that exposes FDA food safety data — recalls, adverse events, and safety alerts — powered by OpenFDA.

Built with FastMCP and Python. Deployable to Apify or any Docker-compatible host.


Tools

food_search_recalls

Search FDA food enforcement (recall) records by product keyword.

ParameterTypeRequiredDescription
product_namestringYesKeyword to search in product descriptions
date_fromstringNoStart date filter (YYYY-MM-DD)
limitintegerNoMax results (default 10, max 100)

Returns: recall_number, product_description, reason_for_recall, status, recall_initiation_date, recalling_firm, distribution_pattern, classification (Class I/II/III).


food_get_recall_detail

Retrieve the complete record for a specific recall by its FDA recall number.

ParameterTypeRequiredDescription
recall_numberstringYesFDA recall number (e.g. F-0001-2024)

Returns: Full recall record including product_quantity, code_info, voluntary_mandated, firm address, and all standard recall fields.


food_search_adverse_events

Search FDA food adverse event reports by ingredient or brand name.

ParameterTypeRequiredDescription
ingredientstringYesIngredient or brand keyword
date_fromstringNoStart date filter (YYYY-MM-DD)
limitintegerNoMax results (default 10, max 100)

Returns: report_number, date_started, outcomes, reactions, products (with industry name), consumer demographics.


food_get_safety_alerts

Get the most recent FDA food safety alerts, optionally filtered by food category.

ParameterTypeRequiredDescription
categorystringNoFood category: dairy, produce, meat, poultry, seafood, bakery, beverage, snack, supplement, nut, grain, spice, sauce, frozen, canned
limitintegerNoMax results (default 10, max 100)

Returns: Alerts sorted by most-recent date with classification, recalling_firm, distribution_pattern.


Health Endpoint

GET /health
→ HTTP 200 {"status": "ok"}

Used by Apify and load balancers for liveness probes.


Quick Start

Local (stdio transport)

pip install -r requirements.txt
export OPENFDA_API_KEY=your_key_here # optional
MCP_TRANSPORT=stdio python src/server.py

Local (SSE / HTTP transport)

pip install -r requirements.txt
python src/server.py
# Server runs on http://localhost:8080

Docker

docker build -f .actor/Dockerfile -t food-safety-mcp .
docker run -p 8080:8080 -e OPENFDA_API_KEY=your_key food-safety-mcp

Apify

Push to Apify using the Apify CLI:

apify login
apify push

Or deploy via the Apify Console by connecting this GitHub repository.


Environment Variables

VariableDefaultDescription
OPENFDA_API_KEY(none)OpenFDA API key. Optional — falls back to anonymous tier (1 000 req/day/IP). Get one free.
PORT8080HTTP port for SSE transport
HOST0.0.0.0Bind address
MCP_TRANSPORTssesse for HTTP, stdio for stdio MCP transport

Running Tests

pip install -r requirements.txt
pytest tests/ -v

Classification Guide

ClassMeaning
Class IReasonable probability of serious adverse health consequences or death
Class IIMay cause temporary adverse health consequences; remote probability of serious risk
Class IIIUnlikely to cause adverse health consequences

Data Source

All data is sourced from the OpenFDA API, a public API maintained by the U.S. Food and Drug Administration. Data is provided as-is; always verify critical safety information directly with the FDA.

  • Food Enforcement: https://api.fda.gov/food/enforcement.json
  • Food Adverse Events: https://api.fda.gov/food/event.json

License

MIT