# OpenFDA Intelligence MCP Server (`andrew_avina/openfda-intelligence-mcp`) Actor

The FDA's openFDA program contains over 20 million records across drug adverse events, recalls, product labels, medical device malfunction reports, and food enforcement actions. This data drives billion-dollar regulatory decisions â€” but the raw API is complex, inconsistently...

- **URL**: https://apify.com/andrew\_avina/openfda-intelligence-mcp.md
- **Developed by:** [Andrew Avina](https://apify.com/andrew_avina) (community)
- **Categories:** MCP servers, Business
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## openfda-intelligence-mcp

> **Every FDA drug recall, adverse event, and safety action â€” structured for AI.**

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-brightgreen)](https://apify.com/actors/openfda-intelligence-mcp)
[![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-blue)](https://modelcontextprotocol.io)
[![Data Source](https://img.shields.io/badge/Data-openFDA-red)](https://open.fda.gov)
[![FDA Endpoints](https://img.shields.io/badge/Endpoints-5-orange)](https://open.fda.gov/apis)
[![Records](https://img.shields.io/badge/Records-20M%2B-critical)](https://open.fda.gov)

---

### What Is This?

The FDA's openFDA program contains over **20 million records** across drug adverse events, recalls, product labels, medical device malfunction reports, and food enforcement actions. This data drives billion-dollar regulatory decisions â€” but the raw API is complex, inconsistently structured, and completely inaccessible to AI workflows.

**openfda-intelligence-mcp** wraps all five major openFDA endpoints into a single, consistent, MCP-compatible actor. One tool call gives your AI assistant access to the same underlying data that powers FDA safety surveillance, pharmacovigilance teams, and medtech regulatory filings.

Whether you're a pharma compliance officer running weekly signal detection, a medtech startup doing pre-submission due diligence, or a healthcare journalist investigating a drug's safety record â€” this actor gives you a structured, AI-queryable interface to the FDA's entire public safety database.

---

### The Five Endpoints

| Endpoint | FDA Source | Records Available | What It Contains |
|---|---|---|---|
| **Adverse Events (FAERS)** | FDA Adverse Event Reporting System | 18M+ reports | Patient-reported drug side effects, outcomes, seriousness |
| **Drug Recalls (Enforcement)** | FDA Enforcement Reports | 50,000+ actions | Recall class, reason, product description, firm name |
| **Drug Labels** | DailyMed / SPL | 140,000+ labels | Full prescribing information, contraindications, warnings |
| **Device Events (MDR)** | Medical Device Reporting | 9M+ reports | Device malfunctions, injuries, deaths linked to medical devices |
| **Food Enforcement** | FDA Enforcement Reports | 15,000+ actions | Food recalls, market withdrawals, safety alerts |

---

### Who Uses This?

| User Type | Specific Use Case | Value Delivered |
|---|---|---|
| **Pharma Compliance Teams** | Weekly FAERS signal detection for marketed drugs | Catch safety signals 2â€“3 weeks before formal FDA safety communications |
| **Medtech Startups** | Pre-submission 510(k) competitive device safety analysis | Pull MDR reports for predicate devices to anticipate FDA questions |
| **Healthcare AI Builders** | Training data for clinical decision support | Structured adverse event data with MedDRA coding |
| **Investigative Health Journalists** | Drug safety investigative reporting | Cross-reference FAERS reports with enforcement actions |
| **Biotech Due Diligence Analysts** | Safety profile of acquired drug candidates | Historical adverse event burden vs. comparator drugs |
| **Hospital Pharmacy Teams** | Drug recall monitoring | Real-time recall alerts for formulary drugs |
| **Regulatory Affairs Consultants** | Label comparison and gap analysis | Pull competitor labels side-by-side |
| **Medical Malpractice Attorneys** | Adverse event history for litigation | Document FDA-received adverse event frequency |

---

### Feature Overview

| Feature | Detail |
|---|---|
| **Adverse Event Search** | Filter by drug name, reaction, seriousness, report date, outcome |
| **Recall Search** | Filter by product name, recall class (I/II/III), firm, date |
| **Label Search** | Full-text search across 140K+ SPL drug labels |
| **Device Event Search** | Filter by device name, manufacturer, event type, date |
| **Food Enforcement Search** | Filter by product type, recalling firm, reason for recall |
| **MedDRA Code Filtering** | Filter adverse events by standardized MedDRA reaction codes |
| **Seriousness Flags** | Filter by serious/non-serious, death, hospitalization, life-threatening |
| **Date Range Queries** | All endpoints support receive date and action date filtering |
| **Aggregate Statistics** | Count queries: top reactions for a drug, top recalled products by firm |
| **Batch Mode** | Run bulk queries across multiple drugs/devices |
| **MCP Real-Time** | Live tool calls from Claude Desktop and compatible AI clients |

---

### Quick Start

#### MCP Mode

```json
{
  "mcpServers": {
    "openfda-intelligence": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/mcp-client",
        "--actor-id",
        "your-username/openfda-intelligence-mcp",
        "--token",
        "YOUR_APIFY_TOKEN"
      ]
    }
  }
}
````

Ask Claude:

> "Search FDA adverse events for metformin. Focus on serious events involving lactic acidosis reported in the last 3 years. Show me the count trend year-over-year."

#### Batch Mode â€” Drug Safety Monitor

```json
{
  "mode": "batch",
  "formularyDrugs": ["metformin", "semaglutide", "apixaban", "rosuvastatin"],
  "checkEndpoints": ["adverseEvents", "recalls"],
  "dateFrom": "2024-01-01",
  "seriousOnly": true
}
```

#### API Mode

```bash
curl -X POST https://api.apify.com/v2/acts/your-username~openfda-intelligence-mcp/run-sync \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "adverseEvents",
    "drugName": "ozempic",
    "reactionTerm": "pancreatitis",
    "seriousOnly": true,
    "dateFrom": "2021-01-01",
    "maxResults": 100
  }'
```

***

### MCP Tools Reference

#### `search_adverse_events`

Search the FDA Adverse Event Reporting System (FAERS).

**Parameters:**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `drugName` | string | No | Generic or brand drug name |
| `reactionTerm` | string | No | Adverse reaction term (MedDRA preferred term) |
| `seriousOnly` | boolean | No | Filter to serious events only (default: false) |
| `outcomes` | array | No | Filter by outcome: `death`, `hospitalization`, `life_threatening`, `disability`, `congenital_anomaly` |
| `reportDateFrom` | string | No | Report receive date start (YYYYMMDD) |
| `reportDateTo` | string | No | Report receive date end (YYYYMMDD) |
| `ageGroup` | string | No | `pediatric`, `adult`, `elderly` |
| `sex` | string | No | `male`, `female` |
| `maxResults` | integer | No | Max results (default: 50, max: 1000) |
| `countBy` | string | No | Return aggregate count by: `reaction`, `drug`, `year`, `outcome` |

**Example response:**

```json
{
  "adverseEvents": [
    {
      "safetyReportId": "US-PFIZER-2023-1234567",
      "receiveDate": "20230615",
      "serious": true,
      "seriousnessHospitalization": true,
      "primaryDrug": {
        "name": "OZEMPIC",
        "genericName": "semaglutide",
        "indication": "TYPE 2 DIABETES",
        "dosage": "0.5 MG/DOSE",
        "route": "SUBCUTANEOUS"
      },
      "reactions": [
        { "term": "Pancreatitis acute", "outcome": "Recovered/resolved" }
      ],
      "patientAge": 58,
      "patientSex": "Female",
      "country": "US",
      "reporterQualification": "Physician"
    }
  ],
  "totalCount": 2847,
  "queryMetadata": { "dataSource": "openFDA FAERS", "coverage": "1990-present" }
}
```

#### `search_drug_recalls`

Search FDA drug enforcement and recall actions.

**Parameters:**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `productDescription` | string | No | Product name or description search |
| `recallingFirm` | string | No | Company issuing the recall |
| `recallClass` | string | No | `I` (dangerous), `II` (may harm), `III` (unlikely to harm) |
| `reasonForRecall` | string | No | Text search in reason field |
| `initiationDateFrom` | string | No | Recall initiation date start |
| `initiationDateTo` | string | No | Recall initiation date end |
| `voluntaryMandated` | string | No | `Voluntary` or `FDA Mandated` |
| `maxResults` | integer | No | Max results |

#### `search_drug_labels`

Search FDA-approved drug prescribing information.

**Parameters:**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `brandName` | string | No | Drug brand name |
| `genericName` | string | No | Generic drug name |
| `activeIngredient` | string | No | Active ingredient search |
| `manufacturer` | string | No | Manufacturer name |
| `labelSection` | string | No | Specific section: `warnings`, `contraindications`, `adverse_reactions`, `dosage`, `indications` |
| `searchText` | string | No | Full-text search across entire label |

#### `search_device_events`

Search FDA Medical Device Reports (MDRs).

**Parameters:**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `deviceName` | string | No | Device brand or generic name |
| `manufacturer` | string | No | Device manufacturer name |
| `eventType` | string | No | `malfunction`, `injury`, `death`, `other` |
| `deviceClass` | string | No | FDA device class: `I`, `II`, `III` |
| `productCode` | string | No | FDA product code |
| `dateFrom` | string | No | Event date start |
| `dateTo` | string | No | Event date end |
| `maxResults` | integer | No | Max results |

#### `search_food_enforcement`

Search FDA food recall and enforcement actions.

**Parameters:**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `productDescription` | string | No | Food product name or description |
| `recallingFirm` | string | No | Company issuing the recall |
| `reasonForRecall` | string | No | Reason text search (e.g., "Listeria", "undeclared allergen") |
| `recallClass` | string | No | `I`, `II`, or `III` |
| `dateFrom` | string | No | Recall initiation date start |
| `dateTo` | string | No | Recall initiation date end |

***

### Use Case Recipes

#### Recipe 1: Pharma Compliance â€” Weekly Signal Detection

**Scenario:** Your drug Luxivatrex was approved 18 months ago. You need to monitor FAERS weekly for new serious adverse event signals, especially hepatic events.

**Prompt:**

> "Search FDA adverse events for the drug 'luxivatrex' from the past 7 days. Focus on serious events. Categorize by reaction term, show me counts, and flag any liver-related terms (hepatic failure, elevated transaminases, jaundice) immediately."

**Batch config for weekly monitoring:**

```json
{
  "mode": "batch",
  "monitorDrugs": ["luxivatrex", "competitor-drug-a"],
  "endpoints": ["adverseEvents"],
  "seriousOnly": true,
  "lookbackDays": 7,
  "alertKeywords": ["hepatic failure", "liver", "jaundice", "transaminase"]
}
```

#### Recipe 2: Medtech 510(k) Pre-Submission Due Diligence

**Scenario:** You're submitting a 510(k) for a new insulin infusion pump. Your predicate device is the MedTech Pro 3000. You need to characterize its MDR history.

**Prompt:**

> "Pull all FDA Medical Device Reports for the 'MedTech Pro 3000' insulin infusion pump from the past 5 years. Categorize by event type (malfunction vs injury vs death). What are the most common malfunction modes? What percentage resulted in patient injury?"

#### Recipe 3: Investigative Journalism â€” Drug Safety Pattern

**Prompt:**

> "I'm investigating safety issues with GLP-1 drugs. Search adverse events for semaglutide AND tirzepatide AND liraglutide from 2021 to present. For each: total serious events, top 5 reactions, death count. Then check if any of these drugs have active FDA recalls. Give me a comparison table."

#### Recipe 4: Hospital Pharmacy â€” Formulary Recall Monitor

**Prompt:**

> "Check for any FDA Class I or Class II drug recalls initiated in the last 30 days for these formulary drugs: metoprolol, lisinopril, atorvastatin, metformin, amlodipine, omeprazole, levothyroxine. If any recalls found, give me the lot numbers and recall reason."

#### Recipe 5: Biotech M\&A Due Diligence

**Prompt:**

> "We're acquiring a company that markets the drug 'Xorambix'. Pull everything: full adverse event history, any recalls, the current approved label, and flag any FDA warning letters visible in the enforcement database. Summarize the safety burden I'm inheriting."

***

### Claude Desktop Configuration

```json
{
  "mcpServers": {
    "openfda-intelligence": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/mcp-client",
        "--actor-id",
        "your-username/openfda-intelligence-mcp",
        "--token",
        "apify_api_XXXXXXXXXXXXXXXXXXXX"
      ]
    }
  }
}
```

**Test query after setup:** "Search FDA adverse events for aspirin, top 10 reactions by count."

***

### Pricing & Usage

| Tier | Price | Includes |
|---|---|---|
| **Free** | $0 | 200 API calls/month across all endpoints |
| **Starter** | $19/month | 5,000 calls/month |
| **Professional** | $79/month | 30,000 calls/month + batch mode |
| **Compliance** | $299/month | Unlimited + weekly monitoring + email alerts |

***

### Data Source & Freshness

- **FAERS:** Updated quarterly; latest quarter typically available within 90 days of close
- **Enforcement (Recalls):** Near real-time; updated weekly
- **Drug Labels:** Updated as SPL submissions are processed; typically within days of FDA approval
- **MDR (Device Events):** Approximately 2â€“3 week lag from event submission
- **Food Enforcement:** Updated weekly
- **Total dataset coverage:** Adverse events from 1990; enforcement from 2004; labels from 2009

***

### Technical Notes

- All data sourced directly from api.fda.gov â€” no third-party intermediaries
- openFDA enforces 1,000 results per query limit; this actor handles pagination automatically
- FAERS data represents *reported* events, not confirmed causal relationships â€” appropriate disclaimers are embedded in all responses
- Drug name matching includes both brand and generic name normalization
- MedDRA coding (where present in FAERS) is preserved in structured output
- Device event "event type" field is normalized across FDA's inconsistent historical coding

***

### Support & Issues

- **GitHub:** [github.com/your-username/openfda-intelligence-mcp](https://github.com)
- **Documentation:** Inline with MCP tool schemas
- **Email:** support@your-domain.com

*Data sourced from openFDA (api.fda.gov). Not affiliated with the US Food and Drug Administration. Adverse event data does not constitute evidence of causality.*

# Actor input Schema

## `query` (type: `string`):

Drug name (brand or generic), product name, or keyword to search (e.g. 'Ozempic', 'semaglutide', 'ibuprofen', 'pacemaker')

## `endpoint` (type: `string`):

Which FDA database to query. 'all' runs every endpoint.

## `seriousOnly` (type: `boolean`):

For adverse events: only return reports flagged as serious (death, hospitalization, life-threatening, disability)

## `classification` (type: `string`):

For recalls: filter by severity class. Class I = life-threatening, Class II = temporary risk, Class III = minimal risk.

## `dateFrom` (type: `string`):

Filter results from this date onwards (adverse event receive date or recall initiation date)

## `dateTo` (type: `string`):

Filter results up to this date (adverse events only)

## `limit` (type: `integer`):

Maximum number of records to return per endpoint (max 500)

## `serveMcp` (type: `boolean`):

When enabled, starts an MCP-compatible HTTP server on port 4321 instead of returning a batch dataset. Use this to connect Claude Desktop or any MCP client directly to FDA data.

## Actor input object example

```json
{
  "query": "",
  "endpoint": "adverse_events",
  "seriousOnly": false,
  "classification": "",
  "dateFrom": "",
  "dateTo": "",
  "limit": 100,
  "serveMcp": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("andrew_avina/openfda-intelligence-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("andrew_avina/openfda-intelligence-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call andrew_avina/openfda-intelligence-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=andrew_avina/openfda-intelligence-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OpenFDA Intelligence MCP Server",
        "description": "The FDA's openFDA program contains over 20 million records across drug adverse events, recalls, product labels, medical device malfunction reports, and food enforcement actions. This data drives billion-dollar regulatory decisions â€” but the raw API is complex, inconsistently...",
        "version": "0.1",
        "x-build-id": "aRdla9yFvVXeD3XlI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/andrew_avina~openfda-intelligence-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-andrew_avina-openfda-intelligence-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/andrew_avina~openfda-intelligence-mcp/runs": {
            "post": {
                "operationId": "runs-sync-andrew_avina-openfda-intelligence-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/andrew_avina~openfda-intelligence-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-andrew_avina-openfda-intelligence-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "Drug / Product / Keyword",
                        "type": "string",
                        "description": "Drug name (brand or generic), product name, or keyword to search (e.g. 'Ozempic', 'semaglutide', 'ibuprofen', 'pacemaker')",
                        "default": ""
                    },
                    "endpoint": {
                        "title": "FDA Endpoint",
                        "enum": [
                            "adverse_events",
                            "recalls",
                            "drug_labels",
                            "device_events",
                            "food_enforcement",
                            "all"
                        ],
                        "type": "string",
                        "description": "Which FDA database to query. 'all' runs every endpoint.",
                        "default": "adverse_events"
                    },
                    "seriousOnly": {
                        "title": "Serious Events Only",
                        "type": "boolean",
                        "description": "For adverse events: only return reports flagged as serious (death, hospitalization, life-threatening, disability)",
                        "default": false
                    },
                    "classification": {
                        "title": "Recall Classification",
                        "enum": [
                            "",
                            "Class I",
                            "Class II",
                            "Class III"
                        ],
                        "type": "string",
                        "description": "For recalls: filter by severity class. Class I = life-threatening, Class II = temporary risk, Class III = minimal risk.",
                        "default": ""
                    },
                    "dateFrom": {
                        "title": "Date From (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Filter results from this date onwards (adverse event receive date or recall initiation date)",
                        "default": ""
                    },
                    "dateTo": {
                        "title": "Date To (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Filter results up to this date (adverse events only)",
                        "default": ""
                    },
                    "limit": {
                        "title": "Result Limit",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of records to return per endpoint (max 500)",
                        "default": 100
                    },
                    "serveMcp": {
                        "title": "MCP Server Mode",
                        "type": "boolean",
                        "description": "When enabled, starts an MCP-compatible HTTP server on port 4321 instead of returning a batch dataset. Use this to connect Claude Desktop or any MCP client directly to FDA data.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
