# healthclaw-guardrails [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/aks129/HealthClawGuardrails  
**GitHub Stars:** 34  
**Views:** 12  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/healthclaw-guardrails

## Description
Guardrailed FHIR access for AI agents: PHI redaction, audit trail, step-up auth, tenant isolation

## Tools
Capabilities this server exposes over MCP:

- **context_get** — Retrieve a pre-built context envelope with patient-centric FHIR resources. Returns bounded, policy-stamped, time-limited context.
- **fhir_read** — Read a specific FHIR resource by type and ID. Supports FHIR R4 US Core v9 stable resources and FHIR R6 ballot3 experimental resources. Returns redacted resource with PHI protection.
- **fhir_search** — Search for FHIR resources. Supports FHIR R4 US Core v9 stable resources and FHIR R6 ballot3 experimental resources. Supports patient, code, status, _lastUpdated, _count, _sort parameters. Returns paginated, redacted Bundle.
- **fhir_validate** — Validate a proposed FHIR R6 resource against structural rules. Returns OperationOutcome.
- **questionnaire_populate** — SDC $populate — pre-fill a Questionnaire for a subject. Returns a QuestionnaireResponse. Read tier; mints a tenant token for non-public tenants.
- **questionnaire_extract** — SDC $extract — extract FHIR resources from a completed QuestionnaireResponse into a transaction Bundle. Write tier; requires step-up authorization, including for dry_run=true previews.
- **fhir_propose_write** — Propose a write — validates the resource and returns a preview. Does NOT commit. Write tier: step-up authorization is required and is supplied by the deployment as an X-Step-Up-Token header. You cannot obtain or pass it yourself. If it is absent this returns requires_step_up; tell the patient authorization is needed rather than attempting another route.
- **fhir_commit_write** — Commit a previously proposed write. Requires step-up authorization token. This is a destructive operation.
- **fhir_stats** — Compute statistics (count, min, max, mean) over numeric Observation values. Standard FHIR $stats (since R4). Only supports valueQuantity. Filter by patient and/or code.
- **fhir_interpret_labs** — Interpret lab Observations against reference ranges — flags each value low/normal/high/critical (HL7 v3 ObservationInterpretation) and returns clinician + consumer summaries. Decision support, not diagnosis. Read-tier. Response includes _meta.ui.resourceUri pointing to an embeddable trend timeline.
- **care_gaps** — Check which preventive-care screenings/immunizations a patient may be due for (blood pressure, cholesterol, colorectal/cervical/breast cancer screening, flu, diabetes A1c), from their own connected records. Decision support based on USPSTF/ACIP/ADA guidelines — not a diagnosis or directive. Response includes _meta.ui.resourceUri pointing to an embeddable review UI.
- **guardrail_conformance** — Run the guardrail conformance self-test on the connected HealthClaw deployment and return the graded scorecard across seven guardrail properties: PHI redaction, immutable audit, step-up auth, human-in-the-loop, tenant isolation, medical disclaimers, and error fidelity. Uses synthetic data only. Set fresh=true to force a new run instead of the cached result.
- **fhir_lastn** — Get the last N observations per code. Standard FHIR $lastn (since R4). Returns most recent observations by storage order.
- **fhir_permission_evaluate** — Evaluate R6 Permission resources for access control decisions. Returns permit/deny based on stored Permission rules. Separates access control (Permission) from consent records (Consent).
- **fhir_subscription_topics** — List available SubscriptionTopics for event-driven subscriptions. R6 moves topic-based subscriptions toward Normative. Agents discover what events they can subscribe to.
- **wearables_sync_status** — List wearable connections (Garmin, Oura, Polar, Suunto, Whoop, Fitbit, Strava, Ultrahuman) for a tenant, with last sync time, observation count, and status. Use this to tell a patient what's connected, when data last arrived, and surface a connection-management UI (via _meta.ui.resourceUri) so they can connect more providers. Data flows into HealthClaw as FHIR Observations with LOINC codes — agents read it via fhir_search like any other Observation.
- **sources_check** — Survey ALL connected health data sources (Fasten, HealthEx, Health Bank One, MEDENT, Flexpa, Epic/Health Skillz, wearables) at once — returns each source's connection status and the patient's record counts by type. Use when the patient asks what's connected or to check for data across services.
- **fhir_compiled_truth** — Return the current best understanding of a FHIR resource plus the append-only evidence trail (Provenance entries) of how it got there. Use this before presenting resource-specific facts to a patient — surfaces curation_state and quality_score so the agent can say not just WHAT the record says but WHY it says it. Redacted, audited. Response includes _meta.ui.resourceUri pointing to an embeddable review UI.
- **curatr_evaluate** — Evaluate a FHIR resource for data quality issues. Checks coding elements against public terminology services (tx.fhir.org for SNOMED/LOINC, NLM for ICD-10-CM, RXNAV for RxNorm) and structural rules. Returns issues in plain language with patient-facing impact descriptions and resolution suggestions. Read-only — no step-up required.
- **curatr_apply_fix** — Propose data quality fixes to a FHIR resource as a 'curatr-fix' action on the action rail. Nothing changes when this is called: it returns a draft (action id) the patient must submit with action_commit and then approve out of band on their own review page; only that approval carries the fix out, once, with a linked Provenance record. The proposal is pinned to the record's current meta.versionId — pass record_version from the record you read, or omit it and the tool reads it for you — and is refused at execution if the record has changed since. Only fields the Curatr evaluator can propose are accepted.
- **action_propose** — Propose a real-world action (phone call or SMS) on the patient's behalf. Returns a draft (id + script) the patient MUST review before submitting via action_commit. Does not execute anything.
- **rx_transfer_request** — Draft a prescription-transfer request: assembles the patient's active medications and stages a phone call to the RECEIVING pharmacy asking it to pull the prescriptions from the current pharmacy (how US transfers actually work). Schedule II medications are refused (never transferable — new prescription required). Returns a draft the patient MUST review; submit with action_commit for the patient's own out-of-band confirmation after they explicitly agree — action_commit does not execute the call itself.
- **action_commit** — Submit a previously proposed action for the patient's OWN out-of-band confirmation (their dashboard or Telegram) AFTER they've reviewed and verbally/textually agreed to the draft. Requires step-up authorization, supplied by the deployment as an X-Step-Up-Token header; you cannot obtain or pass it yourself. This call does NOT execute anything and never accepts or sends any 'human confirmed' flag — only the patient tapping Approve in their own out-of-band channel can trigger execution. Returns status 'awaiting_confirmation' and is terminal for your turn: do not call action_commit again for the same action_id. Use action_status to check whether the patient has approved yet.
- **action_status** — Check the status and outcome of an action (proposed/awaiting_confirmation/executing/completed/failed/needs_review/unknown/expired/declined). declined means the patient read the proposal and said no - never re-propose the same action unasked. needs_review means it ran but the outcome could not be confirmed - show the patient the evidence. unknown means the provider MAY have acted - never re-propose the same action. Use after action_commit to see whether the patient has approved yet, and to report the final result back to them.
- **search** — ChatGPT-connector-compatible search over the tenant's FHIR records. Query is a FHIR search string (e.g. 'Observation?code=4548-4' or 'Patient?name=smith'); bare resource type works too. Returns compact results: id, title, url. Reads are PHI-redacted and audit-logged server-side.
- **fetch** — ChatGPT-connector-compatible fetch of one FHIR resource by id ('ResourceType/id', as returned by search). Returns the full document (PHI-redacted server-side) with metadata.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "healthclaw-guardrails": {
    "url": "https://mcp-demo-production-ee2c.up.railway.app/mcp"
  }
}
```

## Documentation

## What healthclaw-guardrails does

healthclaw-guardrails provides an MCP interface for guarded access to clinical data held in FHIR systems. It is designed as an intermediary between an AI agent and a FHIR deployment, applying PHI redaction, immutable audit recording, tenant isolation, and authorization checks around reads, writes, and patient-facing actions.

The server supports stable FHIR R4 US Core v9 resources and experimental FHIR R6 ballot3 resources. Agents can retrieve bounded patient context, read or search resources, validate proposed R6 resources, and use standard operations such as statistics and last-N observations. ChatGPT-connector-compatible `search` and `fetch` tools provide compact discovery results and redacted resource documents.

## How it works

Read responses are redacted before reaching the model and are audit-logged server-side. Context envelopes are bounded, policy-stamped, and time-limited. Tenant-specific permissions can be evaluated through R6 `Permission` resources, while `Consent` records remain separate from access-control decisions.

Write-capable workflows are divided into proposal and commit stages. Resource writes require a step-up token supplied by the deployment through `X-Step-Up-Token`; the agent cannot obtain or provide that token itself. Proposed writes produce previews and do not commit changes. Real-world actions such as phone calls, SMS, prescription transfers, and data-quality fixes remain drafts until the patient reviews them through an out-of-band confirmation flow. `action_commit` submits a reviewed action for confirmation but does not execute it directly.

The server also exposes clinical decision-support tools. `fhir_interpret_labs` classifies observations against reference ranges and returns clinician and consumer summaries, while `care_gaps` checks selected preventive screenings and immunizations against connected records and guideline-based rules. Both are explicitly decision support rather than diagnosis.

## Tools and capabilities

- Read, search, validate, and summarize FHIR resources with PHI protection.
- Populate questionnaires and extract completed responses into transaction Bundles using HL7 SDC workflows.
- Propose and commit FHIR writes under step-up authorization.
- Evaluate permissions, inspect subscription topics, and run guardrail conformance checks using synthetic data.
- Inspect connected health sources and wearable providers, including sync status and record counts.
- Review FHIR data quality against structural rules and public terminology services, then propose reviewable fixes.
- Generate SMART Health Links after explicit patient consent and deployment-supplied authorization.

## Limitations and notes

Direct clinical writes and other sensitive operations are not ordinary agent actions: they depend on deployment-provided authorization and, where applicable, patient approval outside the MCP turn. A missing step-up token should be reported as a need for authorization rather than worked around.

Phone calls can be proposed, but execution depends on a configured provider and registered executor. Schedule II prescription transfers are refused because they require a new prescription. Action statuses such as `declined`, `needs_review`, and `unknown` carry distinct meanings and should not be treated as successful completion.

Lab interpretation and care-gap results are informational decision support, not diagnoses or directives. Wearable data enters HealthClaw as FHIR Observations and can be read through ordinary FHIR search. The conformance self-test uses synthetic data and grades PHI redaction, immutable audit, step-up authorization, human-in-the-loop controls, tenant isolation, medical disclaimers, and error fidelity.

_Full upstream README: https://allmcps.com/mcp/healthclaw-guardrails/readme_

