OpenFDA MCP Server

OpenFDA MCP Server

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.

Category
访问服务器

README

Logo

Unofficial FDA API MCP Server

A comprehensive Model Context Protocol (MCP) server that provides access to the U.S. Food and Drug Administration's public datasets through the openFDA API. This server enables querying of drug adverse events, product labeling, recalls, approvals, shortages, NDC directory information, and medical device regulatory data including 510(k) clearances, classifications, and adverse events.

Developed by Augmented Nature

Features

Drug Tools (6 tools implemented)

  • search_drug_adverse_events: Search FDA Adverse Event Reporting System (FAERS) data
  • search_drug_labels: Search drug product labeling information
  • search_drug_ndc: Query the National Drug Code (NDC) directory
  • search_drug_recalls: Find drug recall enforcement reports
  • search_drugs_fda: Search the Drugs@FDA database for approved products
  • search_drug_shortages: Query current drug shortages

Device Tools (4 tools implemented)

  • search_device_510k: Search FDA 510(k) device clearances
  • search_device_classifications: Search FDA device classifications
  • search_device_adverse_events: Search FDA device adverse events (MDR)
  • search_device_recalls: Search FDA device recall enforcement reports

Key Features

  • Comprehensive Search: Advanced filtering by drug name, manufacturer, indication, dates, and more
  • Rate Limiting: Built-in awareness of FDA API rate limits (1,000 requests/hour without API key)
  • Error Handling: Robust error handling with meaningful error messages
  • Formatted Results: Clean, structured JSON responses with relevant metadata
  • Optional API Key: Supports FDA API key for higher rate limits (120,000 requests/hour)

Installation

  1. The server is already built and configured in your MCP settings
  2. Optionally set an FDA API key for higher rate limits:
# Set FDA_API_KEY environment variable for higher rate limits
export FDA_API_KEY="your_api_key_here"

To get an FDA API key:

  1. Visit https://open.fda.gov/apis/authentication/
  2. Sign up for an API key
  3. Add it to your MCP settings or environment

Usage Examples

Search Drug Adverse Events

Search for adverse events related to aspirin that occurred in the United States in 2023

Search Drug Labels

Find labeling information for diabetes medications manufactured by Novo Nordisk

Search NDC Directory

Look up NDC information for ibuprofen tablets

Search Drug Recalls

Find all Class I drug recalls from 2023 involving contamination

Search FDA Approved Drugs

Find all FDA-approved drugs sponsored by Pfizer with injection dosage form

Search Drug Shortages

Find current drug shortages for antibiotics

API Response Format

All tools return structured JSON with:

  • search_criteria: The parameters used for the search
  • total_results: Total number of matching records in FDA database
  • results_shown: Number of results returned in this response
  • [data_type]: Array of formatted results (e.g., adverse_events, drug_labels)
  • api_usage: Information about API key status and rate limits

Rate Limiting

  • Without API Key: 1,000 requests per hour
  • With API Key: 120,000 requests per hour
  • The server automatically handles rate limit errors and provides helpful messages

Architecture

The server is built with a modular architecture:

  • /src/index.ts: Main server setup and tool registration
  • /src/handlers/drug-handlers.ts: All drug-related tool implementations
  • /src/handlers/device-handlers.ts: All device-related tool implementations
  • /src/utils/api-client.ts: HTTP client with error handling and rate limiting
  • /src/types/fda.ts: TypeScript interfaces for all FDA data structures

Supported Search Parameters

Drug Adverse Events

  • drug_name: Name of the drug or medication
  • brand_name: Brand/trade name
  • generic_name: Generic name
  • manufacturer: Manufacturer name
  • reaction: Adverse reaction or side effect
  • serious_only: Only return serious adverse events
  • patient_sex: Patient sex (1=Male, 2=Female)
  • country: Country where event occurred
  • date_from/date_to: Date range filters
  • count: Group results for counting
  • limit: Maximum results (1-100)
  • skip: Pagination offset

