fda-mcp-server 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/db.d.ts +24 -2
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +114 -19
- package/dist/db.js.map +1 -1
- package/dist/fda-client.d.ts +29 -54
- package/dist/fda-client.d.ts.map +1 -1
- package/dist/fda-client.js +74 -178
- package/dist/fda-client.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +248 -480
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/fda-client.js
CHANGED
|
@@ -1,164 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* openFDA API Client
|
|
3
3
|
*
|
|
4
|
-
* Wraps
|
|
5
|
-
* 1.
|
|
6
|
-
* 2.
|
|
7
|
-
* 3. openFDA Enforcement/Recalls API
|
|
4
|
+
* Wraps public openFDA data sources:
|
|
5
|
+
* 1. Enforcement/Recalls (drug, device, food)
|
|
6
|
+
* 2. Device Adverse Events (MAUDE database)
|
|
8
7
|
*/
|
|
9
|
-
const FDA_BASE = "https://www.fda.gov";
|
|
10
8
|
const OPENFDA_BASE = "https://api.fda.gov";
|
|
11
|
-
// ─── Warning Letters (FDA.gov DataTables) ────────────────────────────────────
|
|
12
|
-
// Max pages to fetch when searching by company name (100 rows each).
|
|
13
|
-
// Balances coverage vs response time — 500 rows covers ~15% of the dataset.
|
|
14
|
-
const MAX_SEARCH_PAGES = 5;
|
|
15
|
-
async function fetchWarningLetterPage(search, start, length) {
|
|
16
|
-
const url = new URL("/datatables/views/ajax", FDA_BASE);
|
|
17
|
-
url.searchParams.set("view_name", "warning_letter_solr_index");
|
|
18
|
-
url.searchParams.set("view_display_id", "warning_letter_solr_block");
|
|
19
|
-
url.searchParams.set("view_base_path", "inspections-compliance-enforcement-and-criminal-investigations/compliance-actions-and-activities/warning-letters/datatables-data");
|
|
20
|
-
url.searchParams.set("draw", "1");
|
|
21
|
-
url.searchParams.set("start", String(start));
|
|
22
|
-
url.searchParams.set("length", String(length));
|
|
23
|
-
if (search) {
|
|
24
|
-
url.searchParams.set("search[value]", search);
|
|
25
|
-
}
|
|
26
|
-
const resp = await fetch(url.toString(), {
|
|
27
|
-
headers: {
|
|
28
|
-
Accept: "application/json",
|
|
29
|
-
"User-Agent": "fda-mcp-server/1.0",
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
if (!resp.ok) {
|
|
33
|
-
throw new Error(`FDA Warning Letters API returned ${resp.status}: ${resp.statusText}`);
|
|
34
|
-
}
|
|
35
|
-
const data = await resp.json();
|
|
36
|
-
const records = (data.data ?? []).map((row) => parseWarningLetterRow(row));
|
|
37
|
-
return { data, records };
|
|
38
|
-
}
|
|
39
|
-
function applyWarningLetterFilters(records, params) {
|
|
40
|
-
let filtered = records;
|
|
41
|
-
if (params.search) {
|
|
42
|
-
const searchTerm = params.search.toLowerCase();
|
|
43
|
-
filtered = filtered.filter((r) => r.company_name.toLowerCase().includes(searchTerm) ||
|
|
44
|
-
r.subject.toLowerCase().includes(searchTerm) ||
|
|
45
|
-
r.excerpt.toLowerCase().includes(searchTerm));
|
|
46
|
-
}
|
|
47
|
-
if (params.issuing_office) {
|
|
48
|
-
const office = params.issuing_office.toLowerCase();
|
|
49
|
-
filtered = filtered.filter((r) => r.issuing_office.toLowerCase().includes(office));
|
|
50
|
-
}
|
|
51
|
-
if (params.date_from || params.date_to) {
|
|
52
|
-
filtered = filtered.filter((r) => {
|
|
53
|
-
const d = r.issue_date;
|
|
54
|
-
if (params.date_from && d < params.date_from)
|
|
55
|
-
return false;
|
|
56
|
-
if (params.date_to && d > params.date_to)
|
|
57
|
-
return false;
|
|
58
|
-
return true;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return filtered;
|
|
62
|
-
}
|
|
63
|
-
export async function searchWarningLetters(params) {
|
|
64
|
-
const userLimit = Math.min(params.limit ?? 25, 100);
|
|
65
|
-
const offset = params.offset ?? 0;
|
|
66
|
-
const hasPostFilters = !!(params.search || params.issuing_office || params.date_from || params.date_to);
|
|
67
|
-
if (!hasPostFilters) {
|
|
68
|
-
// No filters — just fetch the requested page directly
|
|
69
|
-
const { data, records } = await fetchWarningLetterPage(undefined, offset, userLimit);
|
|
70
|
-
return {
|
|
71
|
-
total: data.recordsFiltered ?? data.recordsTotal ?? records.length,
|
|
72
|
-
letters: records,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
// FDA.gov Solr search[value] only influences relevance ranking, not filtering.
|
|
76
|
-
// We must fetch rows and filter client-side. Page through up to MAX_SEARCH_PAGES
|
|
77
|
-
// batches of 100 to find enough matches.
|
|
78
|
-
const allFiltered = [];
|
|
79
|
-
let serverTotal = 0;
|
|
80
|
-
for (let page = 0; page < MAX_SEARCH_PAGES; page++) {
|
|
81
|
-
const start = offset + page * 100;
|
|
82
|
-
const { data, records } = await fetchWarningLetterPage(params.search, start, 100);
|
|
83
|
-
if (page === 0) {
|
|
84
|
-
serverTotal = data.recordsFiltered ?? data.recordsTotal ?? 0;
|
|
85
|
-
}
|
|
86
|
-
if (records.length === 0)
|
|
87
|
-
break; // no more data
|
|
88
|
-
const matches = applyWarningLetterFilters(records, params);
|
|
89
|
-
allFiltered.push(...matches);
|
|
90
|
-
// Stop early if we have enough results
|
|
91
|
-
if (allFiltered.length >= userLimit)
|
|
92
|
-
break;
|
|
93
|
-
// Stop if we've exhausted the server's data
|
|
94
|
-
if (start + 100 >= serverTotal)
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
total: allFiltered.length,
|
|
99
|
-
letters: allFiltered.slice(0, userLimit),
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function parseWarningLetterRow(row) {
|
|
103
|
-
// DataTables rows come as arrays or objects depending on config
|
|
104
|
-
if (Array.isArray(row)) {
|
|
105
|
-
return {
|
|
106
|
-
posted_date: stripHtml(row[0] ?? ""),
|
|
107
|
-
issue_date: stripHtml(row[1] ?? ""),
|
|
108
|
-
company_name: stripHtml(row[2] ?? ""),
|
|
109
|
-
issuing_office: stripHtml(row[3] ?? ""),
|
|
110
|
-
subject: stripHtml(row[4] ?? ""),
|
|
111
|
-
response_letter: stripHtml(row[5] ?? ""),
|
|
112
|
-
closeout_letter: stripHtml(row[6] ?? ""),
|
|
113
|
-
excerpt: stripHtml(row[7] ?? ""),
|
|
114
|
-
url: extractHref(row[2] ?? "") || extractHref(row[4] ?? ""),
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
// Object format
|
|
118
|
-
return {
|
|
119
|
-
posted_date: stripHtml(row.field_letter_posted_date ?? row.posted_date ?? ""),
|
|
120
|
-
issue_date: stripHtml(row.field_letter_issue_datetime ?? row.issue_date ?? ""),
|
|
121
|
-
company_name: stripHtml(row.field_company_name_warning_lette ?? row.company_name ?? ""),
|
|
122
|
-
issuing_office: stripHtml(row.field_issuing_office ?? row.issuing_office ?? ""),
|
|
123
|
-
subject: stripHtml(row.field_subject ?? row.subject ?? ""),
|
|
124
|
-
response_letter: stripHtml(row.field_response_letter_date ?? row.response_letter ?? ""),
|
|
125
|
-
closeout_letter: stripHtml(row.field_closeout_letter_date ?? row.closeout_letter ?? ""),
|
|
126
|
-
excerpt: stripHtml(row.field_letter_body ?? row.excerpt ?? ""),
|
|
127
|
-
url: extractHref(row.field_company_name_warning_lette ?? row.field_subject ?? ""),
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
// ─── 483 Inspections ─────────────────────────────────────────────────────────
|
|
131
|
-
//
|
|
132
|
-
// FDA removed the DataTables AJAX endpoint for 483 observations. The page now
|
|
133
|
-
// only offers annual XLSX downloads (FY2006–FY2025). Live search is not
|
|
134
|
-
// possible. This function queries the enriched fda-csa-data PostgreSQL dataset
|
|
135
|
-
// when DATABASE_URL is set, or returns a helpful message pointing to XLSX
|
|
136
|
-
// downloads and the enriched dataset.
|
|
137
|
-
const FDA_483_XLSX_URLS = {
|
|
138
|
-
"2025": "https://www.fda.gov/media/190190/download?attachment",
|
|
139
|
-
"2024": "https://www.fda.gov/media/185090/download?attachment",
|
|
140
|
-
"2023": "https://www.fda.gov/media/174101/download?attachment",
|
|
141
|
-
"2022": "https://www.fda.gov/media/163420/download?attachment",
|
|
142
|
-
"2021": "https://www.fda.gov/media/153238/download?attachment",
|
|
143
|
-
};
|
|
144
|
-
export function get483XlsxUrls() {
|
|
145
|
-
return FDA_483_XLSX_URLS;
|
|
146
|
-
}
|
|
147
|
-
export async function searchInspections(params) {
|
|
148
|
-
// FDA removed the live DataTables endpoint — no live search available.
|
|
149
|
-
// Return empty with an explanation so the tool handler can provide guidance.
|
|
150
|
-
return {
|
|
151
|
-
total: 0,
|
|
152
|
-
inspections: [],
|
|
153
|
-
note: "FDA removed the live 483 inspection search endpoint. 483 observation data is now only available as annual XLSX downloads from FDA.gov, or via the enriched fda-csa-data dataset (use csa_risk_assessment or supplier_qualification_report tools for 483 data).",
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
9
|
// ─── openFDA Enforcement (Recalls) ───────────────────────────────────────────
|
|
157
10
|
export async function searchEnforcement(params) {
|
|
158
11
|
const product = params.product_type ?? "drug";
|
|
159
12
|
const limit = Math.min(params.limit ?? 25, 100);
|
|
160
13
|
const skip = params.skip ?? 0;
|
|
161
|
-
// Build openFDA search query
|
|
162
14
|
const searchParts = [];
|
|
163
15
|
if (params.search) {
|
|
164
16
|
searchParts.push(`"${params.search}"`);
|
|
@@ -184,17 +36,14 @@ export async function searchEnforcement(params) {
|
|
|
184
36
|
url.searchParams.set("limit", String(limit));
|
|
185
37
|
url.searchParams.set("skip", String(skip));
|
|
186
38
|
const resp = await fetch(url.toString(), {
|
|
187
|
-
headers: {
|
|
188
|
-
"User-Agent": "fda-mcp-server/1.0",
|
|
189
|
-
},
|
|
39
|
+
headers: { "User-Agent": "fda-mcp-server/1.0" },
|
|
190
40
|
});
|
|
191
41
|
if (!resp.ok) {
|
|
192
|
-
if (resp.status === 404)
|
|
42
|
+
if (resp.status === 404)
|
|
193
43
|
return { total: 0, records: [] };
|
|
194
|
-
}
|
|
195
44
|
throw new Error(`openFDA enforcement API returned ${resp.status}: ${resp.statusText}`);
|
|
196
45
|
}
|
|
197
|
-
const data = await resp.json();
|
|
46
|
+
const data = (await resp.json());
|
|
198
47
|
const records = (data.results ?? []).map((r) => ({
|
|
199
48
|
recall_number: r.recall_number ?? "",
|
|
200
49
|
status: r.status ?? "",
|
|
@@ -220,25 +69,72 @@ export async function searchEnforcement(params) {
|
|
|
220
69
|
records,
|
|
221
70
|
};
|
|
222
71
|
}
|
|
223
|
-
// ───
|
|
224
|
-
function
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
if (
|
|
241
|
-
|
|
242
|
-
|
|
72
|
+
// ─── openFDA Device Adverse Events (MAUDE) ───────────────────────────────────
|
|
73
|
+
export async function searchDeviceEvents(params) {
|
|
74
|
+
const limit = Math.min(params.limit ?? 25, 100);
|
|
75
|
+
const skip = params.skip ?? 0;
|
|
76
|
+
const searchParts = [];
|
|
77
|
+
if (params.search) {
|
|
78
|
+
searchParts.push(`"${params.search}"`);
|
|
79
|
+
}
|
|
80
|
+
if (params.manufacturer) {
|
|
81
|
+
searchParts.push(`device.manufacturer_d_name:"${params.manufacturer}"`);
|
|
82
|
+
}
|
|
83
|
+
if (params.brand_name) {
|
|
84
|
+
searchParts.push(`device.brand_name:"${params.brand_name}"`);
|
|
85
|
+
}
|
|
86
|
+
if (params.event_type) {
|
|
87
|
+
searchParts.push(`event_type:"${params.event_type}"`);
|
|
88
|
+
}
|
|
89
|
+
if (params.product_code) {
|
|
90
|
+
searchParts.push(`device.generic_name:"${params.product_code}"`);
|
|
91
|
+
}
|
|
92
|
+
if (params.date_from || params.date_to) {
|
|
93
|
+
const from = params.date_from?.replace(/-/g, "") ?? "19000101";
|
|
94
|
+
const to = params.date_to?.replace(/-/g, "") ?? "20991231";
|
|
95
|
+
searchParts.push(`date_received:[${from}+TO+${to}]`);
|
|
96
|
+
}
|
|
97
|
+
const url = new URL("/device/event.json", OPENFDA_BASE);
|
|
98
|
+
if (searchParts.length > 0) {
|
|
99
|
+
url.searchParams.set("search", searchParts.join("+AND+"));
|
|
100
|
+
}
|
|
101
|
+
url.searchParams.set("limit", String(limit));
|
|
102
|
+
url.searchParams.set("skip", String(skip));
|
|
103
|
+
const resp = await fetch(url.toString(), {
|
|
104
|
+
headers: { "User-Agent": "fda-mcp-server/1.0" },
|
|
105
|
+
});
|
|
106
|
+
if (!resp.ok) {
|
|
107
|
+
if (resp.status === 404)
|
|
108
|
+
return { total: 0, events: [] };
|
|
109
|
+
throw new Error(`openFDA device events API returned ${resp.status}: ${resp.statusText}`);
|
|
110
|
+
}
|
|
111
|
+
const data = (await resp.json());
|
|
112
|
+
const events = (data.results ?? []).map((r) => {
|
|
113
|
+
const device = r.device?.[0] ?? {};
|
|
114
|
+
const description = (r.mdr_text ?? [])
|
|
115
|
+
.map((t) => t.text ?? "")
|
|
116
|
+
.filter(Boolean)
|
|
117
|
+
.join(" ")
|
|
118
|
+
.substring(0, 500) || "";
|
|
119
|
+
return {
|
|
120
|
+
report_number: r.report_number ?? "",
|
|
121
|
+
event_type: r.event_type ?? "",
|
|
122
|
+
date_received: r.date_received ?? "",
|
|
123
|
+
date_of_event: r.date_of_event ?? "",
|
|
124
|
+
device_name: device.generic_name ?? "",
|
|
125
|
+
manufacturer: device.manufacturer_d_name ?? "",
|
|
126
|
+
brand_name: device.brand_name ?? "",
|
|
127
|
+
product_code: device.device_report_product_code ?? "",
|
|
128
|
+
event_description: description,
|
|
129
|
+
patient_outcome: r.patient?.[0]?.patient_sequence_number
|
|
130
|
+
? (r.patient ?? []).map((p) => p.sequence_number_outcome?.[0] ?? "").filter(Boolean)
|
|
131
|
+
: [],
|
|
132
|
+
device_class: device.device_class ?? "",
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
return {
|
|
136
|
+
total: data.meta?.results?.total ?? events.length,
|
|
137
|
+
events,
|
|
138
|
+
};
|
|
243
139
|
}
|
|
244
140
|
//# sourceMappingURL=fda-client.js.map
|
package/dist/fda-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fda-client.js","sourceRoot":"","sources":["../src/fda-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fda-client.js","sourceRoot":"","sources":["../src/fda-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,YAAY,GAAG,qBAAqB,CAAC;AAuC3C,gFAAgF;AAEhF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAUvC;IACC,MAAM,OAAO,GAAG,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC;IAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;IAE9B,MAAM,WAAW,GAAa,EAAE,CAAC;IAEjC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,WAAW,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;QAC1B,WAAW,CAAC,IAAI,CAAC,mBAAmB,MAAM,CAAC,cAAc,GAAG,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,WAAW,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;IAC9C,CAAC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,MAAM;KACP,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* FDA MCP Server
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* and Enforcement/Recall data as queryable tools.
|
|
5
|
+
* Tools for querying FDA enforcement, adverse event, and compliance data.
|
|
7
6
|
*
|
|
8
7
|
* Data sources:
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
8
|
+
* - openFDA Enforcement/Recalls API (live)
|
|
9
|
+
* - openFDA Device Adverse Events / MAUDE (live)
|
|
10
|
+
* - fda-csa-data enriched dataset (warning letters, 483s, citations, CSA analysis)
|
|
12
11
|
*/
|
|
13
12
|
export {};
|
|
14
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG"}
|