Skip to content

Open reference implementation · MIT License · Community project

The guardrail layer between AI agents and clinical data

FHIR standardised health data. MCP standardised how AI connects to tools. Nobody standardised the guardrails in between — so we built a shared, open reference for that layer. See it working in CareAgents: sign in with your face, connect your records, and spin up a health agent that reads them, with redaction, audit, and human sign-off enforced server-side.

Building on it? It is MIT-licensed — use it, fork it, send a PR.

0
MCP tools
0
FHIR resource types
0
Tests passing
0
Guardrail layers
How it works

Every request passes through six layers

When an AI agent reaches clinical data through HealthClaw, each request is validated, redacted, authorised, and recorded before anything touches the FHIR server.

01
PHI Redacted

Names, addresses and dates of birth stripped before the agent sees data.

02
$validate Gate

Structural validation before any write proposal.

03
Permission Eval

R6 Permission $evaluate, denying by default.

04
HMAC Step-up

Signed token with a 128-bit nonce and a five-minute TTL.

05
Human Gate

Clinical writes stay blocked until a person confirms.

06
Audit Trail

An immutable, append-only record of every action.

PHI redaction

The agent never sees raw patient data

Applied on every read path: direct reads, search results, upstream proxy responses, and context envelopes. Agents work with de-identified data by default.

Stored in FHIR server
name Maria Elena Rivera
mrn MRN-2026-4471
phone 617-555-0198
address 123 Clinical Ave, Boston MA 02101
dob 1985-03-15
Delivered to the AI agent
name M. E. Rivera
mrn ***4471
phone [Redacted]
address Boston, MA
dob 1985
See it in action

Watch HealthClaw guard a live agent

A three-minute showcase built for the PromptOpinion Agents Assemble Challenge, plus a five-minute deep dive for engineers who want the architecture story.

Three-minute demo · Devpost submission
Agents Assemble Challenge showcase

An AI agent calls HealthClaw FHIR tools; you see PHI redaction, audit emission, and the synthetic-data disclaimer fire in real time.

Five-minute deep dive
Architecture and SHARP-on-MCP walkthrough

How HealthClaw forwards SMART-on-FHIR tokens via SHARP headers, applies the guardrail stack, and stays compatible with any EHR, with the code paths called out.

Where to use it

Pick your chat surface. HealthClaw is the same underneath.

HealthClaw is the data and guardrail layer. Three gateways are wired in today; all three call the same MCP server, get the same redacted responses, and emit the same audit trail. Compare them on the wiki.

Need raw MCP — Claude Desktop, MCP Inspector, or your own client? Point it at https://mcp-demo-production-ee2c.up.railway.app/mcp. No credential needed, and it is pinned server-side to the synthetic desktop-demo tenant, so it only ever serves fake data.

Compiled truth

See what your record says now, and why it says that.

Every other health tool shows you data. HealthClaw shows you the trail. One FHIR operation, one MCP tool, one review surface — built on the primitive every PHR is missing: current state plus append-only evidence.

One primitive
GET /$compiled-truth

Returns a FHIR Parameters bundle: the redacted current resource, its curation state, quality score, and the full Provenance timeline, newest first. Nothing hidden.

One MCP tool
fhir_compiled_truth

Agents call this before making resource-specific claims. Responses carry _meta.ui.resourceUri, an embeddable review surface, instead of a wall of chat-text fine print.

One review surface
MCP App · native HTML

The same evidence rendered for a person: what changed, who proposed it, what you approved, and when. Backed by R6 Provenance.

# agent reads the compiled truth before answering
curl -H "X-Tenant-Id: your-tenant" \
     https://healthclaw.io/r6/fhir/Condition/<id>/$compiled-truth

# or via MCP from Claude Desktop
> fhir_compiled_truth(resource_type="Condition", resource_id="<id>")
Built for

Three paths, one guardrail stack

Whether you are building an AI health agent, managing your own health data, or evaluating compliance infrastructure, HealthClaw meets you where you are.

Claude Code plugin

Install HealthClaw skills into Claude Code in one line

The healthclaw-marketplace hosts two plugins that ship as auto-discoverable Claude Code skills. Add the marketplace once, install either plugin, and Claude invokes the right skill whenever your prompt matches its triggers — no manual tool wiring.

// add the marketplace (once)
$ claude plugin marketplace add aks129/HealthClawGuardrails

// install the guardrail plugin (FHIR + MCP + Curatr + Fasten Connect)
$ claude plugin install healthclaw-guardrails@healthclaw-marketplace

// or skip the install — hosted consumer app
$ open https://careagents.cloud
Plugin
healthclaw-guardrails

FHIR agent guardrails and EHR integration.

  • fhir-r6-guardrails — 29 MCP tools, PHI redaction, step-up auth, audit
  • curatr — data-quality evaluation and patient-approved fixes
  • fasten-connect — EHR and TEFCA ingestion
  • phi-redaction — conservative de-identification preview
  • fhir-upstream-proxy — HAPI, Epic, Medplum
  • healthex-export — portable FHIR bundle export
Hosted app
careagents

Hosted personal health agents, with advisors built in.

  • healthy-habits — vitals, sleep and activity trends
  • care-completion — preventive care-gap follow-through
  • medication-refills — refill windows and projections
  • diet-exercise — activity and nutrition coaching
  • Passkey sign-in, on web, Telegram and iMessage
  • Every answer through the guardrail layer, with no PHI stored
Open CareAgents →

Marketplace manifest: .claude-plugin/marketplace.json · Skills authored against Anthropic's Skill Authoring Guide.

Curatr — patient data quality

Your health data is full of errors. Now you can fix them.

Curatr evaluates FHIR resources against live public terminology services, explains issues in plain language, and lets you approve fixes with full provenance tracking.

Issue classes Curatr detects and the source it checks against
SeverityIssueChecked against
criticalDeprecated ICD-9Local lookup
warningInvalid ICD-10-CMNLM Clinical Tables
warningUnknown SNOMED CTtx.fhir.org
warningMissing RxNormRxNav API
infoDisplay mismatchCross-check
warningMissing fieldsStructural

Every approved fix creates a linked Provenance resource recording patient intent, field changes, and agent attribution, written to the immutable audit trail. No black-box corrections.

Comparison

Vendor-neutral by design

HealthClaw works with any FHIR server. The guardrails are the product, not the data layer.

HealthClaw compared with AWS HealthLake, Medplum MCP and raw FHIR
Capability HealthClaw AWS HealthLake Medplum MCP Raw FHIR
Any FHIR serveryesnono
PHI redaction on readsyesnonono
Immutable audit trailyesseparatepartialno
Step-up auth for writesyesseparatebuilt-inno
Human-in-the-loopyesnonono
R6 Permission $evaluateyesnonono
Setup time10 sec30+ min15+ minvaries
Get started

Running in ten seconds

No accounts. No API keys. No cloud setup. Clone, install, run.

# install + run in 10 seconds
uv sync
STEP_UP_SECRET=your-secret python main.py

# or with Docker
docker-compose up -d --build

# connect to your FHIR server
FHIR_UPSTREAM_URL=https://hapi.fhir.org/baseR4 python main.py
From the builder

The why behind this

Stay in the loop

Get release notes and new guardrail patterns

A short email when we ship a new MCP tool, redaction rule, or upstream-server integration. No marketing, just what has actually changed in the repo.

Subscribers get the quickstart guide PDF as a thank-you. Or grab it now: healthclaw-quickstart.pdf · explore the skill catalogue.

We use Resend to deliver mail from updates@healthclaw.io. One-click unsubscribe in every email.