A developer named Antoine recently shared how he used Claude Code (Opus) to analyze his own cervical spine MRI. The post hit #1 on Hacker News with over 1200 points. People are asking: is this the future of medicine or a dangerous hack? Let's look at what actually happened, the technical details, and the honest tradeoffs.
What Antoine Did
Antoine had a cervical spine MRI for a suspected disc issue. He took the DICOM files from the radiology CD, converted them to PNG images, and fed them into Claude Code (Opus) via the command line. He wrote a simple script that sent each slice to the model with a prompt asking for analysis. The model returned observations about disc bulges, nerve compression, and alignment.
The Technical Setup
He used Claude Code (the CLI tool) with the Opus model. The key steps:
- Extract DICOM files from the CD (standard radiology format).
- Convert each slice to PNG using a tool like
dcmj2pnmfrom the DCMTK toolkit. - Write a bash script that loops over images and calls
claude codewith a prompt like: "Analyze this cervical spine MRI slice. Describe any abnormalities." - Collect the outputs and summarize.
Total cost: roughly $2-3 in API tokens for the full MRI series (around 20 slices).
What Claude Code Got Right
- Identified a C5-C6 disc bulge that matched the radiologist's report.
- Noted mild spinal canal stenosis.
- Correctly described the orientation and anatomy of most slices.
What It Got Wrong
- Missed a small osteophyte (bone spur) that the radiologist flagged.
- Overcalled a "possible" nerve root compression that wasn't confirmed on further review.
- Inconsistent across slices: sometimes contradicted itself between adjacent images.
- No ability to correlate with clinical history or symptoms.
The Real Risk: False Confidence
The biggest danger isn't that the model is useless. It's that it sounds very convincing. Claude writes fluent, confident radiology-style reports. If you're a patient reading this, you might trust it more than you should. A false negative could delay treatment. A false positive could cause unnecessary anxiety or procedures.
Why This Is Different from AI-Assisted Radiology
Radiology AI tools (like those from Aidoc or Zebra Medical) are FDA-cleared for specific findings. They are trained on thousands of labeled scans and validated against ground truth. Claude Code is a general-purpose language model with no medical certification. It has never been tested on a radiology dataset. It's not a medical device.
The Cost Comparison
A second opinion from a radiologist via services like 2nd.MD costs $200-500 and takes days. Claude Code costs $2-3 and takes minutes. But the radiologist is liable for errors. Claude Code is not.
Should You Try This?
If you're a developer who understands the limitations, it's an interesting experiment. You might catch something the radiologist missed, but you might also be misled. Never use this to make a treatment decision. Always consult a board-certified physician.
The Technical Takeaway for AI Engineers
This experiment highlights a pattern: using LLMs as "oracles" for specialized visual tasks. The approach is fragile. It works best when:
- The image is clear and standard orientation.
- The task is pattern recognition (e.g., "is there a disc bulge?").
- You have a way to verify outputs (e.g., compare with known report).
It fails when:
- The image has artifacts or unusual anatomy.
- The task requires temporal comparison (e.g., change from prior scan).
- The question is nuanced (e.g., "is this finding clinically significant?").
The Bottom Line
Claude Code can give you a rough second opinion on an MRI for a few dollars. But it's not a replacement for a radiologist. Use it as a curiosity, not a diagnosis. If you're building a product around this, you need FDA clearance and rigorous validation.
Additional Considerations for Practitioners
If you are an AI engineer considering a similar approach for a production system, there are several practical hurdles. First, DICOM files contain metadata like patient demographics, scanner parameters, and series descriptions. You must strip PHI (protected health information) before sending images to any external API. Use tools like dcmodify to anonymize. Second, the model's output is non-deterministic. Running the same image twice can yield different findings. You need to aggregate multiple runs or use a voting mechanism. Third, the model has no sense of scale. MRI slices have a specific thickness (e.g., 3mm) and pixel spacing. Without this context, the model cannot accurately measure the size of a lesion or disc bulge. You must inject DICOM header values into the prompt. Fourth, the model may hallucinate anatomical structures that don't exist in the image. One user reported Claude describing a "large cyst" in a slice that was actually a normal cerebrospinal fluid space. Always cross-check with anatomical atlases.
A Concrete Example: Prompt Engineering for MRI Analysis
Here is a sample prompt that works better than a generic "analyze this slice":
You are a board-certified radiologist. Analyze this cervical spine MRI slice (T2-weighted, sagittal view).
Slice thickness: 3mm. Pixel spacing: 0.5mm x 0.5mm.
Describe any abnormalities in order of clinical significance. For each finding, state:
- Location (e.g., C5-C6 level)
- Type (e.g., disc bulge, osteophyte, stenosis)
- Severity (mild, moderate, severe)
- Confidence (high, medium, low)
If no abnormality is present, state "Normal."
Do not mention findings you are not confident about.
Even with this prompt, the model still makes errors. The key is to treat the output as a draft that requires human verification.
The Regulatory Reality
In the US, any software that analyzes medical images and provides a diagnostic output is considered a medical device by the FDA. Using Claude Code for MRI analysis without FDA clearance is illegal if used in clinical practice. For personal experimentation, the risk is on you. But if you distribute this tool to others, you face regulatory action. The FDA has issued warning letters to companies selling unapproved AI radiology tools. The fines can be substantial.
Alternatives to Claude Code for MRI Analysis
If you need a reliable AI second opinion, consider FDA-cleared options:
- Aidoc: Detects intracranial hemorrhage, pulmonary embolism, etc. Requires a hospital subscription.
- Zebra Medical Vision: Offers automated bone age, coronary calcium scoring, etc. Available through cloud APIs.
- Lunit: Focuses on chest X-rays and mammography.
These tools are validated, have known sensitivity/specificity, and are covered by malpractice insurance. They cost more per scan (typically $10-50) but are far safer.
The Future of AI in Radiology
This experiment is a glimpse of what's possible. As multimodal models improve, they may eventually match or exceed human radiologists for specific tasks. But today, the gap is still large. The most promising approach is human-AI collaboration: the AI flags suspicious areas, and the radiologist makes the final call. That's how FDA-cleared tools work. Claude Code is not there yet.
Keep Reading
- Building Reliable Agentic AI Systems
- Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering
- Harness Engineering: Leveraging Codex in an Agent-First World
If you're building AI tools for specialized domains, you need robust evaluation. Try Zlyqor to track your model outputs and catch regressions before they reach users. Sign up at app.zlyqor.com.

Comments
Have a question or something to add? Sign in to join the discussion.