Who it is forA developer or analyst who already works in Claude Code or Claude Desktop and wants to run X-ray segmentation through natural language.
The problemSwitching between a chat assistant and a terminal to run segmentation and read results slows down analysis of a batch of images.
The outcomeAn AI client that calls segment_image on a named X-ray and reports per-label statistics, plus lookups of available models and protocols.
What you need first
- Python 3.10 or newer and pip
- One or more X-ray images in PNG, JPEG, TIFF, BMP, or DICOM (DICOM needs the dicom extra)
- Internet access to download pretrained weights from Hugging Face on first run
- For training only: a labeled dataset, and a GPU or CPU for the dry run; the README says training is single-process with at most one GPU
- For the MCP use case: an MCP-capable client such as Claude Code or Claude Desktop
Steps
- Install the MCP extra with
python -m pip install "flexray[mcp]". - Register the server with
claude mcp add flexray -- fxr-mcp. - Start Claude Code and ask it to use the flexray tools on your image path.
- Check that the reply includes per-label statistics from segment_image, then open the saved output files to confirm them.
Prompt for your agent
Using the FleXray MCP server from the FleXray repo, call segment_image on <image-path> and report the per-label statistics. Expect a summary of each anatomical label and the output files. Verify the label names match the label_names.json written by the run.
Caveat. The README names the MCP tools but does not list their parameters, so check docs/mcp.md before scripting calls beyond the natural-language use shown.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for VictorButoi/FleXray and "Ask Claude Code to segment X-rays through Fle Xray MCP"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer