Openfda Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.9.1更新於 Oct 29, 2026

Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.

已驗證Streamable HTTP可網頁執行資料庫位置與生活資料與分析

概覽

AI 產生的概覽

查詢 openFDA 公開 API,讓助理檢索 FDA 的藥品、食品、醫材、菸品與獸藥紀錄,查閱說明書與 NDC 編碼,並對暫存結果執行 SQL。

可以做什麼
  • 檢索不良事件、回收、藥品短缺、菸品問題通報、藥品核准與醫材許可
  • 查詢藥品說明書、NDC 目錄項目以及各端點的可檢索欄位路徑
  • 對任一 openFDA 端點做欄位計數彙總
  • 依藥品名稱彙整識別資訊、說明書、不良事件、回收、核准與短缺狀態
  • 將檢索結果暫存為資料表並執行唯讀 SQL,另可選擇提供刪除暫存表的工具
適用情境
適合在對話中需要 FDA 監管或安全資料時使用:核對藥品說明書、警語或短缺狀態,調查不良事件或回收訊號,或在不手動翻頁的情況下彙總 openFDA 紀錄。
執行需求
可作為託管的 Streamable HTTP 端點使用,也可透過 npx(Node.js)或 Docker 在本機執行;不需 API 金鑰,但設定免費的 OPENFDA_API_KEY 可將每日上限從 1K 提高到 120K 次請求。需要能連線至 openFDA API 的網路。選用設定涵蓋本機 SQLite 大量資料鏡像、DataCanvas 暫存、傳輸方式、驗證模式與日誌。
安裝前請注意
查詢與檢索詞會傳送到 openFDA API;若覆寫了基礎位址或鏡像主機,則傳送到該位址。DataCanvas 暫存會在本機寫入資料表;刪除暫存表的工具預設關閉,需設定 OPENFDA_DATAFRAME_DROP_ENABLED 才能使用。本機鏡像需要額外的 peer 相依套件。FDA 並未為此專案背書,其資料不應作為醫療照護決策依據。

安裝

