Skip to main content
Glama

OpenFDA

by ythalorossy

OpenFDA MCP Server

A Model Context Protocol (MCP) server for querying drug information from the OpenFDA API.

Features

  • Retrieve drug label information by brand name
  • Retrieve drug information by generic (active ingredient) name
  • Get all brand versions of a generic drug
  • Get adverse event (side effect) reports for a drug (by brand or generic name)
  • Retrieve all drugs manufactured by a specific company
  • Get comprehensive drug safety information (warnings, contraindications, interactions, precautions, etc.)
  • Normalize and validate NDC (National Drug Code) formats
  • Helpful error messages and suggestions for failed queries
  1. Set up your OpenFDA API KeyThe MCP server requires an OpenFDA API key to access the OpenFDA API.
    Create a .env file in the root of your project and add the following line:
    OPENFDA_API_KEY=your_openfda_api_key_here

    Note: Never commit your real API key to version control.
    You can obtain an API key from OpenFDA API Key Registration.

  2. Example MCP Server ConfigurationIf you are integrating this server with a larger MCP system, your configuration might look like:
    { "mcpServers": { "openfda": { "command": "npx", "args": ["@ythalorossy/openfda"], "env": { "OPENFDA_API_KEY": "************" }, "timeout": 60000 } } }
    Replace the asterisks with your actual API key, or ensure it is loaded from your .env file.

Want to run it local?

git clone https://github.com/ythalorossy/openfda.git cd openfda npm install

Usage

First, build the project:

npm run build

Then, start the server from the build folder:

node build/index.js

Key Points:

  • The build step (npm run build) compiles your source files into the build/ directory.
  • You should run the compiled output (e.g., build/bin/index.js), not the source file (bin/index.js), unless your project is set up to run directly from source.

Configuration

Create a .env file for any required environment variables.

License

MIT

Buy me a Coffee

coff.ee/ythalorossy

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A Model Context Protocol (MCP) server for querying drug information from the OpenFDA API.

Features Retrieve drug label information by brand name Retrieve drug information by generic (active ingredient) name Get all brand versions of a generic drug Get adverse event (side effect) reports for a drug

  1. Features
    1. Want to run it local?
      1. Usage
        1. Configuration
          1. License

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol (MCP) server that provides intelligent access to PowerPlatform/Dataverse entities and records. This tool offers context-aware assistance, entity exploration and metadata access.
              Last updated -
              8
              469
              16
              JavaScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server providing AI assistants with access to healthcare data tools, including FDA drug information, PubMed research, health topics, clinical trials, and medical terminology lookup.
              Last updated -
              7
              69
              18
              JavaScript
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol (MCP) server that scrapes, indexes, and searches documentation for third-party software libraries and packages, supporting versioning and hybrid search.
              Last updated -
              37
              385
              TypeScript
              MIT License
              • Apple
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol (MCP) server for searching the National Provider Identifier (NPI) registry. This server provides tools to search and retrieve information about healthcare providers and organizations in the United States.
              Last updated -
              1
              1
              Python
              MIT License
              • Apple

            View all related MCP servers

            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/ythalorossy/openfda'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server