MCP Server
MCP
io.github.cyanheads/openfda-mcp-server
Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.
Install
npx -y @cyanheads/[email protected]
Configuration Example
{
"remotes": [
{
"type": "streamable-http",
"url": "https://openfda.caseyjhand.com/mcp"
}
],
"packages": [
{
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"identifier": "@cyanheads/openfda-mcp-server",
"version": "0.7.3",
"runtimeHint": "bun",
"transport": {
"type": "stdio"
},
"environmentVariables": [
{
"description": "Free API key from open.fda.gov — increases daily limit from 1K to 120K requests.",
"format": "string",
"name": "OPENFDA_API_KEY"
},
{
"description": "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.",
"format": "string",
"default": "false",
"name": "OPENFDA_MIRROR_ENABLED"
},
{
"description": "Directory holding one SQLite file per mirrored dataset.",
"format": "string",
"default": "./data/openfda-mirror",
"name": "OPENFDA_MIRROR_PATH"
},
{
"description": "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.",
"format": "string",
"name": "OPENFDA_MIRROR_REFRESH_CRON"
},
{
"description": "Fall back to the live API when the mirror is cold, missing the record, or failing. Disable to fail loudly instead.",
"format": "string",
"default": "true",
"name": "OPENFDA_MIRROR_FALLBACK_LIVE"
},
{
"description": "Wall-clock budget for one scheduled refresh before it is aborted. Raise it for drug/label, the only multi-partition dataset.",
"format": "string",
"default": "21600000",
"name": "OPENFDA_MIRROR_REFRESH_TIMEOUT_MS"
},
{
"description": "Host serving the openFDA bulk download manifest. Override only to harvest from a private mirror of the dumps.",
"format": "string",
"default": "https://api.fda.gov",
"name": "OPENFDA_MIRROR_BASE_URL"
},
{
"description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').",
"format": "string",
"default": "info",
"name": "MCP_LOG_LEVEL"
}
]
},
{
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"identifier": "@cyanheads/openfda-mcp-server",
"version": "0.7.3",
"runtimeHint": "bun",
"transport": {
"type": "streamable-http",
"url": "http://localhost:3010/mcp"
},
"environmentVariables": [
{
"description": "Free API key from open.fda.gov — increases daily limit from 1K to 120K requests.",
"format": "string",
"name": "OPENFDA_API_KEY"
},
{
"description": "Must be set to 'http' for streamable HTTP transport.",
"isRequired": true,
"format": "string",
"default": "http",
"name": "MCP_TRANSPORT_TYPE"
},
{
"description": "The hostname for the HTTP server.",
"format": "string",
"default": "127.0.0.1",
"name": "MCP_HTTP_HOST"
},
{
"description": "The port to run the HTTP server on.",
"format": "string",
"default": "3010",
"name": "MCP_HTTP_PORT"
},
{
"description": "The endpoint path for the MCP server.",
"format": "string",
"default": "/mcp",
"name": "MCP_HTTP_ENDPOINT_PATH"
},
{
"description": "Authentication mode to use: 'none', 'jwt', or 'oauth'.",
"format": "string",
"default": "none",
"name": "MCP_AUTH_MODE"
},
{
"description": "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.",
"format": "string",
"default": "false",
"name": "OPENFDA_MIRROR_ENABLED"
},
{
"description": "Directory holding one SQLite file per mirrored dataset.",
"format": "string",
"default": "./data/openfda-mirror",
"name": "OPENFDA_MIRROR_PATH"
},
{
"description": "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.",
"format": "string",
"name": "OPENFDA_MIRROR_REFRESH_CRON"
},
{
"description": "Fall back to the live API when the mirror is cold, missing the record, or failing. Disable to fail loudly instead.",
"format": "string",
"default": "true",
"name": "OPENFDA_MIRROR_FALLBACK_LIVE"
},
{
"description": "Wall-clock budget for one scheduled refresh before it is aborted. Raise it for drug/label, the only multi-partition dataset.",
"format": "string",
"default": "21600000",
"name": "OPENFDA_MIRROR_REFRESH_TIMEOUT_MS"
},
{
"description": "Host serving the openFDA bulk download manifest. Override only to harvest from a private mirror of the dumps.",
"format": "string",
"default": "https://api.fda.gov",
"name": "OPENFDA_MIRROR_BASE_URL"
},
{
"description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').",
"format": "string",
"default": "info",
"name": "MCP_LOG_LEVEL"
}
]
}
]
}
mcp
model-context-protocol
streamable-http
npm
By
Comments
Sign in to leave a comment