MCP directory
OM

Openfda Mcp Server

by github.com/cyanheads · v0.11.0 · updated Nov 23, 2026

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

Remotenpm

Connect to the hosted server

Add this URL as a custom connector in your AI client.

Server URL

https://openfda.caseyjhand.com/mcp

Claude Code

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

Run it locally

Install the package and point your AI client at it.

npm

npx -y @cyanheads/[email protected]

Environment variables

  • OPENFDA_API_KEY

    Free API key from open.fda.gov — increases daily limit from 1K to 120K requests.

  • OPENFDA_CLAMP_LIMITS

    Clamp 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.

  • CANVAS_PROVIDER_TYPE

    DataCanvas 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 'none' to disable.

  • OPENFDA_DATAFRAME_DROP_ENABLED

    Enable openfda_dataframe_drop, which deletes a table staged on a DataCanvas. Off by default; applies only when DataCanvas is enabled (CANVAS_PROVIDER_TYPE=duckdb).

  • OPENFDA_MIRROR_ENABLED

    Serve 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_PATH

    Directory holding one SQLite file per mirrored dataset.

  • OPENFDA_MIRROR_REFRESH_CRON

    Cron 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_LIVE

    Fall back to the live API when the mirror is cold, missing the record, or failing. Disable to fail loudly instead.

  • OPENFDA_MIRROR_REFRESH_TIMEOUT_MS

    Wall-clock budget for one scheduled refresh before it is aborted. Raise it for drug/label, the only multi-partition dataset.

  • OPENFDA_MIRROR_BASE_URL

    Host serving the openFDA bulk download manifest. Override only to harvest from a private mirror of the dumps.

  • MCP_LOG_LEVEL

    Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

npm

npx -y @cyanheads/[email protected]

Environment variables

  • OPENFDA_API_KEY

    Free API key from open.fda.gov — increases daily limit from 1K to 120K requests.

  • MCP_TRANSPORT_TYPE

    Selects the HTTP transport.

  • MCP_HTTP_HOST

    The hostname for the HTTP server.

  • MCP_HTTP_PORT

    The port to run the HTTP server on.

  • MCP_HTTP_ENDPOINT_PATH

    The endpoint path for the MCP server.

  • MCP_AUTH_MODE

    Authentication mode to use: 'none', 'jwt', or 'oauth'.

  • OPENFDA_CLAMP_LIMITS

    Clamp 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.

  • CANVAS_PROVIDER_TYPE

    DataCanvas 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 'none' to disable.

  • OPENFDA_DATAFRAME_DROP_ENABLED

    Enable openfda_dataframe_drop, which deletes a table staged on a DataCanvas. Off by default; applies only when DataCanvas is enabled (CANVAS_PROVIDER_TYPE=duckdb).

  • OPENFDA_MIRROR_ENABLED

    Serve 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_PATH

    Directory holding one SQLite file per mirrored dataset.

  • OPENFDA_MIRROR_REFRESH_CRON

    Cron 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_LIVE

    Fall back to the live API when the mirror is cold, missing the record, or failing. Disable to fail loudly instead.

  • OPENFDA_MIRROR_REFRESH_TIMEOUT_MS

    Wall-clock budget for one scheduled refresh before it is aborted. Raise it for drug/label, the only multi-partition dataset.

  • OPENFDA_MIRROR_BASE_URL

    Host serving the openFDA bulk download manifest. Override only to harvest from a private mirror of the dumps.

  • MCP_LOG_LEVEL

    Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

More from github.com/cyanheads

More MCP servers