AI-powered clinical decision support for the Prompt Opinion platform
Built for the Agents Assemble: Healthcare AI Endgame hackathon.
ClinicalMind exposes 4 specialized healthcare AI tools via the Model Context Protocol (MCP), designed to reduce medical errors and support clinical decision-making:
| Tool | Description |
|---|---|
check_medication_conflicts |
Detects drug-drug interactions from patient med list (FHIR or manual) |
analyze_care_gaps |
Identifies missing/overdue preventive care vs clinical guidelines |
generate_clinical_summary |
Produces structured SBAR handoff note from FHIR patient data |
interpret_lab_trends |
Flags abnormal lab values and worsening trends with clinical context |
All tools integrate with the Prompt Opinion platform via the SHARP FHIR context extension, automatically receiving patient ID, FHIR server URL, and auth token.
git clone https://github.com/YOUR_USERNAME/clinicalmind-mcp
cd clinicalmind-mcp
pip install -r requirements.txt
cp .env.example .env
python server.pyServer starts at http://localhost:8000
python tests/test_tools.pyExpected output: all 5 test suites pass with synthetic demo patient data.
- Push to GitHub
- Go to railway.app → New Project → Deploy from GitHub
- Set environment variables from
.env.example - Railway auto-detects the Dockerfile and deploys
- Copy the public URL (e.g.
https://clinicalmind-mcp.railway.app)
- Go to
Configuration → MCP Serversin your Prompt Opinion workspace - Click
Add MCP Server - Enter your deployed URL:
https://YOUR_URL/mcp - Click
Continue— the platform sends aninitializerequest - The FHIR extension is detected automatically
- Enable
Trust FHIR context— this allows FHIR headers to be forwarded - Save — your tools now appear in the Prompt Opinion marketplace
When a clinician opens a patient record in Prompt Opinion and triggers a tool, the platform automatically injects these HTTP headers into every MCP call:
X-FHIR-Server-URL: https://your-ehr.fhir.com/baseR4
X-FHIR-Access-Token: Bearer eyJ...
X-Patient-ID: patient-123
ClinicalMind reads these headers and fetches real-time patient data from the FHIR server — no manual data entry required.
For testing without a connected EHR, use the public HAPI FHIR server:
https://hapi.fhir.org/baseR4
- All testing uses synthetic/de-identified data only
- No real Protected Health Information (PHI) is processed or stored
- The server does not persist any patient data between requests
- FHIR tokens are passed through in-memory only and never logged
- Python 3.11
- FastMCP — MCP server framework
- httpx — async FHIR client
- HAPI FHIR R4 — public test FHIR server
- Deployed on Railway
| Criterion | How ClinicalMind addresses it |
|---|---|
| AI Factor | LLM-level reasoning over FHIR graph data — impossible with rule-based engines alone |
| Potential Impact | Medication errors cause 7,000+ deaths/year in the US; care gaps cost $55B annually |
| Feasibility | FHIR-native, HIPAA-safe synthetic data, production-deployable in under 10 minutes |