OpenFDA MCP Server
Click on "Install 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., "@OpenFDA MCP Serversearch for adverse events of aspirin"
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.
OpenFDA MCP Server
An MCP (Model Context Protocol) server that provides access to U.S. FDA public datasets including drugs, medical devices, adverse events, recalls, and more.
Features
10 FDA Tools: Query drug and device databases through a standardized MCP interface
Drug Tools: Adverse events (FAERS), labels, NDC directory, recalls, Drugs@FDA, shortages
Device Tools: 510(k) clearances, classifications, adverse events (MDR), recalls
Individual Record Lookup: Retrieve specific reports by ID (safety report ID, set ID, MDR report number)
Advanced Filtering: Filter drug labels by boxed warnings, request specific label sections
Rate Limit Aware: Supports authenticated requests for higher rate limits (120k/hour vs 1k/hour)
TypeScript: Fully typed with Zod schema validation
Related MCP server: Healthcare MCP Server
Installation
# Install globally
npm install -g openfda-mcp-server
# Or use with npx
npx openfda-mcp-serverConfiguration
Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"openfda": {
"command": "npx",
"args": ["-y", "openfda-mcp-server"],
"env": {
"OPENFDA_API_KEY": "your-api-key-optional"
}
}
}
}Environment Variables
Variable | Description | Default |
| FDA API key for higher rate limits | None (uses public limits) |
Get a free API key at: https://open.fda.gov/apis/authentication/
Available Tools
Drug Tools
Tool | Description |
| Search FAERS for drug safety reports. Retrieve specific report by |
| Search drug labeling/prescribing info. Get by |
| Search the National Drug Code directory |
| Search drug recall enforcement reports |
| Search approved drug applications |
| Search current and resolved drug shortages |
Device Tools
Tool | Description |
| Search 510(k) premarket notifications |
| Search device classification database |
| Search MDR adverse event reports. Retrieve specific report by |
| Search device recall enforcement reports |
Tool Parameters
search_drug_labels
Parameter | Type | Description |
| string | Retrieve a specific label by its unique set_id |
| string | Drug brand or generic name |
| string | Medical indication or use case |
| string | Active ingredient/substance name |
| string | Route of administration (e.g., 'oral', 'intravenous') |
| boolean | Filter for drugs with boxed warnings (most serious warnings) |
| string[] | Specific label sections to return (see below) |
| number | Maximum results (1-100) |
| number | Number of results to skip for pagination |
Available sections: indications_and_usage, dosage_and_administration, contraindications, warnings, warnings_and_cautions, adverse_reactions, drug_interactions, clinical_pharmacology, mechanism_of_action, pharmacokinetics, overdosage, description, how_supplied, storage_and_handling, boxed_warning
search_drug_adverse_events
Parameter | Type | Description |
| string | Retrieve a specific FAERS report by its 8-digit ID |
| string | Drug or product name to search |
| string | Adverse reaction (e.g., 'headache', 'nausea') |
| string | Drug manufacturer name |
| boolean | Filter for serious adverse events only |
| string | Start date (YYYY-MM-DD) |
| string | End date (YYYY-MM-DD) |
| number | Maximum results (1-100) |
| number | Number of results to skip for pagination |
search_device_adverse_events
Parameter | Type | Description |
| string | Retrieve a specific MDR report by report number |
| string | Device generic name |
| string | Device brand name |
| string | Device manufacturer name |
| string | Type: 'Injury', 'Malfunction', 'Death', 'Other' |
| string | Start date (YYYY-MM-DD) |
| string | End date (YYYY-MM-DD) |
| number | Maximum results (1-100) |
| number | Number of results to skip for pagination |
Usage Examples
Search for drug adverse events
Find adverse events for aspirin in the last year that were seriousGet a specific adverse event report
Retrieve FAERS report with safety report ID 10003641Search for drugs with boxed warnings
Find all drugs with boxed warnings related to cardiovascular risksGet specific label sections
Get the boxed_warning and contraindications sections for warfarinSearch for drug recalls
Search for Class I drug recalls from PfizerSearch for device clearances
Find 510(k) clearances for cardiac pacemakersGet a specific device adverse event report
Retrieve MDR report number 2649622-2020-08294Search for device adverse events
Search device adverse events for insulin pumps that resulted in injuryCLI Usage
# Start with stdio transport (default)
openfda-mcp-server
# Start with HTTP transport
openfda-mcp-server --transport http --port 3000Docker
Quick Start
# Build and run with docker-compose
docker-compose up -d
# Or build manually
docker build -t openfda-mcp-server .
docker run -p 3000:3000 -e OPENFDA_API_KEY=your-key openfda-mcp-serverDocker Compose
services:
openfda-mcp:
image: openfda-mcp-server:latest
ports:
- "3000:3000"
environment:
- OPENFDA_API_KEY=${OPENFDA_API_KEY:-}Environment Variables
Pass environment variables to the container:
docker run -p 3000:3000 \
-e OPENFDA_API_KEY=your-api-key \
-e DEBUG=openfda-mcp:* \
openfda-mcp-serverDevelopment
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Test locally
pnpm serve:test
# Run full validation (format, lint, test, build)
pnpm validate
# Build for production
pnpm buildProgrammatic Usage
import { createOpenFDAServer, handleSearchDrugAdverseEvents, handleSearchDrugLabels } from "openfda-mcp-server/lib"
// Create a custom server
const server = createOpenFDAServer({
name: "my-fda-server",
version: "1.0.0",
})
// Search for adverse events
const adverseEvents = await handleSearchDrugAdverseEvents({
drugName: "aspirin",
serious: true,
limit: 10,
})
// Get a specific adverse event by ID
const specificReport = await handleSearchDrugAdverseEvents({
safetyReportId: "10003641",
})
// Search for drugs with boxed warnings
const boxedWarningDrugs = await handleSearchDrugLabels({
hasBoxedWarning: true,
limit: 10,
})
// Get specific sections of a drug label
const warfarinLabel = await handleSearchDrugLabels({
setId: "0cbce382-9c88-4f58-ae0f-532a841e8f95",
sections: ["boxed_warning", "contraindications", "adverse_reactions"],
})API Rate Limits
Authentication | Per Minute | Per Hour |
Without API Key | 40 | 1,000 |
With API Key | 240 | 120,000 |
License
MIT
Acknowledgments
OpenFDA - FDA open data API
Sponsored by SapientsAI — Building agentic AI for businesses
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sapientsai/openfda-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server