Medical Protocol helps builders create accurate medical apps. It gives your agent enhanced medical context, copies verified medical components straight into your project, and lets you audit the result — so you ship clinical features without medical hallucinations.
Install the harness
Run one command in any new or existing project, then restart your Claude Code session. The CLI installs three things: enhanced medical context, a component delivery tool, and a medical audit tool. Today we support Claude Code only.
npx medical-protocol installHow the harness works
Install the harness. Describe what you want to build. Ask for a medical audit when you're done.
Run npx medical-protocol install in any project, then restart Claude Code. The CLI sets up enhanced medical context, the component delivery tool, and the medical audit tool.
Tell the agent what to build. Instead of risking hallucination, the component delivery tool copies validated medical components directly into your project, and the enhanced context helps the agent connect everything together.
When you're done, ask the agent to run a medical audit. It uses agent-browser and an eval CLI to confirm the UI logic is clinically correct — so you don't have to read every formula yourself.
Activate the harness
You'll need Node.js 18+ and a Claude Code subscription. The full medical harness activates in about 3 minutes.
The medical harness adds verification layers to your AI coding agent. Claude Code is the fully supported provider; Codex CLI and Gemini CLI are also supported (experimental, skills only — no hooks or permission gates). The harness itself — all components, clinical logic, and verification tools — is free and open source. Claude Code
Pick the agent you already use. Each install command activates the same clinical harness in a layout that agent understands.
.claude/Full support: 14 skills, privacy hooks, permission settings, and the medprotocol verifier. Reads protocols and installs components automatically.
Run this command in your project directory
npx medical-protocol install
The CLI copies 14 skills, 4 privacy hooks, 9 context files, and the medprotocol CLI verifier into your project. The harness registers with Claude Code automatically (takes ~10 seconds).
Describe what you need in technical or clinical terms. The harness routes the agent to the relevant workflow, selects components, adapts them to your stack, and generates code referencing validated standards.
Verification gates run: tsc --noEmit, the medprotocol CLI (9 commands) with known inputs, cross-verification against generated code. Discrepancies are flagged before you review.
Your app opens at localhost:3000 with hot reload. All components are in your project directory: cross-verified clinical logic, ready to customize and review.
How the harness works
Featured component
6 vital parameters with validated ranges, FHIR R4 Bundle output, and LOINC codes. The component delivery tool copies it straight into your project — no hallucination, no manual install.
The calculation engine lives in medprotocol-core/lib/ with zero framework dependencies. Winter's formula, anion gap, SOFA scoring, DKA resolution, ASCVD risk, CHA₂DS₂-VASc, CKD-EPI eGFR, KDIGO staging, KFRE, ADA diabetes criteria, T1D staging, FIB-4. 1,444 unit tests across 41 suites back the calculation engine. When you ask for a medical audit, the harness runs agent-browser and the eval CLI to confirm the UI logic matches the standard.
The verifier behind the medical audit. 9 commands cover ABG, DKA, vitals, BMI, PaFi, water balance, cardiology, sepsis, and CKD. Ask for an audit and the harness cross-checks every calculation against the CLI before you sign off.
Primary disorder classification, compensation status, anion gap, delta ratio. Winter's formula, Henderson-Hasselbalch, and 5 respiratory compensation formulas.
ASCVD risk, HEART score, CHA₂DS₂-VASc scoring. Evidence-based thresholds, typed outputs.
Sepsis-3 SOFA scoring, 6-organ dysfunction, qSOFA screening, lactate clearance, hour-1 bundle compliance.
Hourly DKA parameter tracking with resolution criteria detection and configurable alert thresholds.
CKD-EPI 2021 eGFR, KDIGO staging, Tangri 4-variable KFRE, treatment eligibility (RASi, SGLT2i, finerenone), eGFR slope tracking. 563 test cases.
A1C, fasting plasma glucose, 2h-PG, random PG with ADA diagnostic criteria and confirmation logic.
T1D autoantibody staging, T1 vs T2 differentiation, T2D screening, gestational diabetes screening (one-step and two-step).
FIB-4 with age-adjusted thresholds, MASLD risk stratification with LSM/ELF, tiered treatment recommendations.
PaO2/FiO2 ratio with Berlin Definition ARDS classification (mild, moderate, severe).
WHO classification with 4 clinical categories. Imperial and metric with automatic conversion.
Intake/output tracking with insensible loss formula (weight × 12 mL), endogenous water generation, and net balance computation.
The harness's verification gate. Run medprotocol abg, medprotocol sepsis, etc. from any terminal. The agent cross-verifies calculations against the CLI — mismatches are flagged before reaching your codebase.
packages/medical-protocol/ — run npx medical-protocol install to activate the full medical harness in any project. One command, all constraints active.
Target specialties
Different specialties, different workflows. Describe yours. The agent adapts validated clinical components and your engineers focus on product logic, not medical math.
Trauma & Emergency
Vitals + fluid balance in one view. ABG interpretation during resuscitation with Winter's formula. PaFi ratio for instant Berlin Definition ARDS staging. One screen for the trauma bay: integrated, not isolated.
Surgery
Pre-op assessment with vitals, BMI for anesthesia risk, and key labs on a single screen. Post-op monitoring across the first 72 hours with color-coded alerts for the window when most complications present.
Internal Medicine
18 patients, one dashboard, zero paper lists. ABG interpretation that teaches, DKA and sepsis monitoring with resolution tracking, SOFA/qSOFA scoring with hour-1 bundle compliance, diabetes diagnosis with ADA criteria, and CKD progression monitoring.
General Practice
Clean vitals, BMI with WHO classification, and ASCVD risk assessment. A modern clinic interface on a laptop in minutes; no IT department required.
OB-GYN & Reproductive
Vital signs with maternal ranges, BMI for obstetric risk, fluid balance for high-risk deliveries, and cardiology risk for pre-eclampsia screening. From prenatal assessment to fertility clinic.
Privacy and trust
Doctors aren't afraid of AI replacing them; they're afraid of AI being wrong. Privacy hooks block outbound data commands at the agent level. Patient data stays on your machine — enforced by code, not policy.
PreToolUse hooks block git push, curl POST, scp, npm publish, and docker push. Enforced before any command runs at the agent level.
The agent generates code before any patient is involved. Patient data exists only when your app runs. Clinical data never touches the AI.
Every harness hook is a readable shell script, not black-box middleware. Audit them, extend them, add your own compliance rules.
The people behind the protocol
Building clinical software requires more than good code. It requires people who understand how decisions are actually made at the bedside.

