Install
$ agentstack add mcp-healthchainai-healthchain β scanned Β· β verified β works with Claude Code, Cursor, and more.
Security review
β PassedNo issues found. Passed automated security review. Β· v0.1.0 How review works β
- β Prompt-injection patterns
- β Secret / credential exfiltration
- β Dangerous shell & filesystem operations
- β Untrusted network calls
- β Known-malicious package signatures
What it can access
- β Network access No
- β Filesystem access No
- β Shell / process execution No
- β Environment & secrets No
- β Dynamic code execution No
From automated source analysis of v0.1.0. βUsedβ means the capability is present in the source β more access means more to trust, not that itβs unsafe.
About
[![PyPI Version][pypi-version-badge]][pypi] [![Stars][stars-badge]][stars] [![Downloads][downloads-badge]][pypistats]
[![License][license-badge]][license] [![Python Versions][python-versions-badge]][pypi] [![Build Status][build-badge]][build] [![AI-Assisted Development][ai-badge]][claude-md] [](https://doi.org/10.5281/zenodo.20056729)
[![Substack][substack-badge]][substack] [![Discord][discord-badge]][discord]
Open-Source Python SDK for Healthcare AI
The model is the easy part β the integration that blocks it from ever reaching production is the hard part. HealthChain handles it, giving your models and agents tools they can trust: type-safe FHIR resources, real-time EHR connectivity, and production-ready deployment. So what you build holds up outside the demo.
Installation
pip install healthchain
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 compliance, security, and deployment settings.
See the CLI reference for all commands.
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.
π Multi-EHR Data Aggregation
Aggregate patient data from multiple FHIR sources into unified records with built-in NLP processing and automatic deduplication Getting Started β
π Deploy ML Models as Healthcare APIs
Turn any trained model into a production-ready FHIR endpoint with OAuth2 authentication and type-safe healthcare data handling Getting Started β
π₯ FHIR Development Utilities
Type-safe FHIR resource creation, validation helpers, and sandbox environments β skip the boilerplate and work with healthcare data natively Getting Started β
β‘οΈ Real-Time Clinical Workflow Integration
Deploy AI models as CDS services that integrate directly into EHR workflows β alerts, recommendations, and automated coding at the point of care 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, 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
- Automatic validation - Type-safe FHIR models prevent broken healthcare data
- Native LLM, agent & ML support - Wire up any model or agent β LLMs, LangChain, scikit-learn β and output results as FHIR
- Works with your existing stack - Integrates with FastAPI, LangChain, HuggingFace, and spaCy
- Production-ready foundations - Dockerized deployment, configurable security, and an architecture built for NHS and HIPAA environments
π Recognition & Community
Featured & Presented:
- Featured in TLDR AI Newsletter (900K+ developers)
- Featured by Medplum for open source integration with Epic
- Presented at NHS Python Open Source Conference (watch talk)
- Built from NHS AI deployment experience β read the origin story
π€ Partnerships & Production Use
Exploring HealthChain for your product or organization? [Get in touch](mailto:jenniferjiangkells@gmail.com) 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)
Building a Pipeline [Docs]
from healthchain.pipeline import Pipeline
from healthchain.pipeline.components.integrations import SpacyNLP
from healthchain.io import Document
# Create medical NLP pipeline
nlp_pipeline = Pipeline[Document]()
nlp_pipeline.add_node(SpacyNLP.from_model_id("en_core_web_sm"))
nlp = nlp_pipeline.build()
doc = Document("Patient presents with hypertension and diabetes.")
result = nlp(doc)
spacy_doc = result.nlp.get_spacy_doc()
print(f"Entities: {[(ent.text, ent.label_) for ent in spacy_doc.ents]}")
print(f"FHIR conditions: {result.fhir.problem_list}") # Auto-converted to FHIR Bundle
π£οΈ What we're building towards
- [ ] π Production security and compliance β API authentication, audit logging, and configurable security for NHS/HIPAA deployments
- [ ] π Governance as config β clinical safety, data access agreements, and compliance standards 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, validation loops, and evals so agents can work with clinical data reliably
π€ 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:
- Working with healthcare or research data? Contribute a cookbook β bring your use case, I'll personally support you through it
- Read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines
- Technical questions and ideas β GitHub Discussions
- Pilots and partnerships β [email](mailto:jenniferjiangkells@gmail.com?subject=HealthChain)
π€ Acknowledgements
This project builds on fhir.resources and CDS Hooks standards developed by HL7 and Boston Children's Hospital.
Β© 2024β2026 dotimplement ai. HealthChain is an open source project maintained by dotimplement ai.
[pypi-version-badge]: https://img.shields.io/pypi/v/healthchain?logo=python&logoColor=white&style=flat-square&color=%23e59875 [downloads-badge]: https://img.shields.io/pepy/dt/healthchain?style=flat-square&color=%2379a8a9 [stars-badge]: https://img.shields.io/github/stars/healthchainai/HealthChain?style=flat-square&logo=github&color=BD932F&logoColor=white [license-badge]: https://img.shields.io/github/license/healthchainai/HealthChain?style=flat-square&color=%23e59875 [python-versions-badge]: https://img.shields.io/pypi/pyversions/healthchain?style=flat-square&color=%23eeeeee [build-badge]: https://img.shields.io/github/actions/workflow/status/healthchainai/healthchain/ci.yml?branch=main&style=flat-square&color=%2379a8a9 [discord-badge]: https://img.shields.io/badge/chat-%235965f2?style=flat-square&logo=discord&logoColor=white [substack-badge]: https://img.shields.io/badge/CoolThingsInHealthTech-%23c094ff?style=flat-square&logo=substack&logoColor=white [ai-badge]: https://img.shields.io/badge/AI--devfriendly-CLAUDE.MD-%23e59875?style=flat-square&logo=anthropic&logoColor=white [pypi]: https://pypi.org/project/healthchain/ [pypistats]: https://pepy.tech/project/healthchain [stars]: https://github.com/healthchainai/HealthChain/stargazers [license]: https://github.com/healthchainai/HealthChain/blob/main/LICENSE [build]: https://github.com/healthchainai/HealthChain/actions?query=branch%3Amain [discord]: https://discord.gg/UQC6uAepUz [substack]: https://jenniferjiangkells.substack.com/ [claude-md]: CLAUDE.md
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source β we do not rehost the code.
- Author: healthchainai
- Source: healthchainai/HealthChain
- License: Apache-2.0
- Homepage: https://healthchainai.github.io/HealthChain/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet β be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.