Inspiration

Medication errors are one of the leading causes of preventable harm in healthcare. Clinicians often lack quick, reliable access to drug safety data at the point of care. We built MedSafe to solve this — putting FDA-verified medication safety intelligence directly into the hands of any healthcare AI agent.

What it does

MedSafe is an MCP server that exposes three powerful healthcare tools:

  • check_drug_interactions — Queries the FDA drug label database to surface boxed warnings, contraindications, and known drug interaction data for any list of medications
  • get_drug_recalls — Searches the FDA enforcement database for active drug recalls by product name, returning classification, reason, and status
  • lookup_adverse_events — Queries the FDA FAERS (adverse event reporting system) database to return the most commonly reported adverse reactions for any medication

All three tools accept optional SHARP context parameters (patient_id, fhir_token), making them fully compatible with PromptOpinion's FHIR context propagation standard.

How we built it

MedSafe is built on Node.js using the @modelcontextprotocol/sdk package. It implements the Streamable HTTP transport for compatibility with the Prompt Opinion platform. The server declares the ai.promptopinion/fhir-context extension in its capabilities, enabling FHIR-aware agents to pass patient context through the full call chain.

All data comes from the free OpenFDA API (api.fda.gov) — no API keys required, making this tool accessible to any developer or organization.

The server is deployed on Railway and published to the Prompt Opinion Marketplace.

Challenges we ran into

Implementing the SHARP/FHIR context extension required careful reading of the Prompt Opinion MCP extension specification to correctly declare capabilities in the server's initialize response. Getting the Streamable HTTP transport working correctly with Railway's infrastructure also required iteration.

Accomplishments that we're proud of

  • Fully FHIR context-compatible MCP server live on the Prompt Opinion Marketplace
  • Three real, working tools backed by live FDA data
  • Zero cost to run — uses only free APIs and free hosting tier
  • Standards-compliant: MCP + SHARP extension + Streamable HTTP ## What we learned Building on MCP standards makes healthcare AI tools genuinely composable. Any agent on the Prompt Opinion platform can now pick up MedSafe's tools without any custom integration work — that's the real power of the ecosystem.

What's next for MedSafe MCP Server

  • Add FHIR patient medication list integration to automatically check a patient's active medications
  • Expand to drug dosing guidelines and formulary lookup
  • Add natural language summaries of interaction risks for non-clinical users

Built With

  • mcp-sdk
  • node.js
  • openfda-api
  • opinion
  • prompt
  • railway
Share this project:

Updates