Skip to main content
Glama
ek-nath

openfda-mcp-server

by ek-nath

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

  1. Clone and Install:

    git clone https://github.com/ek-nath/openfda-mcp-server.git
    cd openfda-mcp-server
    uv sync
  2. Verify 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:

  1. Create .env file: Copy the provided template:

    cp .env.template .env
  2. Set OPENFDA_API_KEY: Edit the newly created .env file and replace your_openfda_api_key_here with 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

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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