Skip to main content

MedMLX

One Python API, command line and MCP server for native medical imaging on Apple Silicon. Run TotalSegmentator, nnU-Net, MedSAM2, SynthSeg and more through their independent MLX runtimes.

Models · Docs · Website

Outputs across CT, PET/CT, radiographs, endoscopy and MRI

Apple Silicon · Metal · Python 3.13 · uv

This README describes the 0.4.5 release. The PyPI documentation describes the same release; source-only features are tracked in the release notes.

Install

Install the latest published CLI and MCP server with all model families:

uv tool install --python 3.13 "medmlx[all,mcp]"

For a Python project, use uv add "medmlx[all,mcp]" instead.

Choose segment, generate or vision instead of all for a smaller install. The segment extra includes SAM 3 image and video support; generate includes NV-Reason-CT and the weight-free FDG PET adapter. Model weights download automatically on first use and keep their own terms. MedGemma uses a provisional bridge to a separate MedVLM environment; checkpoint inference and numerical accuracy are unqualified. See the bridge setup and limits.

For unreleased runtime changes, use the locked source workspace described in the MCP setup guide. The dependency definitions record the runtime versions used by that workspace.

Run a model

medmlx describe mlx-segment-ct
medmlx readiness mlx-segment-ct --arguments arguments.json --root /path/to/work
medmlx run mlx-segment-ct --arguments arguments.json --root /path/to/work

For models with automatic assets, omit weights_path: the runner downloads its configured Hub repository or model files, reuses the cached folder afterwards, and records its revision in the run details. For your own weights, pass a local folder as weights_path. MedGemma and MRSegmentator currently require local weights; multi-model workflows can require separate asset paths.

describe shows each model's arguments. readiness checks the runtime and Metal without downloading weights. Optionally pre-download installed model assets for offline use with medmlx setup --all --progress; workflows with multiple assets require manual setup. See automatic weights and readiness.

import json
from pathlib import Path
import medmlx

arguments = json.loads(Path("arguments.json").read_text())
result = medmlx.run("mlx-segment-ct", arguments=arguments, root="/path/to/work")

For an MCP client, use medmlx serve --root /path/to/work as its stdio command. Disconnecting the client cancels its running jobs. See the MCP guide for client setup, tools and a complete job workflow. For checkpoint conversion and development, see conversion and core.

The package also includes Reason-CT with nodule tools: model-selected detector and MedSAM2 calls, spatially grounded masks and a local CT review page. It requires the reason-tools extra and model assets.

License

Apache-2.0. See third-party notices. Runtimes and model weights retain their own terms.

For research and education. Outputs require human review.

Metadata

Release files for medmlx 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for medmlx 0.4.5
File Size Uploaded Provenance Actions
medmlx-0.4.5.tar.gz 71.1 kB Without provenance Details for medmlx-0.4.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for medmlx 0.4.5
File Interpreter ABI Platform Actions
medmlx-0.4.5-py3-none-any.whl Python 3 none any Details for medmlx-0.4.5-py3-none-any.whl

Total release size: 156.4 kB

Release files / medmlx-0.4.5.tar.gz

Download URL medmlx-0.4.5.tar.gz
Size 71.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f50440b93ef1aba9f9fe180d962dd3d2a47cd375589531959d1e6a1fac1926b2
BLAKE2b-256 checksum
How to use checksums
6b81af625f4878bc7c633c1dada73464a2e084a5bc2f1736264f534d5f7c6240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / medmlx-0.4.5-py3-none-any.whl

Download URL medmlx-0.4.5-py3-none-any.whl
Size 85.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9247be02c0f885f5cb67ca8b837b8bc41e6e575c401e590eba823971262a3841
BLAKE2b-256 checksum
How to use checksums
c709c7a8be07406d2d2794b74c561e4bd43eeaba3ce23ebb092349203d73eade
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for medmlx 0.4.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page