# DICOM Agent

MCP server for Claude Code connects agents to DIMSE and DICOMweb archives and processes local DICOM files. It handles search, image rendering, measurements, and de-identification.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 25 repo stars
- Author: arunmk-ms
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/arunmk-ms/dicom-agent-mcp
- Updated: 2026-11-06
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/dicom-agent

## What it does

The server gives an agent tools for querying, retrieving, storing, and transferring DICOM objects through DIMSE or DICOMweb. It can test connectivity, read metadata, save retrieved files under `storage_dir/<study>/<series>/<sop>.dcm`, and inspect local files without loading pixel data.

Local tools render frames, calculate pixel statistics for rectangular or elliptical regions, measure distances in millimetres, and check whether a series forms a usable volume. MPR output is available in axial, coronal, and sagittal views. De-identification, claim rechecks, and hash-chain integrity checks are included as well; pixel results carry an SHA-256 `input_fingerprint`.

The server starts without configured nodes, with local-file and pixel tools available under allowed paths. Remote archives need node settings, while the `uvx` installation command passes `AZURE_DICOM_TOKEN` and `DICOM_AGENT_MCP_DEID_KEY`. This is a research scaffold, not for clinical use; it should be used with test or de-identified data.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `AZURE_DICOM_TOKEN`, `DICOM_AGENT_MCP_DEID_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add dicom-agent-mcp -e AZURE_DICOM_TOKEN=<AZURE_DICOM_TOKEN> -e DICOM_AGENT_MCP_DEID_KEY=<DICOM_AGENT_MCP_DEID_KEY> -- uvx dicom-agent-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dicom-agent-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add dicom-agent --env AZURE_DICOM_TOKEN=<AZURE_DICOM_TOKEN> --env DICOM_AGENT_MCP_DEID_KEY=<DICOM_AGENT_MCP_DEID_KEY> -- uvx dicom-agent-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dicom-agent-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "dicom-agent": {
            "command": "uvx",
            "args": [
                "dicom-agent-mcp"
            ],
            "env": {
                "AZURE_DICOM_TOKEN": "<AZURE_DICOM_TOKEN>",
                "DICOM_AGENT_MCP_DEID_KEY": "<DICOM_AGENT_MCP_DEID_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dicom-agent-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "dicom-agent": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "dicom-agent-mcp"
            ],
            "env": {
                "AZURE_DICOM_TOKEN": "<AZURE_DICOM_TOKEN>",
                "DICOM_AGENT_MCP_DEID_KEY": "<DICOM_AGENT_MCP_DEID_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dicom-agent-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e AZURE_DICOM_TOKEN=<AZURE_DICOM_TOKEN> -e DICOM_AGENT_MCP_DEID_KEY=<DICOM_AGENT_MCP_DEID_KEY> dicom-agent uvx dicom-agent-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from dicom-agent-mcp <command>

## When to use it
- search DICOM archives by patient, study, series, or instance
- retrieve metadata and save selected DICOM files
- render a frame and calculate statistics for an ROI
- check series geometry before generating an MPR view
- write de-identified copies of DICOM data

## Example prompts
- Search the connected DICOM archive for studies within a specified date range.
- Check the geometry of this series and render a sagittal slice from the local files.
- Create de-identified DICOM copies and place them in the project directory.

## Similar
- [dicom-series-to-volume](https://affpapa.org/en/nevibecode/skills/dicom-series-to-volume.md) — skill · 1900 installs
- [dicom-series-preflight](https://affpapa.org/en/nevibecode/skills/dicom-series-preflight.md) — skill · 1900 installs
- [DICOM/HL7/FHIR Interoperability MCP Server](https://affpapa.org/en/nevibecode/mcp/dicomhl7fhir-interoperability-mcp-server.md) — MCP server · ★ 5 repo stars
- [Context7](https://affpapa.org/en/nevibecode/mcp/context7.md) — MCP server · 5563 installs
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Math-MCP](https://affpapa.org/en/nevibecode/mcp/math-mcp.md) — MCP server · 5958 installs
- [pipeworx gateway](https://affpapa.org/en/nevibecode/mcp/pipeworx-gateway.md) — MCP server · 419019 installs
- [SparkForge](https://affpapa.org/en/nevibecode/mcp/sparkforge.md) — MCP server · 219896 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
