io.github.cyanheads/openfda-mcp-server MCP Server
io.github.cyanheads/openfda-mcp-server
What this kind of tool is for
- Query, inspect, or seed a database without writing a one-off script.
- Let your agent look up schema details before it writes migration code.
- Move a small dataset between tools without leaving the terminal.
How to compare servers like this
- Engine match:
- Confirm it speaks your exact database and version, not just the family.
- Access scope:
- Read-only connections are the safe default — start there before granting writes.
- Safety rails:
- Check whether destructive statements need an explicit confirmation before they run.
- Maintenance signal:
- Database drivers change; a recently updated tool is less likely to break mid-query.
This page carries your copy-paste config: pick your MCP client in the install section on this page and use the copy button.
What is the io.github.cyanheads/openfda-mcp-server MCP server?
Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.
How to install io.github.cyanheads/openfda-mcp-server
Copy-paste configuration for popular MCP clients.
OPENFDA_API_KEYFree API key from open.fda.gov — increases daily limit from 1K to 120K requests.
OPENFDA_MIRROR_ENABLEDServe 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.
OPENFDA_MIRROR_PATHDirectory holding one SQLite file per mirrored dataset.
OPENFDA_MIRROR_REFRESH_CRONCron 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_LIVEFall back to the live API when the mirror is cold, missing the record, or failing. Disable to fail loudly instead.
OPENFDA_MIRROR_REFRESH_TIMEOUT_MSWall-clock budget for one scheduled refresh before it is aborted. Raise it for drug/label, the only multi-partition dataset.
OPENFDA_MIRROR_BASE_URLHost serving the openFDA bulk download manifest. Override only to harvest from a private mirror of the dumps.
MCP_LOG_LEVELSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_TRANSPORT_TYPErequiredMust be set to 'http' for streamable HTTP transport.
MCP_HTTP_HOSTThe hostname for the HTTP server.
MCP_HTTP_PORTThe port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHThe endpoint path for the MCP server.
MCP_AUTH_MODEAuthentication mode to use: 'none', 'jwt', or 'oauth'.
{
"mcpServers": {
"openfda-mcp-server": {
"command": "bun",
"args": [
"-y",
"@cyanheads/openfda-mcp-server"
],
"env": {
"OPENFDA_API_KEY": "<YOUR_OPENFDA_API_KEY>",
"OPENFDA_MIRROR_ENABLED": "<YOUR_OPENFDA_MIRROR_ENABLED>",
"OPENFDA_MIRROR_PATH": "<YOUR_OPENFDA_MIRROR_PATH>",
"OPENFDA_MIRROR_REFRESH_CRON": "<YOUR_OPENFDA_MIRROR_REFRESH_CRON>",
"OPENFDA_MIRROR_FALLBACK_LIVE": "<YOUR_OPENFDA_MIRROR_FALLBACK_LIVE>",
"OPENFDA_MIRROR_REFRESH_TIMEOUT_MS": "<YOUR_OPENFDA_MIRROR_REFRESH_TIMEOUT_MS>",
"OPENFDA_MIRROR_BASE_URL": "<YOUR_OPENFDA_MIRROR_BASE_URL>",
"MCP_LOG_LEVEL": "<YOUR_MCP_LOG_LEVEL>",
"MCP_TRANSPORT_TYPE": "<YOUR_MCP_TRANSPORT_TYPE>",
"MCP_HTTP_HOST": "<YOUR_MCP_HTTP_HOST>",
"MCP_HTTP_PORT": "<YOUR_MCP_HTTP_PORT>",
"MCP_HTTP_ENDPOINT_PATH": "<YOUR_MCP_HTTP_ENDPOINT_PATH>",
"MCP_AUTH_MODE": "<YOUR_MCP_AUTH_MODE>"
}
}
}
}Related MCP servers
Access FEC campaign finance data. Query data about candidates, money trails, and election filings.
Barcode lookup, nutrition search, and product comparison for 3M+ crowd-sourced food products.
Search books and authors, fetch editions, browse subjects, and resolve cover images.
Search bills, legislators, committees, and events across all 50 US states, DC, and 5 US territories.
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.
Researcher profiles, works, affiliations, funding, and peer reviews from the ORCID registry.
