Skip to main content

drug-interaction-mcp

CI PyPI Python License: MIT GitHub stars

An MCP server that lets AI assistants check drug interactions against a clinically sourced database of 150+ interactions.

Why?

AI assistants frequently give incorrect or incomplete drug interaction advice. When someone asks "Can I take ibuprofen with warfarin?", the answer matters — it could prevent a serious bleeding event.

This MCP server gives AI assistants (Claude, ChatGPT, etc.) access to a curated, evidence-based drug interaction database sourced from FDA drug labels, NIH DailyMed, and established medical literature. Instead of guessing, the AI can query real data.

Quick Start

Install

pip install drug-interaction-mcp

Or run directly with uvx:

uvx drug-interaction-mcp

Configure in Claude Desktop

Add to your Claude Desktop configuration file (claude_desktop_config.json):

{
  "mcpServers": {
    "drug-interactions": {
      "command": "uvx",
      "args": ["drug-interaction-mcp"]
    }
  }
}

That's it. Claude will now have access to drug interaction checking tools.

Tools

check_interaction

Check if there is a known interaction between two drugs.

check_interaction(drug_a="warfarin", drug_b="aspirin")

Returns severity, clinical description, mechanism of action, recommendation, and source.

Example response:

{
  "drug_a": "warfarin",
  "drug_b": "aspirin",
  "found": true,
  "severity": "danger",
  "description": "Significantly increased risk of major bleeding events...",
  "mechanism": "Aspirin inhibits platelet aggregation via COX-1 while warfarin inhibits vitamin K-dependent clotting factors...",
  "recommendation": "Avoid combination unless specifically directed by a physician...",
  "source": "FDA Drug Label — Warfarin"
}

check_multiple

Check all pairwise interactions among a list of drugs. Useful when reviewing a patient's full medication list.

check_multiple(drugs=["warfarin", "aspirin", "lisinopril", "metformin"])

Returns all found interactions sorted by severity (danger first), with a summary of counts.

search_drug

Fuzzy search for drug names in the database. Handles partial names, typos, and brand/generic name lookups.

search_drug(query="prozac")
search_drug(query="warfa")

get_drug_info

Get all known interactions for a specific drug.

get_drug_info(drug_name="warfarin")

Returns the drug name, total interaction count, and full details on every known interaction.

list_interactions

List all interactions in the database, optionally filtered by severity.

list_interactions(severity="danger")
list_interactions(severity="all")

Severity levels: "danger", "warning", "caution", "all".

Database Coverage

The embedded database includes 150+ clinically documented interactions covering:

  • Blood thinners — warfarin, apixaban, rivaroxaban, clopidogrel + various interacting drugs
  • Cardiac drugs — digoxin, amiodarone, beta blockers, calcium channel blockers, statins, nitrates
  • Psychiatric drugs — SSRIs, SNRIs, MAOIs, antipsychotics, benzodiazepines, mood stabilizers
  • Antibiotics — fluoroquinolones, macrolides, tetracyclines, metronidazole, rifampin, linezolid
  • Diabetes drugs — metformin, insulin, sulfonylureas, SGLT2 inhibitors
  • Pain medications — opioids, NSAIDs, acetaminophen, tramadol
  • Supplements — St. John's Wort, ginkgo, ginseng, fish oil, iron, calcium, vitamin K/D/E, CoQ10, turmeric
  • OTC drugs — antacids, PPIs, diphenhydramine, dextromethorphan

Each interaction includes:

  • Drug name pairs (generic + brand names)
  • Severity level (danger / warning / caution)
  • Clinical description
  • Mechanism of action
  • Patient-facing recommendation
  • Evidence source (FDA, NIH, etc.)

Data Sources

Disclaimer

This tool is for informational and educational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider (physician, pharmacist) before making medication decisions. The database may not include all known interactions, and individual patient factors affect interaction risk.

Development

# Clone the repository
git clone https://github.com/pillright/drug-interaction-mcp.git
cd drug-interaction-mcp

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest -v

# Run the server locally
python -m drug_interaction_mcp.server

Contributing

Contributions are welcome. To add new interactions:

  1. Fork the repository
  2. Add interactions to src/drug_interaction_mcp/interactions.py
  3. Ensure each interaction has: drug names, severity, description, mechanism, recommendation, and a credible source
  4. Add tests for new interactions
  5. Open a pull request

All interaction data must be sourced from FDA drug labels, NIH, or peer-reviewed medical literature.

License

MIT

Metadata

Release files for drug-interaction-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drug-interaction-mcp 0.1.0
File Size Uploaded Provenance
drug_interaction_mcp-0.1.0.tar.gz 32.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for drug-interaction-mcp 0.1.0
File Interpreter ABI Platform
drug_interaction_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.0 kB

Release files / drug_interaction_mcp-0.1.0.tar.gz

Download URL drug_interaction_mcp-0.1.0.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
525544e1a698c5f24960a793e18c31e1657d4e5c17cedbd4b637f0749892d6a1
BLAKE2b-256 checksum
How to use checksums
7d8f1dfce373f771557c7365d7305a79cc4e482e3d1ebdff53bb89b9b1ac8150
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / drug_interaction_mcp-0.1.0-py3-none-any.whl

Download URL drug_interaction_mcp-0.1.0-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
890c3b362b60af6cdcf79dbd43e7c325dcfc144cd1c41be91cee2a9f77fd706e
BLAKE2b-256 checksum
How to use checksums
c817bb2628e623784be92e0c608af5ab3f3f9a78d2445f8e39e3e2b60ce3dcea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for drug-interaction-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page