npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

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 build

Usage 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 test

Testing 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.js

Project 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.md

Contributing

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
  • cfrReference now nullable: Null for non-CFR citations (e.g., FD&C Act violations); clean short form when available
  • deviceClass now nullable: FDA metadata not always available (142 letters with unknown classification)
  • issueDate, subject, letterNumber, letterUrl now 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_section now 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

License

MIT - KoalaT.ai


Built for the medical device quality community.