Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

openfda-mcp-server

MCP server by cyanheads Community

Queries FDA data on drugs, food, devices, and recalls through the openFDA API. It suits users who want FDA records available inside an AI assistant.

  • Score 80
  • 6 stars
  • 766 a week
  • Apache-2.0
  • Updated

Install openfda-mcp-server

Built from the published package, never by AI.

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

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install openfda-mcp-server in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the openfda-mcp-server block.

About

This MCP server queries FDA data on drugs, food, devices, and recalls from the openFDA public API. It searches adverse events, recalls, drug approvals, device clearances, drug shortages, and tobacco reports. It also looks up NDC codes and drug labels, and counts field values across any of the 20 openFDA endpoints.

The server runs over STDIO or Streamable HTTP and is built on @cyanheads/mcp-ts-core. Results are paged and held to a 24,000-byte budget, and failures return typed reasons. An optional DataCanvas stages results for read-only SQL queries. It fits users who want FDA records available inside an AI assistant.

Written from the project's README and checked against it.

Tools it gives your assistant

  • openfda_drug_profileBuilds a consolidated FDA profile for one drug name, brand or generic.
  • openfda_search_adverse_eventsSearches adverse event reports across drugs, food, and devices.
  • openfda_search_recallsSearches enforcement reports and recall actions across drugs, food, and devices.
  • openfda_get_drug_labelLooks up FDA drug labeling, such as package inserts and SPL documents.
  • openfda_search_drug_approvalsSearches the Drugs@FDA database for NDA and ANDA application approvals.
  • openfda_search_device_clearancesSearches device premarket notifications, including 510(k) clearances and PMA approvals.
  • openfda_lookup_ndcLooks up drugs in the NDC (National Drug Code) Directory.
  • openfda_search_drug_shortagesSearches FDA drug shortage records by status, category, or manufacturer.
  • openfda_count_valuesAggregates and tallies unique values for any field across any openFDA endpoint.
  • openfda_dataframe_queryRuns read-only SQL over a result set staged on a DataCanvas.

What you need

  • Optional free openFDA API key (OPENFDA_API_KEY) for higher request limits
  • An MCP client that supports STDIO or Streamable HTTP
SettingNeededWhat it is
OPENFDA_API_KEYEnvironment variableOptionalFree API key from open.fda.gov — increases daily limit from 1K to 120K requests.
OPENFDA_CLAMP_LIMITSEnvironment variableOptionalClamp a limit above its endpoint's cap to that cap, with a notice naming the requested value and the cap. On by default; set to 'false' to reject such a limit instead and advertise the cap as the schema maximum. Default: true
CANVAS_PROVIDER_TYPEEnvironment variableOptionalDataCanvas staging, on by default: stage=true or a canvas_id on an openfda_search_* tool or openfda_lookup_ndc stages the matched records as a SQL table for the openfda_dataframe_* tools. The DuckDB binding ships with the server. Set to 'no Default: duckdb
OPENFDA_DATAFRAME_DROP_ENABLEDEnvironment variableOptionalEnable openfda_dataframe_drop, which deletes a table staged on a DataCanvas. Off by default; applies only when DataCanvas is enabled (CANVAS_PROVIDER_TYPE=duckdb). Default: false
OPENFDA_MIRROR_ENABLEDEnvironment variableOptionalServe exact-key lookups for drug/label, drug/ndc, drug/enforcement, and drug/drugsfda from a local bulk mirror instead of the API. Off by default; the initial harvest runs out-of-band via the mirror:init script. Default: false
OPENFDA_MIRROR_PATHEnvironment variableOptionalDirectory holding one SQLite file per mirrored dataset. Default: ./data/openfda-mirror
OPENFDA_MIRROR_REFRESH_CRONEnvironment variableOptionalCron expression for the in-process mirror refresh. HTTP transport only; stdio operators run mirror:refresh from the host. Requires the optional node-cron peer dependency.
OPENFDA_MIRROR_FALLBACK_LIVEEnvironment variableOptionalFall back to the live API when the mirror is cold, missing the record, or failing. Disable to fail loudly instead. Default: true
OPENFDA_MIRROR_REFRESH_TIMEOUT_MSEnvironment variableOptionalWall-clock budget for one scheduled refresh before it is aborted. Raise it for drug/label, the only multi-partition dataset. Default: 21600000
OPENFDA_MIRROR_BASE_URLEnvironment variableOptionalHost serving the openFDA bulk download manifest. Override only to harvest from a private mirror of the dumps. Default: https://api.fda.gov
MCP_LOG_LEVELEnvironment variableOptionalSets the minimum log level for output (e.g., 'debug', 'info', 'warn'). Default: info

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Show me the FDA profile for metformin, including recalls and approvals
  • Find Class I drug recalls from the last year
  • Look up the NDC directory entries for ibuprofen tablets

