Skip to main content
Glama

PyPI Version Stars Downloads

License Python Versions Build Status AI-Assisted Development DOI

Substack Discord

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

pip install healthchain

Related MCP server: FHIR MCP Server

Quick Start

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

# Run locally
healthchain serve

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.

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]

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]

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:

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.

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
3dResponse time
3wRelease cycle
17Releases (12mo)
Commit activity
Issues opened vs closed

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables LLM-based agents to interact with FHIR healthcare data through natural language prompts, providing full CRUD operations on FHIR resources, document processing, and semantic search capabilities.
    Last updated
    13
    97
    MIT
  • -
    license
    -
    quality
    -
    maintenance
    Enables seamless integration with FHIR APIs for healthcare applications, allowing users to search, retrieve, create, update, and analyze clinical information through natural language interactions. Supports SMART-on-FHIR authentication and works with various healthcare systems like EPIC and HAPI FHIR servers.
    Last updated
  • A
    license
    -
    quality
    D
    maintenance
    Enables LLMs to securely interact with FHIR healthcare servers and HL7 terminology services. Provides comprehensive healthcare data operations with built-in PHI protection, audit logging, and SMART on FHIR authentication.
    Last updated
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Provides read/write access to any FHIR-compliant healthcare API with built-in validation, supporting resource management, search operations, and granular permissions through natural language.
    Last updated
    5
    1

View all related MCP servers

Related MCP Connectors

  • Securely access and manage FHIR healthcare data stored in Medplum.

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

  • Diagnoses, drugs & lab codes: ICD-11, SNOMED, LOINC, RxNorm, MeSH, ATC, CID-10. 37 tools, MIT.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/healthchainai/HealthChain'

If you have feedback or need assistance with the MCP directory API, please join our Discord server