H
Healthcare MCP
by @Ewelkaka
Healthcare MCP Server for Prompt Opinion - Agents Assemble Challenge
Created 5/2/2026
Updated about 21 hours ago
README
Repository documentation and setup instructions
Healthcare MCP Server
MCP (Model Context Protocol) server for healthcare data access via FHIR API. Built for the Prompt Opinion Agents Assemble Challenge.
Features
- Patient Summary - Get comprehensive patient overview (demographics, conditions, medications)
- Medications - List active medication requests with dosage instructions
- Lab Results - Retrieve recent laboratory observations
- Conditions - Browse patient conditions with clinical status
Standards
- FHIR R4 - HL7 Fast Healthcare Interoperability Resources
- SHARP-on-MCP - Standardized Healthcare Agent Remote Protocol
- MCP - Model Context Protocol by Anthropic
FHIR Context Support
Implements ai.promptopinion/fhir-context extension:
X-FHIR-Server-URLheader - FHIR server endpointX-FHIR-Access-Tokenheader - SMART on FHIR access tokenX-Patient-IDheader - Current patient identifier
Required scopes:
patient/Patient.rs(required)patient/Condition.rspatient/MedicationRequest.rspatient/Observation.rs
Installation
bun install
Build
# Build stdio server (default)
bun build src/index.ts --outdir dist --target bun
# Build HTTP server (Streamable HTTP)
bun build src/http-server.ts --outdir dist --target bun
Usage
Option 1: Stdio Server (Local)
bun dist/index.js
Test with:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | bun dist/index.js
Option 2: HTTP Server (Remote / Prompt Opinion)
TRANSPORT=http PORT=8080 bun dist/server.js
Server will be available at http://your-host:8080/mcp
Deployment
Deploy to Render (Recommended - Free Tier)
- Push code to GitHub/GitLab
- Create new Web Service on Render.com
- Connect repository:
yourname/healthcare-mcp - Settings:
- Runtime: Docker
- Environment Variables:
TRANSPORT=httpPORT=8080
- Deploy - server will be available at
https://your-app.onrender.com/mcp
Or use the render.yaml file for Infrastructure as Code.
Deploy to Fly.io
# Install flyctl: https://fly.io/docs/hands-on/install-flyctl/
fly launch --dockerfile Dockerfile
fly deploy
Deploy to Railway
# Install Railway CLI: https://docs.railway.app/develop/cli
railway login
railway init
railway up
With Prompt Opinion
- Deploy the HTTP server to a public URL (e.g., Render, Fly.io, Railway)
- Add MCP server in Prompt Opinion:
Configuration -> MCP Servers - Enter your server URL:
https://your-server.com/mcp - Enable FHIR context extension when prompted
- Authorize requested scopes
Test Your Deployment
# Test if server is running
curl -X POST https://your-server.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
Tools
| Tool | Description |
|------|-------------|
| get_patient_summary | Complete patient overview |
| get_medications | Active medications list |
| get_lab_results | Recent lab results |
| get_conditions | Patient conditions |
Example FHIR Server
For testing, you can use:
Tech Stack
- TypeScript
- Bun runtime
- @modelcontextprotocol/sdk
- Zod validation
Project Structure
healthcare-mcp/
├── src/
│ ├── index.ts # Stdio server (local)
│ ├── http-server.ts # HTTP server (remote)
│ ├── fhir-context.ts # FHIR context extraction
│ └── tools/
│ └── healthcare.ts # MCP tool implementations
├── dist/ # Build output
├── package.json
└── tsconfig.json
Testing with MCP Inspector
npx @modelcontextprotocol/inspector bun dist/index.js
License
MIT
Quick Setup
Installation guide for this server
Installation Command (package not published)
git clone https://github.com/Ewelkaka/healthcare-mcp
Manual Installation: Please check the README for detailed setup instructions and any additional dependencies required.
Cursor configuration (mcp.json)
{
"mcpServers": {
"ewelkaka-healthcare-mcp": {
"command": "git",
"args": [
"clone",
"https://github.com/Ewelkaka/healthcare-mcp"
]
}
}
}