Good to know

  • Without an API key, openFDA allows 1K requests per day.
  • Skip paging stops at openFDA's 25,000-record ceiling.
  • The dataframe drop tool is off by default.
  • Count tool always runs against the live API, even with the bulk mirror enabled.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to openfda-mcp-server

All alternatives →
Mirobody thetahealth
96

Standardizes lab test names to LOINC codes and units to UCUM, and symptoms and diagnoses to ICPC-3, offline and with no API key. Built for people who want their health records on their own machine and queryable by an AI agent over MCP.

AAA Local 1.9k
Ruview ruvnet
94

RuView is a WiFi sensing platform and MCP server that uses low-cost ESP32 sensors to detect people, breathing and heart rate. It is for developers and operators who want room sensing without cameras or wearables.

AAA Local 106k
tooluniversemims-harvard
90

ToolUniverse is an MCP server that gives AI assistants access to more than 2,700 scientific tools for life science, research and literature. It is aimed at AI scientists, researchers and developers building research systems.

AAA Local 1.8k
Mirobody thetahealth
90

Mirobody is a self-hosted engine that turns lab reports, wearable data and genetic files into a single health record. Its built-in MCP server lets an AI assistant query that record and trace each number back to its source file. It is for people who want their health data on their own machine.

AAA Local 1.9k
Scansci PDF Rimagination
88

ScanSci PDF gets academic papers for AI agents. Give it a DOI, arXiv ID, article link, reference list or research question, and it searches candidate sources and tries to fetch accessible full texts. It is for students, researchers and labs.

AAA Local 1.3k
Dsh Wensu hui-xu-ai
87

Searches CNKI and Web of Science through an MCP server, returning records with impact factors. It can also open a paper in the user's signed-in browser and read its full text. Built for researchers who want AI answers on science topics backed by the source article.

AAC Local 5k/wk

Compare with Mirobody, Ruview or tooluniverse

openfda-mcp-server: common questions

Does the openFDA MCP server need an API key?

No key is needed for basic use, which allows 1K requests per day. A free OPENFDA_API_KEY raises the limit to 120K per day.

Can I use the server without installing it locally?

The source lists a public hosted instance at openfda.caseyjhand.com/mcp, alongside STDIO and Streamable HTTP options for local use.

Can this server change or delete FDA data?

The tools query openFDA data. The only delete action, openfda_dataframe_drop, removes a staged table on a DataCanvas and is disabled unless enabled by configuration.

How do I install openfda-mcp-server?

In Claude Code run claude mcp add openfda-mcp-server -- npx -y @cyanheads/openfda-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is openfda-mcp-server the official server?

openfda-mcp-server is a community project by cyanheads, not verified by a company domain.

Is openfda-mcp-server free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is openfda-mcp-server safe to use?

It scores 80 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to openfda-mcp-server?

Similar MCP servers: Mirobody, Ruview, tooluniverse, Mirobody.

Does openfda-mcp-server work with ChatGPT?

Yes. Add its server URL in ChatGPT as a custom connector. See MCP in ChatGPT.

openfda-mcp-server Install

Add to stack

Loading.