Science
Data source: openFDA
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/openfda/
claude_desktop_config.json
{
"mcpServers": {
"gnist-openfda": {
"url": "https://context.gnist.ai/mcp/openfda/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/openfda/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_adverse_events", "arguments": {"drug_name": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/openfda/
5 endpoints available:
GET /rest/openfda/search_adverse_eventsGET /rest/openfda/get_drug_labelGET /rest/openfda/search_enforcementGET /rest/openfda/device_adverse_eventsGET /rest/openfda/report_feedback
Shell
curl "https://context.gnist.ai/rest/openfda/search_adverse_events?drug_name=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/openfda/search_adverse_events",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"drug_name": "example"
},
)
print(resp.json())
Command Line
Command
gc openfda
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (5)
search_adverse_eventsSearch FDA adverse event reports (FAERS) for a drug or active ingredient.
| Parameter | Type | Required | Description |
|---|---|---|---|
drug_name | string | required | Drug name — brand (e.g. "Tylenol") or generic (e.g. "acetaminophen"). |
reaction | any | optional | Optional MedDRA reaction term to filter by (e.g. "headache", "nausea"). |
date_from | any | optional | Start date filter in YYYYMMDD format (e.g. "20200101"). |
date_to | any | optional | End date filter in YYYYMMDD format (e.g. "20221231"). |
limit | integer | optional | Number of reports to return (1–100, default 10). (default: 10) |
get_drug_labelFetch FDA-approved drug label for a medication.
| Parameter | Type | Required | Description |
|---|---|---|---|
drug_name | string | required | Brand name (e.g. "Advil") or generic name (e.g. "ibuprofen"). |
search_enforcementSearch FDA enforcement actions — recalls, market withdrawals, and safety alerts.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_type | string | optional | Product category — "drug", "food", or "device" (default "drug"). (default: "drug") |
date_from | any | optional | Start date of recall initiation in YYYYMMDD format. |
date_to | any | optional | End date of recall initiation in YYYYMMDD format. |
classification | any | optional | Recall classification — "Class I" (most serious), "Class II", or "Class III". |
limit | integer | optional | Number of actions to return (1–100, default 10). (default: 10) |
device_adverse_eventsSearch FDA medical device adverse event reports (MAUDE database).
| Parameter | Type | Required | Description |
|---|---|---|---|
device_name | string | required | Device brand name (e.g. "pacemaker", "insulin pump", "hip implant"). |
event_type | any | optional | Filter by event type — "Malfunction", "Injury", "Death", or "No apparent adverse event". |
date_from | any | optional | Start date filter in YYYYMMDD format. |
date_to | any | optional | End date filter in YYYYMMDD format. |
limit | integer | optional | Number of reports to return (1–100, default 10). (default: 10) |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |