fda-warning-letters-mcp
v3.0.0
Published
MCP server for FDA Medical Device Warning Letters - search, analyze, and map deficiencies to QMSR/ISO 13485
Maintainers
Readme
FDA Warning Letters MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with access to FDA medical device warning letters, deficiency analysis, and QMSR/ISO 13485 clause mapping.
Features
🔍 Search & Discovery
- Search warning letters by company name, device type, or keywords
- Filter by device class (I, II, III) and year
- Get detailed deficiency lists for any letter
📊 Analytics & Trends
- View warning letter trends over time
- See most common deficiency categories
- Device class distribution analysis
🔗 QMSR/ISO Mapping
- Automatically map deficiencies to QMSR (21 CFR 820) sections
- ISO 13485:2016 clause cross-references
- ISO 14971 risk management connections
📈 Comprehensive Dataset + Live Data
- Seed data: 224 real FDA warning letters (2021-2026) with 1,148 deficiencies, sourced from the Apr 17 2026 corrected snapshot at virtualbackroom.ai/methodology
- Live scraping from FDA.gov with caching for incremental updates
- Force refresh capability
Installation
git clone https://github.com/KoalaTai/fda-warning-letters-mcp.git
cd fda-warning-letters-mcp
npm install
npm run buildUsage with Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"fda-warning-letters": {
"command": "node",
"args": ["/path/to/fda-warning-letters-mcp/dist/index.js"]
}
}
}Then restart Claude Desktop.
Available Tools
| Tool | Description |
|------|-------------|
| search_warning_letters | Search letters by query, device class, year |
| get_letter_details | Get full details for a specific company |
| map_to_qmsr | Map any deficiency to QMSR/ISO clauses |
| get_qmsr_mapping | Get ISO 13485 equivalent for a CFR section |
| analyze_trends | Get trends for 30d, 90d, 1y, or all time |
| get_statistics | NEW Comprehensive database stats (severity, device class, year breakdown) |
| list_companies | NEW List all companies with warning letters |
| get_recent_letters | NEW Get most recent warning letters |
| explain_cfr_section | NEW Detailed CFR section explanations with occurrence stats |
| refresh_data | Force refresh from FDA.gov |
Available Resources
| URI | Description |
|-----|-------------|
| fda://warning-letters/all | All cached warning letters |
| fda://warning-letters/recent | Letters from last 30 days |
| fda://deficiencies/summary | Aggregated deficiency analysis |
| fda://qmsr/reference | Complete 21 CFR 820 to ISO 13485 mapping |
Example Queries
Once connected to Claude, you can ask:
- "Search for FDA warning letters related to CAPA failures"
- "What are the most common deficiencies in Class III device warning letters?"
- "Map this deficiency to QMSR: Failure to establish design control procedures"
- "Show me warning letter trends for the past year"
- "Find warning letters for companies making surgical instruments"
QMSR Clause Mapping
The server maps deficiencies to these regulatory frameworks:
| Category | QMSR Section | ISO 13485 Clause | |----------|--------------|------------------| | Design Controls | 820.30 | 7.3 | | CAPA | 820.100 | 8.5.2 | | Complaints | 820.198 | 8.2.2 | | Production | 820.70 | 7.5 | | Documents | 820.40/180 | 4.2 | | Purchasing | 820.50 | 7.4 | | Risk Management | — | ISO 14971 |
Scope
FDA Medical Device Warning Letters corpus - covers 21 CFR 820 (QMSR), 21 CFR 807 (Registration), 21 CFR 809 (IVD), FD&C Act adulteration/misbranding, PMA (21 CFR 814), IDE (21 CFR 812), MDR (21 CFR 803). QMSR/ISO 13485 mapping applied where applicable.
Data Sources
- Curated Seed Data: 224 real FDA warning letters (2021-2026) with 1,148 deficiencies
- Source Snapshot: Apr 17 2026 corrected snapshot from virtualbackroom.ai/methodology
- Regulatory Classification: Strict non-overlapping categorization - CAPA = 820.100 only; NCR = 820.90; Complaint Files = 820.198; Design Controls = 820.30
- Coverage: 705 deficiencies with clean short-form CFR references + 443 with full verbose citations (FD&C Act, U.S.C., statutory refs)
- Device Classes: Class I, II, III, and 142 with unknown classification
- Live Updates: FDA.gov scraper for post-snapshot incremental updates
Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Type check
npm run typecheck
# Run tests
npm testTesting the Server
# Test MCP handshake
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | node dist/index.js
# List tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.jsProject Structure
fda-warning-letters-mcp/
├── src/
│ ├── index.ts # Main MCP server
│ ├── types.ts # TypeScript type definitions
│ ├── data.ts # Warning letter data & scraping
│ └── qmsr-mapping.ts # 21 CFR 820 to ISO 13485 mappings
├── dist/ # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.mdContributing
Pull requests welcome! Areas for improvement:
- [ ] Additional warning letter sources
- [ ] More granular QMSR clause mapping
- [ ] Historical trend analysis
- [ ] Full letter content parsing
- [ ] Database persistence
Changelog
v3.0.0 (Apr 2026)
- Dataset expanded: 13 seed letters -> 224 letters (2021-2026) with 1,148 deficiencies
- Regulatory classification corrected: CAPA = 820.100 only; NCR = 820.90; Complaint Files = 820.198 (strict, non-overlapping)
- New field
cfrReferenceFull: Preserves verbose citations (FD&C Act, U.S.C., statutory references) for all deficiencies cfrReferencenow nullable: Null for non-CFR citations (e.g., FD&C Act violations); clean short form when availabledeviceClassnow nullable: FDA metadata not always available (142 letters with unknown classification)issueDate,subject,letterNumber,letterUrlnow nullable: Defensive typing for incomplete FDA metadata- 4 AI-inferred citations removed: Prior drafts included
(implied)citations; removed for rigor - New statistics fields:
shortFormCoverage(% of deficiencies with clean CFR ref),totalUniqueCitations - Non-820 CFR explanations:
explain_cfr_sectionnow handles 807.x, 809.x, 814.x, 812.x, 803.x, 806.x - Source: Apr 17 2026 corrected snapshot from virtualbackroom.ai/methodology
v2.0.2 (Mar 2026)
- Unlocked maxLetters for full scraping (-1 flag)
- Configurable maxLetters in refresh_data tool
v2.0.0 (Feb 2026)
- Removed fabricated data, added working FDA.gov scraper
- 13 verified high-value seed letters
- QMSR/ISO 13485 auto-mapping
Related Projects
- VirtualBackroom.ai - AI-powered regulatory compliance platform
- QMS.Coach - Quality management consulting
- Model Context Protocol - The MCP specification
- OpenFDA - FDA open data APIs
License
MIT - KoalaT.ai
Built for the medical device quality community.
