Skip to content
MCP server

Openfda MCP Server

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

Install
Pricing
Open source
Runs
Locally or Remotely
Version
0.10.0
Listing updated
4 days ago

About Openfda MCP Server

Openfda MCP Server is an open-source MCP server. It can run locally on your machine or as a hosted remote server.

Install

Run in a terminal

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

Add to Settings → Connectors → Add custom connector

https://openfda.caseyjhand.com/mcp
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "openfda-mcp-server": {
      "url": "https://openfda.caseyjhand.com/mcp"
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "openfda-mcp-server": {
      "type": "http",
      "url": "https://openfda.caseyjhand.com/mcp"
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "openfda-mcp-server": {
      "serverUrl": "https://openfda.caseyjhand.com/mcp"
    }
  }
}

Add to your client's MCP settings (most use this shape)

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

Configuration

  • OPENFDA_API_KEYFree API key from open.fda.gov — increases daily limit from 1K to 120K requests.
  • OPENFDA_CLAMP_LIMITSClamp 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_TYPEDataCanvas 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_ENABLEDEnable 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_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').
  • OPENFDA_API_KEYFree API key from open.fda.gov — increases daily limit from 1K to 120K requests.
  • MCP_TRANSPORT_TYPESelects the 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'.
  • OPENFDA_CLAMP_LIMITSClamp 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_TYPEDataCanvas 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_ENABLEDEnable 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_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').

Pricing

Open source

Openfda MCP Server FAQ

Is Openfda MCP Server free?

Yes. Openfda MCP Server is open source, so you can use and self-host it for free.

How do I add Openfda MCP Server to Claude Code?

Run this command in your terminal: claude mcp add --transport http openfda-mcp-server https://openfda.caseyjhand.com/mcp