MediLinkAI
Clinical decision-support MCP server that lets AI agents reason over live FHIR patient data for medication review, appointment scheduling, and care gap identification.
README
Healthcare AI Superpower — MCP Server
Prompt Opinion · Agents Assemble Hackathon Clinical decision-support tools for any AI agent, powered by FHIR R4 and the Model Context Protocol.
What This Does
AI agents on the Prompt Opinion platform can call this MCP server to reason over live FHIR patient data without ever handling EHR credentials directly. The platform bridges the SMART on FHIR session into the server via the ai.promptopinion/fhir-context extension — the agent just asks a question, and this server handles the rest.
Five clinical tools, one endpoint:
| Tool | Clinical Use Case |
|---|---|
fhir_query |
Raw FHIR R4 resource retrieval (any resource type) |
medication_review |
Drug interactions · Beers Criteria · duplicate therapy · missing safety labs |
summarize_clinical_notes |
Structured extraction from FHIR DocumentReference notes |
schedule_appointment |
List, create, or cancel FHIR Appointment resources |
identify_care_gaps |
HEDIS · CMS · USPSTF quality gap identification |
Live Endpoints
| URL | |
|---|---|
| MCP Server | https://3a36e605-0c25-4400-ba89-a8f448f14c7b-00-3wj4nqft3ggq.sisko.replit.dev/api/mcp |
| Tools Listing | https://3a36e605-0c25-4400-ba89-a8f448f14c7b-00-3wj4nqft3ggq.sisko.replit.dev/api/mcp/tools |
| Health Check | https://3a36e605-0c25-4400-ba89-a8f448f14c7b-00-3wj4nqft3ggq.sisko.replit.dev/api/healthz |
| Demo Dashboard | https://3a36e605-0c25-4400-ba89-a8f448f14c7b-00-3wj4nqft3ggq.sisko.replit.dev/ |
Architecture
Prompt Opinion Platform
│
│ initialize → detects ai.promptopinion/fhir-context extension
│ tool/call → injects X-FHIR-Server-URL, X-FHIR-Access-Token, X-Patient-ID
▼
┌─────────────────────────────────────────┐
│ Express API Server │
│ POST /api/mcp │
│ │
│ ┌─────────────────────────────────┐ │
│ │ MCP Streamable HTTP Transport │ │
│ │ (JSON-RPC 2.0 · 2024-11-05) │ │
│ └────────────────┬────────────────┘ │
│ │ │
│ ┌────────────────▼────────────────┐ │
│ │ MCP Tool Router │ │
│ │ fhir_query │ │
│ │ medication_review │ │
│ │ summarize_clinical_notes │ │
│ │ schedule_appointment │ │
│ │ identify_care_gaps │ │
│ └────────────────┬────────────────┘ │
│ │ │
│ ┌────────────────▼────────────────┐ │
│ │ FHIR Client │ │
│ │ Real (Bearer token) ──► EHR │ │
│ │ Mock (no token) ──► Demo │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────┘
Adding to Prompt Opinion
- Go to Configuration → MCP Servers in your Prompt Opinion workspace.
- Paste the MCP Server URL and click Continue.
The platform sends an
initializerequest and reads the server's capabilities. - A FHIR Context toggle appears — enable it.
- Review and authorize the SMART scopes your tools need.
- Done. Every subsequent tool call will carry live FHIR credentials in the headers.
Prompt Opinion FHIR Extension
The server advertises support in every initialize response:
{
"capabilities": {
"extensions": {
"ai.promptopinion/fhir-context": {
"scopes": [
{ "name": "patient/Patient.rs", "required": true },
{ "name": "patient/MedicationRequest.rs", "required": false },
{ "name": "patient/Condition.rs", "required": false },
{ "name": "patient/Observation.rs", "required": false },
{ "name": "patient/DocumentReference.rs", "required": false },
{ "name": "patient/Appointment.crus", "required": false }
]
}
}
}
}
Once authorized, Prompt Opinion injects these headers on every tool call:
| Header | Description |
|---|---|
X-FHIR-Server-URL |
FHIR server base URL — always present |
X-FHIR-Access-Token |
OAuth2 bearer token — present when EHR requires auth |
X-Patient-ID |
Active patient's FHIR ID — absent means system-level context |
X-FHIR-Refresh-Token |
Refresh token — only if offline_access scope granted |
X-FHIR-Refresh-Url |
Token refresh endpoint — only if offline_access scope granted |
When FHIR headers are absent the server falls back to built-in demo data, so tools always return a useful response.
Tool Reference
fhir_query
Raw FHIR R4 resource query for a patient.
{
"resourceType": "MedicationRequest",
"patientId": "patient-001",
"params": { "status": "active" }
}
Supported: Patient · MedicationRequest · Condition · Observation · DocumentReference · Appointment
medication_review
Comprehensive medication safety analysis.
- Drug-drug interaction detection (severity: HIGH / MODERATE / LOW)
- High-risk medications via Beers Criteria
- Duplicate therapeutic class detection
- Missing safety lab flags (e.g. INR monitoring for Warfarin)
- Prioritized clinical recommendations
{
"patientId": "patient-001",
"includeInactive": false
}
Example finding: Mary Johnson — HIGH Warfarin + Aspirin → increased bleeding risk, monitor INR closely.
summarize_clinical_notes
Retrieve and structure FHIR DocumentReference clinical notes.
Extracts: vitals · labs · active diagnoses · current medications · care plan · follow-up items
{
"patientId": "patient-002",
"noteType": "progress",
"maxNotes": 5
}
schedule_appointment
Manage FHIR Appointment resources.
{
"action": "create",
"patientId": "patient-001",
"newAppointment": {
"startDateTime": "2026-06-01T10:00:00",
"durationMinutes": 30,
"serviceType": "Primary Care",
"appointmentType": "FOLLOWUP",
"providerName": "Dr. Sarah Mitchell",
"reason": "Diabetes management follow-up"
}
}
Actions: list · create · cancel
identify_care_gaps
Open quality gap identification aligned with HEDIS, CMS, and USPSTF guidelines.
{
"patientId": "patient-001",
"categories": ["all"]
}
Categories: preventive · chronic_disease · medications · behavioral_health · all
Example output (Mary Johnson): 11 open gaps including overdue HbA1c, missing annual diabetic eye exam, no flu vaccine on record, Warfarin without recent INR documentation.
Demo Patients
Built-in mock data is available at all times without a FHIR server.
| Patient ID | Name | Profile | Clinical Highlight |
|---|---|---|---|
patient-001 |
Mary Johnson | 68F · DM2, HTN, AFib | HIGH Warfarin + Aspirin interaction · 11 care gaps |
patient-002 |
Robert Chen | 52M · DM2, HTN | HbA1c 9.2% (poorly controlled) · overdue labs |
patient-003 |
Sandra Williams | 40F · Depression, Chronic Pain | HIGH Sertraline + Tramadol serotonin syndrome risk |
Quick Test (curl)
# 1. Verify the server is up
curl https://<domain>/api/healthz
# 2. Initialize and confirm the Prompt Opinion extension is declared
curl -X POST https://<domain>/api/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0", "id": 1, "method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": { "name": "test", "version": "1.0" }
}
}'
# 3. Run the medication review tool (uses mock data — no FHIR token needed)
curl -X POST https://<domain>/api/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Patient-ID: patient-003" \
-d '{
"jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": {
"name": "medication_review",
"arguments": { "patientId": "patient-003" }
}
}'
Project Structure
artifacts/
├── api-server/ # MCP server (Node 24 · Express 5 · esbuild)
│ └── src/
│ ├── mcp/
│ │ ├── server.ts # Factory + Prompt Opinion extension declaration
│ │ ├── fhir/
│ │ │ ├── client.ts # FHIR HTTP client with mock fallback
│ │ │ └── mock-data.ts # Realistic FHIR R4 demo data
│ │ └── tools/
│ │ ├── fhir-query.ts
│ │ ├── medication-review.ts
│ │ ├── clinical-notes.ts
│ │ ├── appointments.ts
│ │ └── care-gaps.ts
│ └── routes/
│ ├── mcp.ts # Streamable HTTP transport + FHIR header extraction
│ └── health.ts
│
└── healthcare-demo/ # Interactive demo dashboard (React 19 · Vite 7)
└── src/
├── pages/Dashboard.tsx # Patient selector + live tool runner
├── lib/mcp-client.ts # MCP JSON-RPC client
├── App.tsx
└── index.css # Clinical teal/navy theme
Local Development
Requirements: Node.js 24 · pnpm 10+
# Install all workspace dependencies
pnpm install
# Run the MCP API server (proxied to /api by the Replit reverse proxy)
pnpm --filter @workspace/api-server run dev
# Run the demo dashboard (proxied to /)
pnpm --filter @workspace/healthcare-demo run dev
# Full TypeScript check across all packages
pnpm run typecheck
Stack
| Layer | Technology |
|---|---|
| Runtime | Node.js 24 |
| Language | TypeScript 5.9 |
| MCP SDK | @modelcontextprotocol/sdk 1.29 |
| Transport | Streamable HTTP (MCP 2024-11-05) |
| API framework | Express 5 |
| Build | esbuild |
| Frontend | React 19 · Vite 7 · Tailwind CSS 4 |
| Monorepo | pnpm workspaces |
Hackathon
Built for the Prompt Opinion Agents Assemble Challenge — a $25,000 prize pool competition focused on MCP, A2A, and FHIR interoperability in healthcare AI.
- Platform: app.promptopinion.ai
- Docs: docs.promptopinion.ai
- Challenge: Agents Assemble
- Discord: discord.gg/cCBxKpdS7j
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。