fda-database
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
Install
mkdir -p .claude/skills/fda-database && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1032" && unzip -o skill.zip -d .claude/skills/fda-database && rm skill.zipInstalls to .claude/skills/fda-database
About this skill
FDA Database Access
Overview
Access comprehensive FDA regulatory data through openFDA, the FDA's initiative to provide open APIs for public datasets. Query information about drugs, medical devices, foods, animal/veterinary products, and substances using Python with standardized interfaces.
Key capabilities:
- Query adverse events for drugs, devices, foods, and veterinary products
- Access product labeling, approvals, and regulatory submissions
- Monitor recalls and enforcement actions
- Look up National Drug Codes (NDC) and substance identifiers (UNII)
- Analyze device classifications and clearances (510k, PMA)
- Track drug shortages and supply issues
- Research chemical structures and substance relationships
When to Use This Skill
This skill should be used when working with:
- Drug research: Safety profiles, adverse events, labeling, approvals, shortages
- Medical device surveillance: Adverse events, recalls, 510(k) clearances, PMA approvals
- Food safety: Recalls, allergen tracking, adverse events, dietary supplements
- Veterinary medicine: Animal drug adverse events by species and breed
- Chemical/substance data: UNII lookup, CAS number mapping, molecular structures
- Regulatory analysis: Approval pathways, enforcement actions, compliance tracking
- Pharmacovigilance: Post-market surveillance, safety signal detection
- Scientific research: Drug interactions, comparative safety, epidemiological studies
Quick Start
1. Basic Setup
from scripts.fda_query import FDAQuery
# Initialize (API key optional but recommended)
fda = FDAQuery(api_key="YOUR_API_KEY")
# Query drug adverse events
events = fda.query_drug_events("aspirin", limit=100)
# Get drug labeling
label = fda.query_drug_label("Lipitor", brand=True)
# Search device recalls
recalls = fda.query("device", "enforcement",
search="classification:Class+I",
limit=50)
2. API Key Setup
While the API works without a key, registering provides higher rate limits:
- Without key: 240 requests/min, 1,000/day
- With key: 240 requests/min, 120,000/day
Register at: https://open.fda.gov/apis/authentication/
Set as environment variable:
export FDA_API_KEY="your_key_here"
3. Running Examples
# Run comprehensive examples
python scripts/fda_examples.py
# This demonstrates:
# - Drug safety profiles
# - Device surveillance
# - Food recall monitoring
# - Substance lookup
# - Comparative drug analysis
# - Veterinary drug analysis
FDA Database Categories
Drugs
Access 6 drug-related endpoints covering the full drug lifecycle from approval to post-market surveillance.
Endpoints:
- Adverse Events - Reports of side effects, errors, and therapeutic failures
- Product Labeling - Prescribing information, warnings, indications
- NDC Directory - National Drug Code product information
- Enforcement Reports - Drug recalls and safety actions
- Drugs@FDA - Historical approval data since 1939
- Drug Shortages - Current and resolved supply issues
Common use cases:
# Safety signal detection
fda.count_by_field("drug", "event",
search="patient.drug.medicinalproduct:metformin",
field="patient.reaction.reactionmeddrapt")
# Get prescribing information
label = fda.query_drug_label("Keytruda", brand=True)
# Check for recalls
recalls = fda.query_drug_recalls(drug_name="metformin")
# Monitor shortages
shortages = fda.query("drug", "drugshortages",
search="status:Currently+in+Shortage")
Reference: See references/drugs.md for detailed documentation
Devices
Access 9 device-related endpoints covering medical device safety, approvals, and registrations.
Endpoints:
- Adverse Events - Device malfunctions, injuries, deaths
- 510(k) Clearances - Premarket notifications
- Classification - Device categories and risk classes
- Enforcement Reports - Device recalls
- Recalls - Detailed recall information
- PMA - Premarket approval data for Class III devices
- Registrations & Listings - Manufacturing facility data
- UDI - Unique Device Identification database
- COVID-19 Serology - Antibody test performance data
Common use cases:
# Monitor device safety
events = fda.query_device_events("pacemaker", limit=100)
# Look up device classification
classification = fda.query_device_classification("DQY")
# Find 510(k) clearances
clearances = fda.query_device_510k(applicant="Medtronic")
# Search by UDI
device_info = fda.query("device", "udi",
search="identifiers.id:00884838003019")
Reference: See references/devices.md for detailed documentation
Foods
Access 2 food-related endpoints for safety monitoring and recalls.
Endpoints:
- Adverse Events - Food, dietary supplement, and cosmetic events
- Enforcement Reports - Food product recalls
Common use cases:
# Monitor allergen recalls
recalls = fda.query_food_recalls(reason="undeclared peanut")
# Track dietary supplement events
events = fda.query_food_events(
industry="Dietary Supplements")
# Find contamination recalls
listeria = fda.query_food_recalls(
reason="listeria",
classification="I")
Reference: See references/foods.md for detailed documentation
Animal & Veterinary
Access veterinary drug adverse event data with species-specific information.
Endpoint:
- Adverse Events - Animal drug side effects by species, breed, and product
Common use cases:
# Species-specific events
dog_events = fda.query_animal_events(
species="Dog",
drug_name="flea collar")
# Breed predisposition analysis
breed_query = fda.query("animalandveterinary", "event",
search="reaction.veddra_term_name:*seizure*+AND+"
"animal.breed.breed_component:*Labrador*")
Reference: See references/animal_veterinary.md for detailed documentation
Substances & Other
Access molecular-level substance data with UNII codes, chemical structures, and relationships.
Endpoints:
- Substance Data - UNII, CAS, chemical structures, relationships
- NSDE - Historical substance data (legacy)
Common use cases:
# UNII to CAS mapping
substance = fda.query_substance_by_unii("R16CO5Y76E")
# Search by name
results = fda.query_substance_by_name("acetaminophen")
# Get chemical structure
structure = fda.query("other", "substance",
search="names.name:ibuprofen+AND+substanceClass:chemical")
Reference: See references/other.md for detailed documentation
Common Query Patterns
Pattern 1: Safety Profile Analysis
Create comprehensive safety profiles combining multiple data sources:
def drug_safety_profile(fda, drug_name):
"""Generate complete safety profile."""
# 1. Total adverse events
events = fda.query_drug_events(drug_name, limit=1)
total = events["meta"]["results"]["total"]
# 2. Most common reactions
reactions = fda.count_by_field(
"drug", "event",
search=f"patient.drug.medicinalproduct:*{drug_name}*",
field="patient.reaction.reactionmeddrapt",
exact=True
)
# 3. Serious events
serious = fda.query("drug", "event",
search=f"patient.drug.medicinalproduct:*{drug_name}*+AND+serious:1",
limit=1)
# 4. Recent recalls
recalls = fda.query_drug_recalls(drug_name=drug_name)
return {
"total_events": total,
"top_reactions": reactions["results"][:10],
"serious_events": serious["meta"]["results"]["total"],
"recalls": recalls["results"]
}
Pattern 2: Temporal Trend Analysis
Analyze trends over time using date ranges:
from datetime import datetime, timedelta
def get_monthly_trends(fda, drug_name, months=12):
"""Get monthly adverse event trends."""
trends = []
for i in range(months):
end = datetime.now() - timedelta(days=30*i)
start = end - timedelta(days=30)
date_range = f"[{start.strftime('%Y%m%d')}+TO+{end.strftime('%Y%m%d')}]"
search = f"patient.drug.medicinalproduct:*{drug_name}*+AND+receivedate:{date_range}"
result = fda.query("drug", "event", search=search, limit=1)
count = result["meta"]["results"]["total"] if "meta" in result else 0
trends.append({
"month": start.strftime("%Y-%m"),
"events": count
})
return trends
Pattern 3: Comparative Analysis
Compare multiple products side-by-side:
def compare_drugs(fda, drug_list):
"""Compare safety profiles of multiple drugs."""
comparison = {}
for drug in drug_list:
# Total events
events = fda.query_drug_events(drug, limit=1)
total = events["meta"]["results"]["total"] if "meta" in events else 0
# Serious events
serious = fda.query("drug", "event",
search=f"patient.drug.medicinalproduct:*{drug}*+AND+serious:1",
limit=1)
serious_count = serious["meta"]["results"]["total"] if "meta" in serious else 0
comparison[drug] = {
"total_events": total,
"serious_events": serious_count,
"serious_rate": (serious_count/total*100) if total > 0 else 0
}
return comparison
Pattern 4: Cross-Database Lookup
Link data across multiple endpoints:
def comprehensive_device_lookup(fda, device_name):
"""Look up device across all relevant databases."""
return {
"adverse_events": fda.query_device_events(device_name, limit=10),
"510k_clearances": fda.query_device_510k(device_name=device_name),
"recalls": fda.query("device", "enforcement",
search=f"product_description:*{device_name}*"),
"udi_info": fda.query("device", "udi",
search=f"br
---
*Content truncated.*
More by davila7
View all skills by davila7 →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversAccess FDA drug info, faers data, and adverse event reports with OpenFDA’s robust tools for faers, vaers, and NDC valida
Build persistent semantic networks for enterprise & engineering data management. Enable data persistence and memory acro
Google GenAI Toolbox: open-source GenAI database agent and AI database connector for Google Cloud database—query Cloud S
Mobile Next offers fast, seamless mobile automation for iOS and Android. Automate apps, extract data, and simplify mobil
Explore official Google BigQuery MCP servers. Find resources and examples to build context-aware apps in Google's ecosys
Connect Supabase projects to AI with Supabase MCP Server. Standardize LLM communication for secure, efficient developmen
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.