Drug Labels

  • brand_name: Brand/trade name of the drug
  • generic_name: Generic name
  • manufacturer: Manufacturer name
  • active_ingredient: Active ingredient name
  • indication: Medical indication or condition
  • route: Route of administration
  • product_type: Product type
  • Plus standard pagination and counting parameters

NDC Directory

  • product_ndc: Product NDC number
  • package_ndc: Package NDC number
  • proprietary_name: Brand name
  • nonproprietary_name: Generic name
  • labeler_name: Manufacturer/labeler name
  • dosage_form: Dosage form (tablet, capsule, etc.)
  • route: Route of administration
  • substance_name: Active substance name
  • Plus standard pagination and counting parameters

Drug Recalls

  • product_description: Product description
  • recalling_firm: Name of recalling firm
  • classification: Recall classification (Class I, II, III)
  • status: Recall status
  • state/country: Geographic filters
  • reason_for_recall: Reason for recall
  • date_from/date_to: Date range filters
  • Plus standard pagination and counting parameters

Drugs@FDA

  • sponsor_name: Sponsor/applicant name
  • application_number: FDA application number
  • brand_name: Brand/trade name
  • generic_name: Generic name
  • active_ingredient: Active ingredient
  • dosage_form: Dosage form
  • marketing_status: Marketing status
  • Plus standard pagination and counting parameters

Drug Shortages

  • product_name: Product name
  • generic_name: Generic name
  • brand_name: Brand name
  • active_ingredient: Active ingredient
  • shortage_status: Current shortage status
  • shortage_designation: Shortage designation (Yes/No)
  • dosage_form: Dosage form
  • Plus standard pagination and counting parameters

Device 510(k) Clearances

  • device_name: Name of the medical device
  • applicant: Applicant company name
  • contact: Contact information
  • product_code: FDA product code
  • clearance_type: Type of 510(k) clearance
  • decision_date_from/decision_date_to: Decision date range filters
  • Plus standard pagination parameters

Device Classifications

  • device_name: Name of the medical device
  • device_class: Device class (1, 2, 3)
  • medical_specialty: Medical specialty
  • product_code: FDA product code
  • regulation_number: FDA regulation number
  • Plus standard pagination parameters

Device Adverse Events

  • device_name: Name of the medical device
  • brand_name: Brand name of the device
  • manufacturer: Device manufacturer name
  • product_code: FDA product code
  • event_type: Type of adverse event
  • patient_sex: Patient sex (F=Female, M=Male)
  • date_from/date_to: Event date range filters
  • Plus standard pagination parameters

Device Recalls

  • product_description: Product description or name
  • recalling_firm: Name of the recalling firm
  • classification: Recall classification (Class I, II, III)
  • status: Recall status
  • product_code: FDA product code
  • date_from/date_to: Recall initiation date range filters
  • Plus standard pagination parameters

Future Enhancements

The server architecture supports easy extension with additional FDA endpoints:

  • Device Tools: 510(k) clearances, classifications, adverse events, recalls
  • Food Tools: Adverse events, recall enforcement reports
  • Other Tools: Substance data, UNII, tobacco reports, historical documents

Error Handling

The server provides comprehensive error handling for:

  • Invalid search parameters
  • API rate limiting
  • Network connectivity issues
  • FDA API service unavailability
  • Malformed responses

Development

Built with:

  • TypeScript: Type-safe development
  • MCP SDK: Model Context Protocol implementation
  • Axios: HTTP client with interceptors
  • Node.js: Runtime environment

License

This project is open source and available under standard licensing terms.

Support

For issues or questions about the FDA API MCP Server:

  1. Check the FDA API documentation: https://open.fda.gov/apis/
  2. Review rate limiting and authentication requirements
  3. Ensure proper JSON formatting in search parameters

This MCP server provides access to public FDA datasets. Always consult healthcare professionals for medical decisions and drug information.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选