Creator & Lead Engineer
AI-fluent full-stack engineer with over 5 years of experience in software engineering and 9 years as an internal medicine doctor. Background in clinical interface development for healthcare professionals, SaaS product engineering, frontend architecture, and AI tooling.

Nephrology Advisor
Nephrologist and Therapeutic Medical Advisor Associate Director with global experience in phase II–III clinical trials, including nephrology, immunology, and critical care.
Common questions
A medical harness for CLI coding agents. It helps builders create accurate medical apps by giving your agent enhanced medical context, shipping verified medical components directly into your project, and letting you audit the result.
Run the install command in any new or existing project, then restart your Claude Code session. The harness activates automatically. For now we only support Claude Code.
Three pieces: enhanced medical context loaded into your agent, a component delivery tool that copies verified medical components into your project, and a medical audit tool that checks the result.
Instead of risking hallucination when the agent tries to write a medical component from scratch, the harness copies pre-built, verified components directly into your project. The enhanced context then helps the agent wire everything together and adapt the components to whatever modifications you need.
Just ask for a medical audit. The harness runs agent-browser and an eval CLI tool to confirm the UI logic is clinically correct — so you don't have to read every formula yourself.
Current modules cover vital signs, ABG / blood gas analysis, sepsis, DKA, CKD and nephrology, cardiology, diabetes, endocrine, hepatology, BMI, water balance, and more. Build trauma dashboards, ward monitors, EHR screens, telemonitoring views — anything that needs trustworthy clinical math.
The clinical logic (formulas, validations, classifications) lives in pure TypeScript with zero framework dependencies. The medprotocol CLI works regardless of framework. Reference components are React-based, but the agent can extract and adapt the calculation logic for any frontend. The harness verifies correctness at the math layer, not the rendering layer.
This tool is designed to assist healthcare professionals and has not been certified or cleared as a medical device by the FDA, EMA, or any regulatory body. It is not intended for clinical diagnosis or as a substitute for professional medical judgment.