openfda-mcp-server
Supports integration with Gemini CLI and Google ADK for building AI agents that access FDA drug data.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openfda-mcp-server Check the official FDA label for Lisinopril. Are there warnings about kidney issues?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenFDA MCP Server
An MCP (Model Context Protocol) server for the OpenFDA API, built with FastMCP. This server exposes FDA drug labels and adverse event data to LLMs via the Model Context Protocol.
Features
Tools
search_drug_label: Search for official FDA drug labels by brand or generic name. Returns indications, warnings, and dosage information.get_drug_adverse_events: Search for reported adverse events associated with a specific drug, including seriousness and outcomes.
Prompts
drug_safety_report: A prompt template that guides the LLM to generate a comprehensive safety report for a specific drug, combining label warnings with real-world adverse event data.
Related MCP server: fda-approvals-mcp
Installation & Setup
Clone and Install:
git clone https://github.com/ek-nath/openfda-mcp-server.git cd openfda-mcp-server uv syncVerify Installation: Run the server manually to ensure dependencies are correct (it will wait for input):
uv run server.py
API Key Configuration (Optional)
The OpenFDA API is rate-limited. For higher throughput, you can obtain an API key from the OpenFDA website.
If you have an API key, you can provide it to the server using a .env file:
Create
.envfile: Copy the provided template:cp .env.template .envSet
OPENFDA_API_KEY: Edit the newly created.envfile and replaceyour_openfda_api_key_herewith your actual API key:OPENFDA_API_KEY=your_actual_api_key
The server will automatically detect and use the OPENFDA_API_KEY from this file.
Integration
1. Gemini CLI
To use this tool with the Gemini CLI, add the server configuration to your global settings file (~/.gemini/settings.json).
Configuration:
{
"mcpServers": {
"openfda": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/openfda-mcp-server",
"run",
"--quiet",
"server.py"
]
}
}
}Replace /ABSOLUTE/PATH/TO/... with the full path to your cloned directory.
Troubleshooting:
If you encounter EPERM errors on macOS regarding .Trash, add .Trash/ to your ~/.geminiignore file.
2. Google ADK (Agent Development Kit)
This server can be easily integrated into Python agents built with the Google Gen AI Agent Development Kit (ADK).
👉 View the ADK Integration Guide
3. Claude Desktop
Add the same configuration snippet above to your claude_desktop_config.json (usually located in ~/Library/Application Support/Claude/).
Usage Examples
Once connected, you can ask your agent questions like:
"Check the official FDA label for Lisinopril. Are there warnings about kidney issues?"
"I take Atorvastatin. Is it safe to take Ibuprofen?"
"Generate a drug safety report for Metformin."
License
MIT
Available Tools
2 toolsget_drug_adverse_eventsA
Search OpenFDA for adverse events associated with a drug.
Args: drug_name: The name of the drug. limit: Number of results to return (default 5).
Inputs: drug_name (required), limit. Returns: result
search_drug_labelA
Search OpenFDA for drug labels by drug name (generic or brand name).
Args: drug_name: The name of the drug (e.g., 'ibuprofen', 'Advil'). limit: Number of results to return (default 1).
Inputs: drug_name (required), limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools target distinct OpenFDA endpoints: drug labels and adverse events. There is no overlap in their purposes, making it clear which to use.
Both names follow a verb_noun pattern, but one uses 'search' and the other uses 'get', which is a minor inconsistency. Otherwise the pattern is clear and predictable.
With only two tools, the server feels thin for the OpenFDA domain, which has many potential endpoints. However, the two tools cover two common use cases, so the count is borderline acceptable.
OpenFDA offers many data types (e.g., recalls, enforcement reports, labeling for drugs and devices). Only drug labels and adverse events are covered, leaving significant gaps that would force agents to look elsewhere.
Maintenance
Related MCP Connectors
Search FDA safety data: drug adverse events, recalls, and device events.
FDA drug data via openFDA: adverse-event reports and safety-signal tools (FAERS search, event…
Search and export FDA drug labels by brand name, generic ingredient, or UNII code.
ClinicalTrials.gov v2 studies, OpenFDA FAERS adverse events & recalls, and PubMed evidence.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query and analyze FDA adverse events, drug labels, medical device clearances, and other public health datasets through natural language commands.14-
- AlicenseNot gradedqualityDmaintenanceEnables querying FDA drug approvals, device clearances (510(k)), recalls, and adverse events via the openFDA API, providing tools for clinical and pharmaceutical research.1MIT
- AlicenseBqualityDmaintenanceEnables querying FDA drug label information including adverse reactions, warnings, and indications through natural language.5GPL 3.0
- AlicenseAqualityDmaintenanceProvides LLM-optimized access to FDA data through the OpenFDA API and direct regulatory decision document retrieval, covering all 21 OpenFDA endpoints plus 510(k) summaries, De Novo decisions, and PMA approvals.41MIT