# openfda-mcp-server

An MCP server that lets your agent query FDA records on drugs and devices through openFDA, including recalls and adverse events. Runs over STDIO or Streamable HTTP.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 5433 installs · ★ 5 repo stars
- Author: cyanheads
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cyanheads/openfda-mcp-server
- Updated: 2026-10-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/openfda-mcp-server

## What it does

The server calls the public openFDA API and returns FDA records on drugs, food, medical devices and recalls. You can search adverse event reports and drug shortages, look at Drugs@FDA approvals (NDA and ANDA), check device clearances under 510(k) and PMA, and find a product by its NDC code.

For one drug name, `openfda_drug_profile` pulls the label, adverse events, recalls, approval and shortage in a single call. If a sub-query fails on the FDA side, that section is listed in `degraded[]`, so treat it as unknown rather than empty. `openfda_count_values` tallies the values of any field, and `openfda_describe_fields` shows what an endpoint can be searched by.

Veterinary reports mask brand and manufacturer names as `MSK`, so search them by active ingredient. Date sorting depends on the category, and a field from a different category returns `query_error`. Search tools return up to 1000 records per page. The npx config passes `OPENFDA_API_KEY`.

## Requirements
- Remote server: `https://openfda-mcp-server--cyanheads.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http openfda-mcp-server https://openfda-mcp-server--cyanheads.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add openfda-mcp-server --url https://openfda-mcp-server--cyanheads.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "openfda-mcp-server": {
            "url": "https://openfda-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "openfda-mcp-server": {
            "type": "http",
            "url": "https://openfda-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http openfda-mcp-server https://openfda-mcp-server--cyanheads.run.tools
```

## When to use it
- get a recall, approval and shortage summary from one drug name
- search adverse event reports for a drug, food or device
- check whether a medical device has a 510(k) or PMA clearance
- look up a drug by NDC code
- tally how often each value of a field appears in FDA data

## Example prompts
- Use openfda-mcp-server to build an `openfda_drug_profile` for ibuprofen with label, adverse events and recalls.
- Call `openfda_search_drug_shortages` and list drugs with status `Current`.
- Check `openfda_search_device_clearances` for a 510(k) clearance on this device.

## Similar
- [openfda-database](https://affpapa.org/en/nevibecode/skills/openfda-database.md) — skill · 2400 installs
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/fhirfly-io-mcp-server.md) — MCP server
- [Panko Alerts — Food Safety Data](https://affpapa.org/en/nevibecode/mcp/panko-alerts-food-safety-data.md) — MCP server · 1918 installs
- [Pharmaceutical Regulatory Intelligence](https://affpapa.org/en/nevibecode/mcp/pharmaceutical-regulatory-intelligence.md) — MCP server · 371 installs
- [Chemical Safety Intelligence](https://affpapa.org/en/nevibecode/mcp/chemical-safety-intelligence.md) — MCP server · 122 installs
- [tooluniverse-clinical-data-integration](https://affpapa.org/en/nevibecode/skills/tooluniverse-clinical-data-integration.md) — skill · 242 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
