# openFDA MCP

> openFDA: Access comprehensive U.S. public health records, including drug adverse events, food recalls, and medical device safety reports directly through your AI client. This MCP lets you construct complex queries using real-world data from the FDA databases.

## Overview
- **Category:** the-unthinkable
- **Price:** Free
- **Tags:** pharmacovigilance, medical-devices, food-safety, regulatory-data, public-health

## Description

You're dealing with critical public health information that lives across three massive regulatory datasets: drugs, food items, and medical devices. Instead of manually logging into multiple government websites and wrestling with complicated API key setups, this MCP lets your agent query all three areas in one go. You can ask highly specific questions—for example, finding every reported adverse event linked to Ibuprofen *and* tracking active Salmonella recalls in California—using raw Lucene syntax. The result is structured data pulled directly into your workflow. It’s a massive time-saver for anyone doing deep research or compliance checks. Because Vinkius hosts this MCP, you connect once from any compatible client and gain access to all these critical public health records.

## Tools

### query_drug_events
Searches the Drug Adverse Events database for reports of side effects, medication errors, or product quality complaints using Lucene syntax.

### query_food_recalls
Finds active and historical foodborne illness outbreaks and FDA enforcement reports by reason, status, or state.

### query_medical_devices
Searches the Medical Device Adverse Events database for records of malfunctions, injuries, or deaths associated with medical hardware.

## Prompt Examples

**Prompt:** 
```
What are the most recent food recalls related to Salmonella in California?
```

**Response:** 
```
I've searched the openFDA Food Enforcement database using the Lucene query `reason_for_recall:"salmonella" AND state:"CA"`. Here are the most recent recall events and associated product descriptions.
```

**Prompt:** 
```
Are there any reports of 'insomnia' after taking generic Ibuprofen?
```

**Response:** 
```
Searching the Drug Adverse Events dataset for `patient.drug.medicinalproduct:"IBUPROFEN" AND patient.reaction.reactionmeddrapt:"INSOMNIA"`. Yes, I've found multiple adverse event records. Here is a summary of the metadata.
```

## Capabilities

### Investigate Drug Side Effects
Query millions of patient reports detailing documented side effects, medication errors, or product quality complaints.

### Track Foodborne Outbreaks
Search historical and current FDA enforcement reports for pathogens like Salmonella or Listeria.

### Monitor Medical Device Safety
Find records of malfunctions, injuries, or deaths associated with specific medical hardware.

### Perform Advanced Data Queries
Run multi-variable analytical research by inputting raw query syntax across all three databases.

## Use Cases

### Investigating a new drug side effect
A researcher needs to know if Ibuprofen has any reported links to insomnia. They ask their agent to run a query using the 'query_drug_events' tool, getting immediate confirmation of multiple adverse event records without leaving their workspace.

### Auditing a food supply chain breach
A public safety team suspects a contaminated product. They use 'query_food_recalls' to track all Salmonella outbreaks in California, allowing them to pinpoint the exact source and recall status immediately.

### Analyzing device failure trends
A manufacturer needs to know about potential issues with pacemakers. They run 'query_medical_devices', filtering by malfunction event type and date range, giving them actionable data for a safety bulletin.

## Benefits

- Instead of sifting through scattered government PDFs, you can query all three databases—drug events, food recalls, and medical devices—in a single command. This saves hours of manual data aggregation.
- The openFDA MCP lets your agent use raw Lucene syntax for maximum control. You aren't limited to predefined search fields; you define the exact variables needed for analysis.
- You can rapidly check medication safety by using query_drug_events, finding adverse event patterns related to specific drugs or reactions across millions of records.
- Compliance checks become simple: Use query_food_recalls to track if a pathogen like Salmonella was reported in a specific state and what the recall status is.
- Monitor hardware integrity with query_medical_devices. This lets you check for malfunctions tied to generic device names or date ranges, which is crucial for risk assessment.

## How It Works

The bottom line is that your agent pulls highly technical, real-time regulatory data without needing dozens of API keys or manual web scraping.

1. You define the exact parameters for your search, specifying criteria like drug names, adverse reactions, or geographical locations.
2. Your AI agent uses the MCP to translate those parameters into a complex query understood by the FDA databases.
3. The system returns structured public health records, allowing you to analyze trends and specific incidents immediately.

## Frequently Asked Questions

**How do I find reports on specific medication side effects using openFDA?**
You use the 'query_drug_events' tool. You input criteria like `patient.drug.medicinalproduct:"ASPIRIN"` combined with the desired reaction to pull adverse event records.

**Does openFDA allow me to query food recalls by state?**
Yes, you can use 'query_food_recalls' and include the state parameter (e.g., `state:"CA"`) alongside the reason for recall to narrow your search.

**What kind of data does openFDA provide on medical devices?**
The 'query_medical_devices' tool provides details on injuries, malfunctions, and deaths linked to specific device types or event dates. It tracks safety reports from the MAUDE database.

**Can I combine drug and food data in openFDA?**
Yes, you can build complex queries that reference both drug events and food recalls simultaneously, allowing for highly correlated public health research.

**Is the data from openFDA real-time or historical?**
The MCP accesses live regulatory databases, providing both historical records (like past outbreaks) and current, ongoing reports. Always check the database's update frequency for the absolute latest information.