Skip to main content
Glama

MCP-сервер OpenFDA

Сервер протокола контекста модели (MCP) для запроса информации о лекарственных средствах из API OpenFDA.

Возможности

  • Получение информации об этикетке лекарственного средства по торговому наименованию

  • Получение информации о лекарственном средстве по дженерику (активному ингредиенту)

  • Получение всех торговых марок дженерика

  • Получение отчетов о нежелательных явлениях (побочных эффектах) для лекарственного средства (по торговому наименованию или дженерику)

  • Получение всех лекарственных средств, произведенных конкретной компанией

  • Получение исчерпывающей информации о безопасности лекарственных средств (предупреждения, противопоказания, взаимодействия, меры предосторожности и т. д.)

  • Нормализация и проверка форматов NDC (Национальный код лекарственного средства)

  • Полезные сообщения об ошибках и рекомендации при неудачных запросах

  1. Настройте свой API-ключ OpenFDA

    Для доступа к API OpenFDA MCP-серверу требуется API-ключ OpenFDA.
    Создайте файл .env в корне вашего проекта и добавьте следующую строку:

    OPENFDA_API_KEY=your_openfda_api_key_here

    Примечание: Никогда не добавляйте свой реальный API-ключ в систему контроля версий.
    Вы можете получить API-ключ на странице регистрации API-ключей OpenFDA.

  2. Пример конфигурации MCP-сервера

    Если вы интегрируете этот сервер с более крупной системой MCP, ваша конфигурация может выглядеть так:

     {
       "mcpServers": {
           "openfda": {
               "command": "npx",
               "args": [
                   "@ythalorossy/openfda"
               ],
               "env": {
                   "OPENFDA_API_KEY": "*****************************************"
               },
               "timeout": 60000,
               "autoApprove": [
                   "get-drug-by-name",
                   "get-drug-by-generic-name",
                   "get-drug-adverse-events",
                   "get-drugs-by-manufacturer",
                   "get-drug-safety-info",
                   "get-drug-by-ndc",
                   "get-drug-by-product-ndc"
               ]
           }
       }
     }

    Замените звездочки на ваш фактический API-ключ или убедитесь, что он загружается из вашего файла .env.

Related MCP server: drugbank-mcp-server

Хотите запустить его локально?

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

Затем запустите сервер:

node bin/index.js

Или используйте его напрямую с помощью npx:

npx @ythalorossy/openfda

Конфигурация

Создайте файл .env для любых необходимых переменных окружения.

Лицензия

MIT

Купить мне кофе

coff.ee/ythalorossy

Available Tools

7 tools
get-drug-adverse-eventsB

Get adverse event reports for a drug. This provides safety information about reported side effects and reactions. Use brand name or generic name.

Inputs: drugName (required), limit, seriousness.

get-drug-by-generic-nameA

Get drug information by generic (active ingredient) name. Useful when you know the generic name but not the brand name. Returns all brand versions of the generic drug.

Inputs: genericName (required), limit.

get-drug-by-nameA

Get drug by name. Use this tool to get the drug information by name. The drug name should be the brand name. It returns the brand name, generic name, manufacturer name, product NDC, product type, route, substance name, indications and usage, warnings, do not use, ask doctor, ask doctor or pharmacist, stop use, pregnancy or breast feeding.

Inputs: drugName (required).

get-drug-by-ndcB

Get drug information by National Drug Code (NDC). Accepts both product NDC (XXXXX-XXXX) and package NDC (XXXXX-XXXX-XX) formats. Also accepts NDC codes without dashes.

Inputs: ndcCode (required).

get-drug-by-product-ndcA

Get drug information by product NDC only (XXXXX-XXXX format). This ignores package variations and finds all packages for a product.

Inputs: productNDC (required).

get-drug-safety-infoB

Get comprehensive safety information for a drug including warnings, contraindications, drug interactions, and precautions. Use brand name.

Inputs: drugName (required).

get-drugs-by-manufacturerA

Get all drugs manufactured by a specific company. Useful for finding alternatives or checking manufacturer portfolios.

Inputs: manufacturerName (required), limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation3/5

    The tools have overlapping purposes that could cause confusion, particularly between get-drug-by-name, get-drug-by-generic-name, and get-drug-by-ndc, which all retrieve drug information but with different input parameters. Descriptions help clarify the distinctions, but an agent might misselect when the query is ambiguous about whether to use brand name, generic name, or NDC. The safety-focused tools (get-drug-adverse-events and get-drug-safety-info) are more distinct, but overall there is moderate overlap in the information retrieval tools.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with hyphens, specifically 'get-drug-by-X' or 'get-drug-X', where X is a specific attribute like name, ndc, or safety-info. This predictability makes it easy for an agent to understand the naming convention and infer tool purposes. There are no deviations in style, such as mixing camelCase or snake_case, ensuring high readability and consistency throughout the set.

    Tool Count5/5

    With 7 tools, the server is well-scoped for its domain of drug information retrieval from OpenFDA. Each tool serves a distinct purpose, such as looking up drugs by different identifiers or accessing safety data, and none appear redundant or unnecessary. This count is typical for a focused API server, providing enough functionality without being overwhelming or too sparse, making it appropriate for the server's purpose.

    Completeness4/5

    The tool set covers the core domain of drug information retrieval comprehensively, including lookups by brand name, generic name, NDC, manufacturer, and safety data. Minor gaps exist, such as the lack of update or delete operations, but this is reasonable since OpenFDA is a read-only public database. Agents can work around these gaps, and the surface supports common queries without dead ends, though advanced features like filtering or pagination might be missing but are not essential for basic coverage.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      A comprehensive MCP server that provides access to U.S. FDA public datasets via the openFDA API, enabling querying of drug adverse events, labeling, recalls, approvals, shortages, NDC directory, and medical device regulatory data.
      10
      26
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      A Model Context Protocol (MCP) server exposing the FDA Purple Book — the database of licensed biological products (reference biologics, biosimilars, and interchangeables), with BLA numbers, applicants, approval dates, and exclusivity expiry.
      -
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables AI assistants to query U.S. FDA public datasets, including drug adverse events, labeling, recalls, approvals, shortages, NDC directory, and medical device regulatory information.
      10
      MIT