home / mcp / dicom mcp server

DICOM MCP Server

Provides DICOM operations as MCP endpoints for AI agents, including study/series queries, metadata access, move operations, and local pixel data retrieval.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aotal-dicom_api_mcp_project": {
      "command": "python",
      "args": [
        "/path/to/dicom_mcp_server.py"
      ],
      "env": {
        "DICOM_SERVER_URL": "http://localhost:8000"
      }
    }
  }
}

This MCP server exposes DICOM operations as tools for AI agents, enabling you to search studies and series in PACS, query instance metadata, move DICOM entities to a local server, and retrieve local pixel data for instances.

How to use

You use this MCP server by connecting it with an MCP client and invoking its tools to access and manipulate DICOM data. You can search for studies in a PACS, drill down to series within a study, retrieve detailed metadata for individual instances, move DICOM entities to your local server, and obtain pixel data from local instances. Each tool exposes a clear set of input parameters, allowing you to filter results and request only the data you need. Use the returned results to guide AI workflows, clinical QA, or data curation tasks.

How to install

Prerequisites you need before installing:
- Python and pip installed on your system
- Access to the machine where you will run the MCP server
- Basic familiarity with editing configuration files and JSON blocks.

Install the server package in editable mode to enable development changes:

pip install -e .

If you plan to develop or run with extra development dependencies, install with the dev extras:

pip install -e ".[dev]"

Configuration

Configure the main server to point to your DICOM backend and set up the MCP client integration. You will specify the DICOM server URL and the MCP server command to run the local MCP process.

DICOM_SERVER_BASE_URL = "http://tu-servidor-dicom:puerto"

Configure the MCP client to use this server. The following JSON config demonstrates how to reference the local Python MCP script that hosts the DICOM tools. Use the URL that your MCP server exposes.

{
  "mcpServers": {
    "dicom-tools": {
      "command": "python",
      "args": ["/ruta/a/dicom_mcp_server.py"],
      "env": {
        "DICOM_SERVER_URL": "http://localhost:8000"
      }
    }
  }
}

Additional information

The server provides a set of tools that you can call from your MCP client to perform common DICOM data operations. The available tools include querying studies, querying series, querying instance metadata, moving DICOM entities to the local server, and retrieving pixel data for local instances. Ensure the DICOM server URL you configure is reachable from the MCP client and that the local server process has access to the necessary PACS or DICOM sources.

Available tools

query_studies

Search studies in the PACS using patient identifiers, study date, accession number, patient name, and additional filters.

query_series

Search series within a study by study UID and optional filters.

query_instances

Retrieve metadata for instances within a series.

move_dicom_entity_to_local_server

Move DICOM entities to the local server.

get_local_instance_pixel_data

Retrieve pixel data for local instances.