Skip to main content
Glama

MirthCraft

MCP bridge for Mirth Connect and Open Integration Engine (OIE). Safe discovery, diagnostics, workspace sync, and authoring — with environment policy gates and PHI/PII redaction.

License: Apache-2.0
Status: Alpha — Phases 1–4 shipped; PyPI mirthcraft live
Python: 3.12+

Why MirthCraft

This is not a 1:1 REST wrapper. Design principles:

  1. Token economy + deterministic XML — LLMs edit .js / .json; MirthCraft patches .mirth_base.xml.

  2. Zero-trust by environment — PROD never registers write/deploy tools.

  3. Privacy by design — message content is redacted before it reaches the model.

  4. Git-friendly workspace — develop locally; MCP syncs, validates, and prepares releases.

Related MCP server: MCP-MedImg

Install

pip install mirthcraft
# pin: pip install mirthcraft==0.1.2

mirthcraft --version
mirthcraft info

Point at a lab or server with env vars (or a custom environments.yaml):

export MIRTHCRAFT_TARGET=dev
export MIRTHCRAFT_BASE_URL=https://127.0.0.1:18443
export MIRTHCRAFT_PASSWORD_FILE=/path/to/password
# Optional: MIRTHCRAFT_CONFIG=/path/to/environments.yaml
# (redaction_rules.yaml / coding_standards.yaml fall back to packaged defaults)

Develop from source

git clone https://github.com/gusmartinuk/mirthcraft.git
cd mirthcraft

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

cp .env.example .env
# Prefer MIRTHCRAFT_PASSWORD_FILE for oielab (see docs/lab/PASSWORD_WIRING.md)

make check          # ruff + mypy + pytest
mirthcraft info

MCP (stdio) for IDEs

mirthcraft serve --transport stdio

Streamable HTTP (loopback):

mirthcraft serve --transport http --host 127.0.0.1 --port 8080
# or: docker compose --profile http up mirthcraft-http

Point Cursor / Antigravity / OpenHands at the mirthcraft CLI. See docs/AI_ORCHESTRATION.md and docs/agents/CURSOR.md.

Docker

docker compose build
docker compose run --rm mirthcraft info --json

Local labs

Lab

Role

Docs

Sibling OpenIntegration (oielab)

Primary DEV (dev) — OIE 4.7.0

docs/lab/OIELAB.md

mirthoss (labs/mirthoss)

Second DEV (mirth_oss) — Connect 4.5.2

docs/lab/MIRTH_OSS.md

make smoke-labs                 # skip-friendly if a lab is down
make e2e-phase2                 # oielab pull→lint→diff→dry-run→MLLP
make e2e-mirthoss-mllp          # mirthoss ADT ACK

Documentation

All project records live under docs/ and are written in English (public-repo ready). Local spoken/command language may be Turkish; committed artifacts stay English.

Doc

Purpose

docs/SPEC.md

Normative product/technical specification

docs/BACKLOG.md

Prioritized work items

docs/PYPI.md

Trusted Publishing / install

docs/DECISIONS.md

Architecture Decision Records index

docs/AI_ORCHESTRATION.md

Multi-AI workflow

docs/CHANGELOG.md

Release / session change log

Naming

Component

Value

Repo / product

mirthcraft

Python package

mirthcraft

MCP server name

mirthcraft

CLI

mirthcraft

Resource URI scheme

mirthcraft://…

Env prefix

MIRTHCRAFT_

Safety

  • Never commit real PHI, passwords, or production URLs.

  • Fixtures must be synthetic.

  • PROD policy is read-only by construction (see tests/test_policy_gate.py).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      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.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables standardized PACS-AI integration through the Model Context Protocol, providing medical imaging workflows with DICOMweb transport, hierarchical PHI de-identification, and AI model orchestration.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects frontier AI agents to HL7 FHIR R4 electronic health record repositories, enabling patient, observation, condition, medication, allergy, and diagnostic report queries plus draft-only clinical writes. Enforces mathematical safety gates, HIPAA-compliant tamper-evident audit logging, and token distillation of bulky FHIR payloads.
      Apache 2.0