fda-apis-mcp-server

Vrushi007/fda-apis-mcp-server

3.1

If you are the rightful owner of fda-apis-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The FDA Data Retriever MCP Server provides access to various FDA device-related APIs, enabling users to fetch and analyze FDA device data.

Tools
16
Resources
0
Prompts
0

FDA Data Retriever MCP Server

A comprehensive Model Context Protocol (MCP) server that provides access to various FDA (Food and Drug Administration) device-related APIs. This server enables users to fetch and analyze FDA device data including 510(k) clearances, device classifications, pre-market approvals, recalls, adverse events, and more.

🚀 Features

The FDA Data Retriever provides access to 8 major FDA device databases with 16 specialized tools:

Available FDA Endpoints

  1. 510(k) Clearances - Medical device clearances
  2. Device Classifications - FDA device categorization and regulatory requirements
  3. Pre-market Approvals (PMA) - High-risk device approvals
  4. Unique Device Identifiers (UDI) - Device identification database
  5. Registration & Listing - Manufacturer/establishment registrations
  6. Device Recalls - Safety-related device recalls
  7. COVID-19 Serological Testing - COVID-19 test evaluations
  8. Device Adverse Events - Safety incident reports

Tool Types

Each endpoint provides two types of tools:

  • Fetch Tools: Retrieve actual records with full details
  • Count Tools: Aggregate and count data by specific fields

📋 Requirements

  • Python: >=3.10
  • Dependencies:
    • httpx>=0.28.1 (for async HTTP requests)
    • mcp[cli]>=1.13.1 (MCP framework)

🛠️ Installation

1. Clone or Download the Project

git clone <repository-url>
cd fda_data_retriever

2. Install Dependencies

Using UV (recommended):

uv sync

Or using pip:

pip install -r requirements.txt

🎯 Usage

Running the Server

Standalone Mode
uv run main.py
MCP Configuration

Add to your MCP configuration file (mcp.json):

{
  "servers": {
    "fda-data-retriever": {
      "command": "/opt/homebrew/bin/uv",
      "args": ["--directory", "/path/to/fda_data_retriever", "run", "main.py"]
    }
  }
}

Available Tools

510(k) Clearances
  • fetch_510k_device_data() - Get 510(k) clearance records
  • count_510k_device_data() - Count 510(k) data by fields
Device Classifications
  • fetch_device_classification_data() - Get device classification records
  • count_device_classification_data() - Count classification data
Pre-market Approvals (PMA)
  • fetch_pma_device_data() - Get PMA approval records
  • count_pma_device_data() - Count PMA data
Unique Device Identifiers (UDI)
  • fetch_udi_device_data() - Get UDI device records
  • count_udi_device_data() - Count UDI data
Registration & Listing
  • fetch_registrationlisting_data() - Get registration/listing records
  • count_registrationlisting_data() - Count registration data
Device Recalls
  • fetch_device_recall_data() - Get device recall records
  • count_device_recall_data() - Count recall data
COVID-19 Serological Testing
  • fetch_covid19serology_data() - Get COVID-19 test evaluation records
  • count_covid19serology_data() - Count COVID-19 test data
Device Adverse Events
  • fetch_device_event_data() - Get adverse event records
  • count_device_event_data() - Count adverse event data

📖 Example Queries

Basic Fetching

# Get recent 510(k) approvals
fetch_510k_device_data(limit=10, sort="decision_date:desc")

# Get Class II devices
fetch_device_classification_data(search="device_class:2", limit=20)

# Get recent recalls
fetch_device_recall_data(sort="recall_initiation_date:desc", limit=15)

Advanced Searching

# Search by company
fetch_510k_device_data(search="applicant:medtronic", limit=25)

# Search by date range
fetch_pma_device_data(
    search="decision_date:[2020-01-01+TO+2023-12-31]",
    limit=50
)

# Search for specific device types
fetch_device_event_data(search="device.generic_name:pacemaker", limit=30)

Counting and Analytics

# Count 510(k) approvals by company
count_510k_device_data(count_field="applicant")

# Count devices by medical specialty
count_device_classification_data(count_field="medical_specialty_description")

# Count recalls by classification
count_device_recall_data(count_field="classification")

Complex Filtering

# Count cardiovascular PMA devices
count_pma_device_data(
    count_field="device_name",
    search="advisory_committee:cardiovascular"
)

# Get adverse events for a specific manufacturer
fetch_device_event_data(
    search="manufacturer_name:abbott",
    limit=100,
    sort="date_received:desc"
)

🏗️ Project Structure

fda_data_retriever/
├── main.py                          # Main MCP server entry point
├── fda_device_apis/                 # FDA API modules package
│   ├── __init__.py                  # Package initialization
│   ├── fda_510k.py                 # 510(k) clearance tools
│   ├── fda_classification.py        # Device classification tools
│   ├── fda_pma.py                  # Pre-market approval tools
│   ├── fda_udi.py                  # UDI tools
│   ├── fda_registrationlisting.py  # Registration & listing tools
│   ├── fda_recall.py               # Device recall tools
│   ├── fda_covid19serology.py      # COVID-19 testing tools
│   └── fda_event.py                # Adverse event tools
├── pyproject.toml                   # Project configuration
├── uv.lock                         # Dependencies lock file
└── README.md                       # This file

🔍 Search Syntax

The FDA API uses Lucene-style search syntax:

Date Ranges

decision_date:[2020-01-01+TO+2023-12-31]
recall_initiation_date:[2022-01-01+TO+*]

Exact Matches

applicant:"Medtronic Inc"
device_class:2

Wildcards

device_name:*catheter*
manufacturer:abbott*

Boolean Operations

applicant:medtronic+AND+device_class:2
device_name:stent+OR+device_name:catheter

🚦 Rate Limits & Pagination

  • Maximum limit per request: 1000 records
  • Default limit: 5 records
  • Pagination: Use skip parameter for pagination
  • No authentication required: FDA APIs are public

🐛 Troubleshooting

Common Issues

  1. Import Errors: Ensure you're using Python >=3.10
  2. Network Timeouts: FDA APIs can be slow; consider smaller batch sizes
  3. Search Syntax: Refer to FDA API documentation for complex queries

Debug Mode

# Run with verbose output
uv run main.py --verbose

📚 FDA API References

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the file for details.

🔗 Related Projects

📧 Support

For questions or issues:

  1. Check the FDA API documentation
  2. Open an issue in this repository
  3. Contact the maintainers

Note: This tool accesses public FDA data. Always verify critical information through official FDA channels for regulatory or compliance purposes.