openfda-mcp-server
Supports integration with Gemini CLI and Google ADK for building AI agents that access FDA drug data.
Click on "Install 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-serverCheck 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: OpenFDA FastMCP Server
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).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| drug_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. The word 'Search' implies a read-only operation, which is a positive signal, but it does not disclose potential rate limits, API authentication requirements, pagination behavior, or error handling. Given that the description is minimal and lacks these details, a score of 3 reflects that it provides some behavioral context (read operation) but is far from comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured. It leads with the purpose, then lists arguments in a clear key-value format. Every sentence provides useful information without redundancy or excessive length. It is appropriately sized for a tool with only two parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema (context signal) so return values are likely covered there, reducing the description's burden. However, there are no annotations, and the description omits details such as pagination, rate limits, or usage constraints that would be valuable for a search tool interacting with an external API. It is adequate for basic invocation but not fully complete for a production context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has no descriptions for its parameters (0% coverage), so the description must compensate. It does so by explicitly defining both 'drug_name' and 'limit': 'drug_name: The name of the drug.' and 'limit: Number of results to return (default 5).' This adds meaning beyond the raw schema types and defaults, though the explanations are brief.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Search OpenFDA for adverse events associated with a drug.' It uses a specific verb (Search) and resource (OpenFDA adverse events), which distinguishes it from the sibling tool 'search_drug_label' that focuses on drug labels. This is a clear, non-tautological purpose statement.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There is no mention of use cases, exclusions, or relationships to sibling tools like search_drug_label. A user would need external knowledge to decide which tool fits their need.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| drug_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden but only adds the generic/brand nuance and the default limit (already in schema). It does not disclose output format, error behavior, rate limits, or any other behavioral traits beyond the basic search.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and includes a structured arg list, but the arg list largely duplicates the schema. Still, it is free of unnecessary filler and front-loads the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a simple search tool, but it lacks explicit guidance on when to use it over the sibling tool and does not address any access or output considerations. Since an output schema exists, return values need not be explained, but the behavioral gaps hurt completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description compensates by explaining the meaning of drug_name with an example and specifying the default for limit, adding value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action (search) and resource (OpenFDA drug labels), and mentions generic or brand name, distinguishing it from the sibling tool for adverse events.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides clear context for when to use the tool (searching drug labels by name) but does not explicitly address alternatives or situations when the sibling tool should be used instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
get_drug_adverse_events - First observed
search_drug_label
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search FDA safety data: drug adverse events, recalls, and device events.
Search and export FDA drug labels by brand name, generic ingredient, or UNII code.
Scrape openFDA drug recalls, enforcement reports, labels and adverse events. Pay per row.
Drug-drug interaction checker for clinical LLMs using RxNorm and DailyMed.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time access to medical data including drug interactions, ICD-10 codes, FDA adverse event reports, and clinical guidelines. It enables LLMs to query databases like openFDA, PubMed, and CMS for pharmaceutical and clinical information.1MIT
- 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.13-
- FlicenseNot gradedqualityDmaintenanceEnables querying FDA drug approvals, device clearances (510(k)), recalls, and adverse events via the openFDA API, providing tools for clinical and pharmaceutical research.1-
- AlicenseBqualityDmaintenanceEnables querying FDA drug label information including adverse reactions, warnings, and indications through natural language.519GPL 3.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ek-nath/openfda-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server