# FDA MCP Server
An MCP (Model Context Protocol) server that provides FDA medical device verification capabilities for prior authorization workflows. Queries the FDA 510(k) database to verify device clearance status and make PA approval decisions.
## Features
- **Device Search**: Search FDA 510(k) database by K-number, device name, manufacturer, or product code
- **Fuzzy Matching**: Intelligent fuzzy search with confidence scoring when exact identifiers aren't available
- **PA Verification**: Analyze FDA search results and make prior authorization approval decisions
- **Confidence Scoring**: Each result includes confidence scores based on match quality
- **OpenShift Deployment**: Production-ready deployment to Red Hat OpenShift
## Tools
### `search_fda_device`
Unified FDA search tool that accepts any combination of identifiers or descriptive information.
**Parameters:**
- `device_identifiers` (optional): FDA identifiers (k_number, pma_number, product_code, udi)
- `device_description` (optional): Device info for fuzzy search (device_name, manufacturer)
- `search_options` (optional): Search options (fuzzy_search, max_results)
**Search Strategies (in priority order):**
1. K-number exact match (confidence: 1.0)
2. Product code + fuzzy name (confidence: 0.75-0.9)
3. Fuzzy name/manufacturer search (confidence: 0.5-0.6)
**Example:**
```python
# Exact K-number search
result = await client.call_tool("search_fda_device", {
"device_identifiers": {"k_number": "K223677"}
})
# Fuzzy search by device name
result = await client.call_tool("search_fda_device", {
"device_description": {
"device_name": "Lexie Lumen",
"manufacturer": "hearX"
},
"search_options": {"fuzzy_search": True}
})
# Search by product code (hearing aids)
result = await client.call_tool("search_fda_device", {
"device_identifiers": {"product_code": "QUH"}, # OTC hearing aids
"device_description": {"device_name": "hearing aid"}
})
```
### `verify_fda_approval`
Analyze FDA search results and make PA approval decision with structured reasoning.
**Parameters:**
- `fda_search_results`: Results from `search_fda_device` tool
- `pa_requirements` (optional): PA requirements (required_device_class, require_otc, require_cleared_or_approved)
**Returns:**
- Approval decision (approve/deny)
- Requirements check details
- Human-readable reasoning
- Action items for next steps
**Example:**
```python
# First search for the device
search_result = await client.call_tool("search_fda_device", {
"device_identifiers": {"k_number": "K223677"}
})
# Then verify for PA approval
verification = await client.call_tool("verify_fda_approval", {
"fda_search_results": search_result["data"]["results"],
"pa_requirements": {
"required_device_class": "2",
"require_otc": True,
"require_cleared_or_approved": True
}
})
```
## Quick Start
### Local Development
```bash
# Install dependencies
make install
# Run locally with STDIO transport
make run-local
# Test with cmcp
cmcp ".venv/bin/python -m src.main" tools/list
```
### Deploy to OpenShift
```bash
# One-command deployment
make deploy
# Or deploy to specific project
make deploy PROJECT=davinci-mcp
```
## Product Codes Reference
Common FDA product codes for hearing devices:
| Code | Description |
|------|-------------|
| QUH | OTC Self-Fitting Air-Conduction Hearing Aid |
| OSM | Prescription Hearing Aid |
| LYY | Cochlear Implant System |
## Response Schema
All tools return structured responses:
```json
{
"success": true,
"data": {
"search_strategy": "identifier",
"results": [...],
"result_count": 1
},
"warnings": [],
"confidence": 1.0,
"metadata": {
"execution_time_ms": 245,
"data_source": "FDA 510(k) Database",
"search_type": "k_number_exact"
}
}
```
## Environment Variables
- `MCP_TRANSPORT` - Transport type (stdio/http)
- `MCP_HTTP_HOST` - HTTP host (default: 0.0.0.0)
- `MCP_HTTP_PORT` - HTTP port (default: 8080)
- `MCP_HTTP_PATH` - HTTP endpoint path (default: /mcp/)
## Related Projects
- [pa-workflow-simple](https://github.com/rdwj/pa-workflow-simple) - Prior authorization workflow system that uses this MCP server
- [fhir-mcp](https://github.com/rdwj/fhir-mcp) - FHIR patient data MCP server
## License
MIT License - see [LICENSE](LICENSE) for details.