在 SourceWeft 中

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

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fopenfda-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "openfda": {
      "type": "http",
      "url": "https://openfda.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/openfda-mcp-server

Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.

15 Tools

Public Hosted Server: https://openfda.caseyjhand.com/mcp


Overview

FDA data on drugs, food, devices, and recalls from the openFDA public API. Search adverse events, recalls, drug approvals, and device clearances; look up NDC codes and drug labels; aggregate field counts across any endpoint.

Tools

ToolDescription
openfda_drug_profileOne drug name → consolidated FDA profile: identity, label, adverse events, recalls, approval, shortage
openfda_search_adverse_eventsSearch adverse event reports across drugs, food, and devices
openfda_search_animal_eventsSearch adverse event reports for veterinary drugs and devices
openfda_search_drug_shortagesSearch FDA drug shortage records by status, availability, therapeutic category, manufacturer
openfda_search_tobacco_reportsSearch problem reports for tobacco products, e-cigarettes, and vaping devices
openfda_search_recallsSearch enforcement reports and recall actions across drugs, food, and devices
openfda_count_valuesAggregate and tally unique values for any field across any openFDA endpoint
openfda_describe_fieldsReturn searchable field paths for an openFDA endpoint, grouped by category
openfda_get_drug_labelLook up FDA drug labeling (package inserts / SPL documents)
openfda_search_drug_approvalsSearch the Drugs@FDA database for NDA/ANDA application approvals
openfda_search_device_clearancesSearch FDA device premarket notifications: 510(k) clearances and PMA approvals
openfda_lookup_ndcLook up drugs in the NDC (National Drug Code) Directory
openfda_dataframe_describeList tables and column schemas staged on a DataCanvas
openfda_dataframe_queryRun read-only SQL over a result set staged on a DataCanvas
openfda_dataframe_dropDelete one table staged on a DataCanvas (opt-in, off by default)

Capability reference

openfda_drug_profile tool

  • One drug name, brand or generic, resolved once to an identity (generic name, NDC, RxCUI, SPL set ID); recalls, approval, and shortage key on meta.fanOutKey — the typed name when it is an ingredient of the resolved generic, else that generic; meta.resolvedVia (label, ndc, none) names the source, and a single-ingredient product is preferred over combinations
  • Recalls and approval also search records openFDA never harmonized (product_description, products.active_ingredients.name); recalls_total gives the match count beside the newest 5 recalls
  • Sections label, adverse_events, recalls, approval, and shortage are best-effort and come back null (or an empty recalls) on a miss; degraded[] names each section whose sub-query failed upstream, so a listed section is unknown rather than absent
  • Auth, configuration, and cancellation failures fail the whole call instead of degrading a section

openfda_search_adverse_events tool

  • category (drug, food, device) selects the endpoint and its record schema; up to 1000 records per page
  • Sortable date fields differ by category: receivedate (drug), date_created (food), date_received (device); another category's field fails as query_error
  • Text output decodes drug administration route, reaction outcome, and patient age group codes beside the raw value (via oral (048), fatal (5), elderly (6)); structured output keeps the codes

openfda_search_animal_events tool

  • Optional search over veterinary reports, e.g. animal.species, drug.active_ingredients.name, reaction.veddra_term_name, serious_ae; up to 1000 records per page
  • Brand and manufacturer names are masked as MSK on every record, so search by active ingredient; drug.manufacturer.registration_number narrows to one approval
  • Records carry animal species, breed, age, and weight, the drug and route, VeDDRA reaction terms, and outcome

openfda_search_drug_shortages tool

  • Optional search over status (Current / To Be Discontinued / Resolved), therapeutic_category, generic_name, or company_name; up to 1000 records per page
  • Each record's openfda block carries brand_name, product_ndc, and rxcui for chaining into openfda_get_drug_label or openfda_lookup_ndc

openfda_search_tobacco_reports tool

  • Optional search over tobacco_products, reported_health_problems, reported_product_problems, or nonuser_affected; up to 1000 records per page
  • Reports carry the problem arrays plus number_tobacco_products, number_health_problems, and number_product_problems counts

openfda_search_recalls tool

  • category (drug, food, device) plus endpoint: enforcement (default, every category) or recall (devices only; other categories fail as recall_endpoint_non_device); up to 1000 records per page
  • Enforcement records carry recall_number, classification (Class I/II/III), and status; device recall records carry product_res_number and recall_status instead, with no hazard classification

openfda_count_values tool

  • endpoint (any of the 20 openFDA endpoints), a count field expression, and an optional search; returns up to 1000 top terms (default 100), ranked by count; a date field returns one term per distinct YYYYMMDD date, ranked the same way
  • truncated flags more distinct terms past limit, except at the 1000-term maximum, where a notice says completeness can't be known (a date count is exact at any limit, since openFDA sends every date); an expression openFDA can't aggregate fails as not_aggregatable (take the countAs form from openfda_describe_fields)
  • Always runs against the live API, even with the bulk mirror enabled

openfda_describe_fields tool

  • endpoint: the same 20 endpoints openfda_count_values accepts
  • Field paths grouped by category, each with type, a description, and countAs (the verified count expression, or null when the field can't be aggregated), plus queryTips on quoting, AND/OR, .exact, and date ranges

openfda_get_drug_label tool

  • Required search on label fields (openfda.brand_name, openfda.generic_name, openfda.manufacturer_name, set_id); limit defaults to 5, max 1000
  • A page over the 24,000-byte inline budget returns kind: "outline" (section names and sizes, largest first) instead of label text; re-call with sections: [...] to get those sections plus identity metadata (openfda, set_id, id, effective_time, version), returned whole even when over budget
  • *_table sections render as Markdown tables in the text output; structured results keep the raw SPL markup

openfda_search_drug_approvals tool

  • Optional search over openfda.brand_name, sponsor_name (stored uppercase, so a lowercase quoted value matches nothing), submissions.submission_type, or submissions.review_priority; up to 1000 records per page
  • Records carry application_number, sponsor_name, products[], and the application's full submissions[] history

openfda_search_device_clearances tool

  • pathway (510k or pma, one per call) plus an optional search over applicant, product_code, advisory_committee_description, or openfda.device_name; up to 1000 records per page
  • 510(k) records carry k_number, device_name, and decision_date; PMA records carry pma_number, trade_name, and supplement_number

openfda_lookup_ndc tool

  • Required search over product_ndc, brand_name, generic_name, openfda.manufacturer_name, or active_ingredients.name; up to 1000 records per page
  • Records carry product_ndc, labeler_name, dosage_form, route, marketing_category, active_ingredients[], and packaging[]

openfda_dataframe_describe tool

  • canvas_id from a staged search; lists each table's name, kind, full staged row_count, and columns with DuckDB type and nullability
  • Fails as canvas_disabled when CANVAS_PROVIDER_TYPE=none, or canvas_not_found when the canvas_id has expired or never existed

openfda_dataframe_query tool

  • canvas_id plus one read-only SELECT; DDL, DML, COPY, and file-reading functions are rejected. Scalars are stored as text (CAST for math) and nested openFDA blocks as JSON columns
  • Rows are capped at the canvas row limit, and truncated: true means page on with ORDER BY plus LIMIT/OFFSET; failures are canvas_disabled, canvas_not_found, missing_table, or invalid_query

openfda_dataframe_drop tool

  • Off by default: set OPENFDA_DATAFRAME_DROP_ENABLED=true to make it callable; otherwise it is listed as disabled on the landing page and absent from tools/list
  • canvas_id plus the table name from openfda_dataframe_describe; deletes that one table or view and returns remaining_tables, leaving the canvas and its other tables in place
  • Failures are canvas_disabled, canvas_not_found, or missing_table (already dropped, expired, or mistyped)

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

openFDA-specific:

  • One client for all 20 openFDA endpoints, with retry on 429 and 5xx. No API key is needed (1K requests/day); a free OPENFDA_API_KEY raises that to 120K/day
  • Queries are field:value over dotted paths joined by AND/OR (a URL-style + between clauses reads as a space); openfda_describe_fields lists the paths, and a malformed query fails as malformed_search before any request
  • Paging: limit up to 1000 and skip up to openFDA's 25,000-record ceiling (pagination_limit_reached past it); each page is held to a 24,000-byte budget
  • fields on any openfda_search_* tool or openfda_lookup_ndc trims each record to the dotted paths you name, so large records fit inline
  • DataCanvas staging (on by default; CANVAS_PROVIDER_TYPE=none turns it off) with stage: true or a canvas_id, and an optional local bulk mirror (OPENFDA_MIRROR_ENABLED=true) that answers exact-key lookups without spending API budget

Agent-friendly output:

  • Disclosed bounds: page_omitted, page_bytes, page_largest_fields, projected_fields, the label outline, and staged_rows report every cut
  • Typed failures: callers branch on error.data.reason (rate_limited, query_error, not_aggregatable, ...) instead of parsing messages
  • Unknown vs. absent: openfda_drug_profile returns null for a section with no FDA record and lists failed sections in degraded[]
  • Empty-result guidance: a no-match search points at openfda_describe_fields and broader terms

Getting started

Connect to the hosted instance, no install:

sh
claude mcp add --transport http openfda-mcp-server https://openfda.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add openfda-mcp-server -- npx -y @cyanheads/openfda-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "openfda-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/openfda-mcp-server"]    }  }}

No API key is needed. A free openFDA API key set as OPENFDA_API_KEY raises the limit from 1K to 120K requests per day. For Docker or a source build, see Running the server.

Configuration

VariableDescriptionDefault
OPENFDA_API_KEYFree API key from open.fda.gov; raises the daily limit from 1K to 120K requests.none
OPENFDA_BASE_URLAPI base URL override, for a proxy or mock.https://api.fda.gov
OPENFDA_MIRROR_ENABLEDAnswer exact-key lookups from the local bulk mirror.false
OPENFDA_MIRROR_PATHDirectory holding one SQLite file per mirrored dataset../data/openfda-mirror
OPENFDA_MIRROR_REFRESH_CRONCron expression for the in-process mirror refresh (HTTP transport only).none
OPENFDA_MIRROR_FALLBACK_LIVEFall back to the live API when the mirror is cold, missing the record, or failing.true
OPENFDA_MIRROR_REFRESH_TIMEOUT_MSWall-clock budget for one refresh before it is aborted, in ms.21600000 (6h)
OPENFDA_MIRROR_BASE_URLHost serving the bulk download manifest (download.json).https://api.fda.gov
CANVAS_PROVIDER_TYPEDataCanvas staging and SQL. none disables them; dataframe tools remain listed and return canvas_disabled.duckdb
OPENFDA_DATAFRAME_DROP_ENABLEDEnable openfda_dataframe_drop, which deletes a staged table. Needs CANVAS_PROVIDER_TYPE=duckdb.false
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTHTTP server port.3010
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto.stateless
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<app-root>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry.false

See .env.example for the full list of optional overrides.

The Claude Desktop MCPB bundle disables DataCanvas because it excludes platform-specific DuckDB bindings. Use npm or Docker for staging and SQL.

Local bulk mirror

With OPENFDA_MIRROR_ENABLED=true the server keeps a local SQLite copy of four openFDA bulk dumps (drug/label, drug/ndc, drug/enforcement, drug/drugsfda). Only exact lookups are answered locally: a single quoted field:"value" term on id, set_id, product_id, product_ndc, recall_number, event_id, or application_number, with no count or sort, skip 0, and one matching record. Everything else goes to the API.

The initial harvest runs separately, never at startup:

sh
bun run mirror:init                  # all four datasetsbun run mirror:init drug/enforcement # one datasetbun run mirror:status                # sync state per datasetbun run mirror:verify                # integrity check + row countsbun run mirror:refresh               # re-harvest datasets whose dump has advanced

A refresh re-reads the whole dump. Set OPENFDA_MIRROR_REFRESH_CRON to run it in-process on the HTTP transport; on stdio, run bun run mirror:refresh from the host. A mirrored response's meta.lastUpdated is the served dump's stamp, which can differ from the live API's.

On Node, install the optional better-sqlite3 peer dependency (Bun uses its built-in bun:sqlite). OPENFDA_MIRROR_REFRESH_CRON also needs the optional node-cron peer dependency; without it the server fails at startup.

Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/openfda-mcp-server.gitcd openfda-mcp-server && bun installcp .env.example .env   # optionally set OPENFDA_API_KEY and the mirror or canvas options
  • Build and run:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:stdio# orbun run start:http
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker run --rm -p 3010:3010 ghcr.io/cyanheads/openfda-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, and logs to /var/log/openfda-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/openfda-mcp-server:latest"]. To build locally, docker build -t openfda-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them. To keep a mirror harvest across container replacement, mount a volume over /usr/src/app/data/openfda-mirror.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point: tool registration, service setup, mirror refresh wiring.
src/configServer-specific environment variable parsing and validation with Zod.
src/mcp-server/tools/definitionsTool definitions (*.tool.ts), fifteen in all.
src/mcp-server/toolsShared tool helpers: per-endpoint field catalog, input schemas and guards, formatters, SPL table rendering.
src/services/openfdaopenFDA API client (retry, rate limits, error normalization), inline page budget, fields record projection, canvas staging.
src/services/openfda/mirrorOpt-in local bulk mirror: dataset registry, dump reader, harvester, mirror-vs-live query gate, refresh schedule.
src/services/canvasDataCanvas accessor for staging and SQL.
scripts/openfda-mirror.tsMirror lifecycle CLI behind the mirror:* scripts.
tests/Unit and integration tests, mirroring the src/ structure.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging
  • Register new tools in the barrel at src/mcp-server/tools/definitions/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate a field openFDA didn't return

Data attribution

Data comes from openFDA, a U.S. Food and Drug Administration service. Under the openFDA license the data is dedicated to the public domain under CC0 1.0, with one exception: GMDN® device-classification content (Term Code, Term Name, and Term Definition) is licensed from The GMDN Agency, and redistributing it or using it to train AI requires a separate licence from the Agency.

That is why the local mirror covers drug datasets only. device/classification and every other device endpoint are excluded from it, and the ingester rejects any record carrying a GMDN-bearing field rather than writing it to disk.

FDA does not endorse this project. Do not rely on openFDA to make decisions regarding medical care.

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

來源:README.md,提交 9109a54

工具

14

openfda_search_adverse_events

Openfda Search Adverse Events

Search adverse event reports across drugs, food, and devices. Use to investigate safety signals, find reports for a specific product, or explore reactions by demographics. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearchcategory必填canvas_id

openfda_search_animal_events

Openfda Search Animal Events

Search adverse event reports for veterinary drugs and devices submitted to the FDA Center for Veterinary Medicine. Records include animal species, breed, age, weight, drug name and route, adverse reactions (using VeDDRA terminology), and outcome. Use to investigate safety signals for veterinary products, find reports by animal species or drug, or explore reaction patterns. Brand and manufacturer names are masked as "MSK" on every record (the FDA null flavor for withheld data), so find a product by active ingredient on drug.active_ingredients.name, unsuffixed. An ingredient search spans every product containing it and cannot attribute reports to one brand; drug.manufacturer.registration_number (the full value, e.g. "USA-USFDACVM-N141426") narrows it to one approval. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearchcanvas_id

openfda_search_drug_shortages

Openfda Search Drug Shortages

Search FDA drug shortage records. Returns per-product shortage status, availability, therapeutic category, dosage form, manufacturer, and dates. Use to check whether a drug is currently in shortage, find all oncology drugs with supply issues, or retrieve the openfda block (brand_name, product_ndc, rxcui) to chain into openfda_get_drug_label or openfda_lookup_ndc. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearchcanvas_id

openfda_search_recalls

Openfda Search Recalls

Search enforcement reports and recall actions across drugs, food, and devices. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearchcategory必填endpointcanvas_id

openfda_search_tobacco_reports

Openfda Search Tobacco Reports

Search problem reports submitted to the FDA for tobacco products, including e-cigarettes, vaping products, cigarettes, and smokeless tobacco. Reports capture product type, reported health problems (e.g. seizure, chest pain), product problems (e.g. exploding battery), whether a non-user was affected, and submission date. Use to investigate safety signals, find reports by product type, or analyze health effects. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearchcanvas_id

openfda_count_values

Openfda Count Values

Aggregate and tally unique values for any field across any openFDA endpoint. Returns ranked term-count pairs sorted by count descending; a date field tallies one term per distinct YYYYMMDD date, ranked the same way. Pair with openfda_search_adverse_events, openfda_search_drug_approvals, openfda_search_device_clearances, openfda_search_recalls, openfda_get_drug_label, or openfda_lookup_ndc when sample records help interpret the aggregates.

輸入參數count必填limitsearchendpoint必填

openfda_describe_fields

Openfda Describe Fields

Return the searchable field paths for an openFDA endpoint, grouped by category with type and description. Use before constructing a search query to find the correct dotted field path — field names differ per endpoint and are not discoverable from the tool schema alone.

輸入參數endpoint必填

openfda_get_drug_label

Openfda Get Drug Label

Look up FDA drug labeling (package inserts / SPL documents). Check indications, warnings, dosage, contraindications, active ingredients, or any structured label section. A label runs to tens of thousands of tokens, so a page that exceeds the inline budget returns the list of available sections instead; re-call with sections to pull the ones you need.

輸入參數skipsortlimitsearch必填sections

openfda_search_drug_approvals

Openfda Search Drug Approvals

Search the Drugs@FDA database for drug application approvals (NDAs and ANDAs). Returns application details, sponsor info, and full submission history. Pair with openfda_get_drug_label to read the approved label, or openfda_count_values to aggregate by sponsor_name, product_type, or route. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearchcanvas_id

openfda_search_device_clearances

Openfda Search Device Clearances

Search FDA device premarket notifications — 510(k) clearances and PMA approvals. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearchpathway必填canvas_id

openfda_lookup_ndc

Openfda Lookup Ndc

Look up drugs in the NDC (National Drug Code) Directory. Identify drug products by NDC code, find active ingredients, packaging details, or manufacturer info. Pair with openfda_get_drug_label using the returned brand_name or set_id to read the package insert. With stage=true, call openfda_dataframe_describe for the staged columns, then openfda_dataframe_query for SQL.

輸入參數skipsortlimitstagefieldssearch必填canvas_id

openfda_drug_profile

Openfda Drug Profile

Resolve one drug name to its FDA identity, then fan out in parallel across the bounded per-drug openFDA endpoints and merge into one profile: identity, label highlights, adverse-event summary, recall history, Drugs@FDA approval, and shortage status. Replaces chaining openfda_get_drug_label, openfda_search_adverse_events, openfda_search_recalls, openfda_search_drug_approvals, and openfda_search_drug_shortages — and reconciles the identifier drift between endpoints that makes that chaining error-prone. Each section is best-effort: a miss returns null rather than failing the call. For deep dives into any one area, use the dedicated tool.

輸入參數drug必填

openfda_dataframe_describe

Openfda Dataframe Describe

List the tables and column schemas on a DataCanvas staged by an openFDA search tool. Call before openfda_dataframe_query to discover the exact table name, column names, and DuckDB types needed for valid SQL. row_count is the full staged result set, not the inline preview count. Columns typed JSON hold nested openFDA objects/arrays — query them with DuckDB json functions.

輸入參數canvas_id必填

openfda_dataframe_query

Openfda Dataframe Query

Run a read-only SQL SELECT against a DataCanvas table staged by an openFDA search tool (call one with stage=true; its response carries canvas_id + canvas_table). Enables GROUP BY, COUNT/SUM/AVG, time-series, and joins across the staged result set without re-paging the API. Call openfda_dataframe_describe first to get the exact table and column names. Results are capped at the canvas row limit — when truncated is true, page the rest with ORDER BY plus LIMIT/OFFSET. Scalar fields are stored as text (CAST for numeric math); nested objects/arrays are JSON columns — read them with DuckDB json functions, e.g. json_extract_string(openfda, '$.brand_name[0]'). Only SELECT is allowed — DDL, DML, COPY, and file-reading functions are blocked.

輸入參數query必填canvas_id必填

版本歷史

8
  1. v0.9.1最新Oct 29, 2026
  2. v0.9.0Oct 26, 2026
  3. v0.8.2Oct 25, 2026
  4. v0.8.1Oct 13, 2026
  5. v0.8.0Oct 4, 2026
  6. v0.7.9Sep 23, 2026
  7. v0.7.6Sep 22, 2026
  8. v0.7.5Sep 16, 2026

評分

已滿足適用檢查項的 100%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分