HealthChain logo
Health: ActiveRecent health check succeeded.Last checked 8/7/2026, 10:35:45 PM

HealthChain

healthchainai
View Repository221

Typed, validated FHIR tools for healthcare AI agents โ€” build, read, validate, and code FHIR resources from a patient bundle, with terminology lookup and machine-readable validation reports built for fix-and-retry. pip install healthchain[mcp]

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ€” or use 1-click editor setup below.

Manual Client & Custom JSON ConfigExpand JSON โ–พ

Install Config Generator

claude_desktop_config.json
{
  "mcpServers": {
    "healthchainai-healthchain": {
      "command": "uvx",
      "args": [
        "healthchain"
      ]
    }
  }
}

๐Ÿ’ก Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Documentation Overview

HealthChain

PyPI Version Stars Downloads

License Python Versions Build Status AI-Assisted Development DOI

Substack Discord

Open-Source Python SDK for Healthcare AI

Agents read clinical data fine โ€” writing it back correctly is the hard part, and generic agent frameworks don't check it. HealthChain gives any model or agent typed, validated FHIR tools they can trust: the right code from the right system, on the right patient, with a valid status. Plus real-time EHR connectivity and production deployment โ€” so what you build holds up outside the demo.

Installation

Terminal
pip install healthchain

Quick Start

bash
# Scaffold a FHIR Gateway project
healthchain new my-app -t fhir-gateway
cd my-app

# Run locally
healthchain serve
HealthChain CLI demo

Edit app.py to add your model, and healthchain.yaml to configure deployment settings.

See the CLI reference for all commands.

Building with an AI assistant? Point it at llms.txt for a map of the current API docs.

Core Features

The quickest way for AI developers and researchers to ship healthcare AI โ€” everything you need out of the box, built to scale with you.

Epic, Cerner and your EHR flow through FHIRGateway into one patient record; manual extracts are crossed out

๐Ÿ”Œ Multi-EHR Data Aggregation

Connect to live FHIR APIs across Epic, Cerner, and more โ€” and move research pipelines off manual database extracts onto data infrastructure that scales past one site

Getting Started โ†’

Messy model output goes through validate_resource and comes out as FHIR you can trust

๐Ÿ”ฅ FHIR as a Superpower

Type-safe FHIR resources, validation that catches broken data before it ships, and terminology lookups โ€” the strict schema that turns healthcare data into a built-in unit test

Getting Started โ†’

FHIRToolkit serves typed FHIR tools to Claude over MCP and to LangChain agents

๐Ÿค– Tools Your Agents Can Trust

Hand any agent typed, validated FHIR tools from one toolkit โ€” served to Claude over MCP or dropped into LangChain, so what your agent writes is valid and correctly coded

Getting Started โ†’

A patient question plus the live FHIR record produces a grounded answer

๐Ÿ’ฌ FHIR-Grounded Patient Q&A

Answer patient questions from their live clinical record โ€” the foundational pattern for portal chatbots and care-plan assistants, with a schema for truth

Getting Started โ†’

Why HealthChain?

Every serious healthcare AI project builds the same integration infrastructure from scratch. Whether you're deploying a logistic regression, a 70B-parameter model, or an agentic workflow, the wall between a trained model and a live clinical system is the same: real FHIR APIs, validated writes, multi-site deployments, auditable governance. No off-the-shelf solution exists, and engineers who understand both AI and healthcare protocols are scarce and hard to retain.

HealthChain handles that complexity so you can focus on what actually matters: the model and the patient.

  • Optimized for real-time - Connect to live FHIR APIs and integration points instead of stale data exports
  • Validation built in - Type-safe FHIR resources and validation reports that catch broken data before it ships โ€” including spec-invalid clinical codes that type checks alone let through
  • No invented facts - Helpers never add clinical claims you didn't pass: no auto-generated timestamps, no guessed statuses โ€” what enters the record is exactly what your model produced
  • Bring any model or agent - LLMs, agents, or classical ML โ€” and output validated FHIR
  • Works with your existing stack - Integrates with FastAPI, MCP, and LangChain
  • Production-ready foundations - Dockerized deployment, configurable security, and an architecture built for NHS and HIPAA environments

๐Ÿ† Recognition & Community

Featured & Presented:

๐Ÿค Partnerships & Production Use

Exploring HealthChain for your product or organization? Get in touch to discuss integrations, pilots, or collaborations, or join our Discord to connect with the community.

Usage Examples

Creating a Gateway [Docs]

server.ts
from healthchain.gateway import HealthChainAPI, FHIRGateway
from healthchain.fhir.r4b import Patient

