openFDA Regulatory Metadata

com.blackswancausallabs由 blackswancausallabs.com 發布v0.1.0更新於 Oct 24, 2026

Resolve FDA application numbers and product names to regulatory metadata (CDER, CBER, CDRH).

發布方自己的服務:DAG Studio MCP

已驗證STDIO僅桌面知識與記憶資料與分析

概覽

AI 產生的概覽

一個本機 MCP 伺服器,透過 openFDA API 將 FDA 申請編號與產品名稱解析為藥品、生物製劑與醫療器材的監管中繼資料。

可以做什麼
檢索藥品標籤文字,查詢 NDA、BLA、ANDA 編號的 Drugs@FDA 紀錄,並將品牌名或通用名解析為申請編號,另含實驗性的 RWE 訊號標籤掃描(藥品與生物製劑)。依 K、DEN、P 或 H 編號查詢器材送審紀錄,將產品代碼對應為器材類別與醫學專科,並執行從編號到分類的完整鏈路(器材)。區分真正的查無資料與暫時性故障,後者會重試並拋出錯誤而非快取。
適用情境
適合需要將 FDA 申請編號或送審編號、產品名稱轉換為權威監管中繼資料的情境,尤其是 CDRH 器材分類中編號到產品代碼再到分類的鏈路。也適合希望使用固定版本、可重現解析層的研究工作流程。
執行需求
以本機程序執行,從 PyPI 安裝(pip install openfda-mcp)並在 MCP 用戶端設定。需要連線至 openFDA API 的網路存取。openFDA API 金鑰為選用,透過環境變數 OPENFDA_API_KEY 提供;無金鑰時限制為每分鐘 40 次、每天 1,000 次請求。
安裝前請注意
screen_for_rwe_signals 工具明確未經驗證,其輸出應視為供人工審閱的候選,而非結論或計數。HDE 編號的器材類別是推論而非檢索所得,其醫學專科欄位為空。無 API 金鑰時速率限制較低,批次掃描可能遇到暫時性錯誤。為確保研究可重現,應固定版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 openFDA Regulatory Metadata,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

openFDA MCP

An MCP server exposing FDA regulatory metadata (drugs, biologics, and medical devices) through the openFDA API.

Built by Black Swan Causal Labs as the identifier-resolution layer for a real-world-evidence (RWE) case roster: given an FDA application number or a product name, resolve it to authoritative regulatory metadata.

Why this exists

There are other openFDA MCP servers, and several are broader. This one is narrow on purpose: it is the instrument that resolved the application numbers in a specific published RWE dataset, and it exists so that dataset can name the tool that produced it.

That matters more than it might sound. Whether BLA 125123/2058 resolves to a particular product, or DEN160026 to a particular device class, is a decision made by a piece of software — and a different wrapper can yield a different roster. "We used openFDA" is not a sufficient methods statement; "openfda-mcp v0.1.0" is. If you use this in research, pin the version.

Its practical edge over a general openFDA client is the device half: resolving a CDRH submission number to a risk class takes a three-hop chain (number → product code → classification) with two non-obvious traps, both handled here.

Tools

Drugs and biologics (/drug/* — CDER, CBER)

ToolPurpose
search_drug_labelSearch SPL label text, optionally scoped to a section
lookup_drugsfda_applicationDrugs@FDA record for an NDA/BLA/ANDA number
resolve_drug_to_applicationBrand or generic name → application number(s)
screen_for_rwe_signalsExperimental. Sweep labels for RWE signals

Devices (/device/* — CDRH)

ToolPurpose
lookup_device_submissionK / DEN / P / H number → device record
classify_device_product_codeProduct code → device class + medical specialty
validate_device_applicationFull chain: number → class, specialty, category

Install

bash
pip install openfda-mcp

Add to your MCP client config:

json
{  "mcpServers": {    "openfda": {      "command": "openfda-mcp",      "env": { "OPENFDA_API_KEY": "${OPENFDA_API_KEY:-}" }    }  }}

The API key is optional. Without one, openFDA allows 40 requests/min and 1,000/day, which is enough for interactive use. A free key raises it to 240/min and 120,000/day — worth having for bulk sweeps.

Two findings worth knowing

Both were established empirically and are not obvious from FDA's docs.

De Novo grants live in the 510(k) endpoint. DEN###### numbers are stored in the k_number field of /device/510k. There is no De Novo endpoint, and looking for one leads to the wrong conclusion that De Novo numbers can't be resolved. They can.

HDE numbers are not in openFDA at all. Neither the 510(k) nor the PMA endpoint carries H######, so no product code — and therefore no classification — is retrievable. This server still reports device_class: "III" for them, by regulatory inference: HDE is by definition the pathway for devices that would otherwise require a PMA. medical_specialty stays null, because that one really is unavailable, and device_class_source says which is which.

Transient failures are never silent

A genuine absence and a failed request are different things, and this package keeps them different:

  • not found (HTTP 404, or 200 with no results) → returns None; safe to cache
  • transient failure (timeout, connection error, 429, 5xx) → retried with backoff, then raises OpenFDATransientError; never cache this
  • rejected request (other 4xx) → raises OpenFDARequestError

This is a direct response to a real defect: an earlier version swallowed every exception and returned None, so a single read timeout on one application number was cached as a real miss and silently blanked two fields on that record for weeks. Cached failures are indistinguishable from real absences, which makes them the worst kind of silent data loss.

On screen_for_rwe_signals

It is unvalidated. There is no ground-truth oracle for a discovery sweep, and below the strongest hits the results are dominated by applications whose labels use "registry" in an unrelated sense. Treat its output as candidates for human review — not as a finding, and not as a count to report. Establishing recall against a held-out set of known cases is open work.

Development

bash
pip install -e ".[dev]"pytest              # unit tests, offlinepytest -m live      # live checks against api.fda.gov

Live tests assert against known-good fixtures (K203571 → class II Ophthalmic, DEN160026 → class II Immunology, BLA761180 → LEO Pharma) so a change on FDA's side surfaces as a test failure rather than as quietly wrong data.

License

MIT

來源:README.md,提交 d952942

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Blackswancausallabs 整合