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.6 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. Run uv tool upgrade medmlx later to get new releases of MedMLX and its models.

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.6

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.6
File Size Uploaded Provenance Actions
medmlx-0.4.6.tar.gz 71.2 kB Without provenance Details for medmlx-0.4.6.tar.gz

Built distribution (wheel)

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

Total release size: 156.6 kB

Release files / medmlx-0.4.6.tar.gz

Download URL medmlx-0.4.6.tar.gz
Size 71.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8bfd1b2fbe2f3b43ee1bc1e8b3fb408c9a41310497eb9f924ba5fc9d167e137c
BLAKE2b-256 checksum
How to use checksums
fc4be2abe887c50d4057660fc920395e30967ce67604f402f749be1f6ec60220
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.6-py3-none-any.whl

Download URL medmlx-0.4.6-py3-none-any.whl
Size 85.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0ed005ce03b0fe827f39cb8ebd490b6b2977b0c4d2c5f0684de6daa7499b37b
BLAKE2b-256 checksum
How to use checksums
e5b7d2ecc5ec0a20691f66e5f4be6b55ed6ff8cc70171e58e6b7e6676de99a0d
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.6

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