/healthclaw-guardrails:fhir-upstream-proxyfrom healthclaw-guardrails
Proxies AI agent requests to real FHIR servers (HAPI, SMART, Epic) through an MCP guardrail stack with PHI redaction, audit trails, URL rewriting, and step-up auth.
Ships in healthclaw-guardrails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Connect to real FHIR servers while keeping the full MCP guardrail stack active.
Client -> MCP Server -> Flask (guardrails) -> Upstream FHIR Server
|
redaction, audit, step-up,
tenant isolation, disclaimers,
URL rewriting
Set the FHIR_UPSTREAM_URL environment variable to enable proxy mode:
# HAPI FHIR R4 (open, no auth)
FHIR_UPSTREAM_URL=https://hapi.fhir.org/baseR4 python main.py
# SMART Health IT (open, no auth)
FHIR_UPSTREAM_URL=https://r4.smarthealthit.org python main.py
# HAPI FHIR R5 (open, no auth)
FHIR_UPSTREAM_URL=https://hapi.fhir.org/baseR5 python main.py
# Local HAPI instance
FHIR_UPSTREAM_URL=http://localhost:8080/fhir python main.py
# Docker Compose with upstream
FHIR_UPSTREAM_URL=https://hapi.fhir.org/baseR4 docker-compose up -d --build
| Variable | Default | Description |
|---|---|---|
FHIR_UPSTREAM_URL | (empty) | Upstream FHIR server base URL. Enables proxy when set. |
FHIR_UPSTREAM_TIMEOUT | 15 | HTTP timeout for upstream requests (seconds) |
FHIR_LOCAL_BASE_URL | (empty) | Local server URL for URL rewriting in responses |
Fetched from upstream, then redacted + audited + disclaimers added. The agent never sees unredacted upstream data.
All query parameters forwarded to upstream. Results redacted per entry. Upstream's full search capabilities are available (chaining, _include, etc.).
Validated locally first (structural checks), then forwarded to upstream with step-up auth verification. Both local and upstream audit records created.
All upstream server URLs in responses are replaced with local proxy URLs. The agent and client never see the upstream server's hostname or paths.
/r6/fhir/health reports upstream connection status including FHIR version
and server software name.
Network errors return proper FHIR OperationOutcome responses, not stack traces.
| Server | URL | Auth | Status |
|---|---|---|---|
| HAPI FHIR R4 | https://hapi.fhir.org/baseR4 | None | Tested |
| SMART Health IT | https://r4.smarthealthit.org | None | Tested |
| HAPI FHIR R5 | https://hapi.fhir.org/baseR5 | None | Tested |
| Local HAPI | http://localhost:8080/fhir | None | Tested |
| Epic Sandbox | https://open.epic.com/Interface/FHIR | OAuth 2.0 | Limited |
The proxy uses httpx for HTTP client operations with:
application/fhir+json accept headerHealthClaw-Guardrails/1.0.0URL rewriting is recursive — it traverses the entire response JSON tree and replaces all occurrences of the upstream URL with the local proxy URL.
What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/check-sourcesSurvey ALL connected health data sources at once. Use when the patient asks: (1) "what's connected" or "what services are linked", (2) "check all my services / all my data", (3) "do you have my records" or "what records do you have", (4) "did my data come through from <Fasten/MEDENT/HealthEx/Health Bank One/Flexpa/Epic/wearables>". Calls fhir_get_token (for protected tenants) then sources_check, and presents connection status + record counts by type. Connection status and counts only — never clinical values.
/curatrHealthClaw Curatr (healthclaw.io) — patient-facing FHIR data quality evaluation and correction. Use when: (1) Evaluating a patient's health record for coding issues (deprecated code systems, invalid codes, missing required fields), (2) Presenting issues in plain language with clinical impact, (3) Applying patient-approved corrections with full Provenance tracking, (4) Preparing a structured correction request for the patient's healthcare provider. Supports FHIR R4 US Core v9 resources: Condition, AllergyIntolerance, MedicationRequest, Immunization, Procedure, DiagnosticReport — with ICD-10-CM, SNOMED CT, LOINC, CVX, and RxNorm validation via public terminology APIs.
/fasten-connectUse this skill whenever connecting a patient's real health records from EHR systems (Epic, Cerner, Athena) or the TEFCA national network into HealthClaw Guardrails. Covers: Fasten Stitch widget embed, org_connection_id registration, EHI export job tracking, NDJSON ingestion status, TEFCA IAS identity-verified multi-provider retrieval, and post-import Curatr quality scan workflow.npx claudepluginhub aks129/healthclawguardrails --plugin healthclaw-guardrailsOther plugins' skills for the same job