# Create healthcare application
app = HealthChainAPI(title="Multi-EHR Patient Data")

# Connect to multiple FHIR sources
fhir = FHIRGateway()
fhir.add_source("epic", "fhir://fhir.epic.com/r4?client_id=epic_client_id")
fhir.add_source("cerner", "fhir://fhir.cerner.com/r4?client_id=cerner_client_id")

@fhir.aggregate(Patient)
def enrich_patient_data(id: str, source: str) -> Patient:
    """Get patient data from any connected EHR and add AI enhancements"""
    bundle = fhir.search(
        Patient,
        {"_id": id},
        source,
        add_provenance=True,
        provenance_tag="ai-enhanced",
    )
    return bundle

app.register_gateway(fhir)

# Available at: GET /fhir/transform/Patient/123?source=epic
# Available at: GET /fhir/transform/Patient/123?source=cerner

if __name__ == "__main__":
    app.run(port=8888)

Giving an Agent FHIR Tools [Docs]

server.ts
from healthchain.tools import FHIRToolkit

# One toolkit: build, validate, read, and code FHIR โ€” as typed agent tools
kit = FHIRToolkit(bundle="patient_bundle.json")

kit.as_mcp().run()          # serve to Claude or any MCP client
tools = kit.as_langchain()  # or drop into a LangChain agent

Or straight from the terminal, no code:

bash
healthchain mcp --bundle patient_bundle.json

๐Ÿ›ฃ๏ธ What we're building towards

  • ๐Ÿ”’ Security foundations โ€” API-key authentication, audit logging, and TLS, configured via healthchain.yaml and enforced by the gateway middleware
  • ๐Ÿ“‹ Governance as config โ€” clinical safety, data access agreements, and compliance standards for NHS/HIPAA deployments as a first-class deployment artifact in healthchain.yaml
  • ๐Ÿ”Œ Deeper EHR connectivity โ€” more FHIR sources, live data patterns, and real-world integration examples from pilot deployments
  • ๐Ÿ“Š Observability โ€” deployment telemetry and audit trails for healthcare systems
  • ๐Ÿค– A toolkit for clinical AI agents โ€” typed FHIR tools with validation and terminology built in, served over MCP and LangChain

๐Ÿค Contributing

HealthChain is built by and for the next generation of healthcare developers โ€” researchers moving models from retrospective data into live systems, AI developers who don't want to spend months learning FHIR before they can ship anything. The best contributions come from people who have hit a real problem and have something specific to say about it.

Get started:

๐Ÿค— Acknowledgements

This project builds on fhir.resources and CDS Hooks standards developed by HL7 and Boston Children's Hospital.

See also groundeval โ€” the open-source eval harness for healthcare AI agents.


ยฉ 2024โ€“2026 dotimplement ai. HealthChain is an open source project maintained by dotimplement ai.

Related MCP Servers

View all alternatives

Frequently Asked Questions about HealthChain

How do I install the healthchainai/HealthChain MCP server?

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "healthchain": { "command": "npx", "args": ["-y", "healthchainai/HealthChain"] } }

What does healthchainai/HealthChain do?

Typed, validated FHIR tools for healthcare AI agents โ€” build, read, validate, and code FHIR resources from a patient bundle, with terminology lookup and machine-readable validation reports built for fix-and-retry. pip install healthchain[mcp]

Is the healthchainai/HealthChain MCP server free to use?

Yes. healthchainai/HealthChain is listed on AllMCPs as a free, open Model Context Protocol server you can install into Claude Desktop, Cursor, or any MCP-compatible client.

Technical Specs & Signals

TransportSTDIO
RuntimePython
Health CheckActive
Views0
Installs0
GitHub stars221
48Quality signal: Fair ยท 48/100How this signal is calculated โ–พ
Server availabilityNot measured

Not scored for repo-hosted servers โ€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership8/20
Documentation & tools22/30
Adoption6/15
Community engagement0/10

A guidance signal from public completeness & health data โ€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

โ˜… FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore Server โ†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Free dofollow backlink: after claiming, verify your product site and place a dofollow AllMCPs badge โ€” we recheck it stays live.

Claim & get free dofollow

Promote this listing

Optional paid placement. Free listings stay free forever.

Featured boost7 days in the spotlight ยท from $12/wk
Weeks
1

โ†’ Runs until Aug 15, 2026

Category sponsorTop-of-category sponsorship ยท from $18/wk
Weeks
1

โ†’ Runs until Aug 15, 2026

Cancel anytime โ€” no long-term lock-in.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.