DICOMweb MCP Server
An MCP server that exposes a DICOMweb-compliant DICOM archive to AI assistants. It lets any MCP-capable client search studies, series and instances, inspect metadata, read Structured and Encapsulated PDF Reports, and render image frames — all through natural language.
README
dicomweb-mcp-server
A Model Context Protocol (MCP) server that exposes a DICOMweb-compliant DICOM archive to AI assistants. It lets any MCP-capable client search studies, series and instances, inspect metadata, read Structured and Encapsulated PDF Reports, and render image frames — all through natural language.
Requirements
- Node.js 20 or later
- A running DICOMweb server supporting QIDO-RS and WADO-RS (e.g. orthanc)
The following endpoints must be supported by the DICOMweb server:
| Endpoint | Service | Used by |
|---|---|---|
GET /studies |
QIDO-RS | Search studies |
GET /studies/{study}/series |
QIDO-RS | Search series |
GET /studies/{study}/series/{series}/instances |
QIDO-RS | Search instances, search structured reports, search encapsulated PDF reports |
GET /studies/{study}/series/{series}/instances/{instance}/metadata |
WADO-RS | Get instance metadata, get structured report text, get encapsulated PDF report text |
GET /studies/{study}/series/{series}/instances/{instance}/frames/{frame}/rendered |
WADO-RS | Render instance frame |
Installation
Using npx (recommended — no local install needed)
npx dicomweb-mcp-server
The server reads its configuration from a .env file located in the same directory as the script (see Configuration below).
Global install
npm install -g dicomweb-mcp-server
dicomweb-mcp-server
Configuration
Create a .env file with the connection details for your DICOMweb server. Place the file next to wherever the server is executed from (or in the working directory you configure in your MCP client).
# Required
DICOMWEB_HOST=https://your-dicomweb-server/dicomweb
# Optional — authentication
DICOMWEB_AUTH=basic # basic | bearer
DICOMWEB_USER=username # required when DICOMWEB_AUTH=basic
DICOMWEB_PASS=password # required when DICOMWEB_AUTH=basic
DICOMWEB_TOKEN=your-token # required when DICOMWEB_AUTH=bearer
# Optional — request timeout (milliseconds)
DICOMWEB_TIMEOUT=30000
| Variable | Required | Description |
|---|---|---|
DICOMWEB_HOST |
Yes | Base URL of the DICOMweb server (used for both QIDO-RS and WADO-RS requests) |
DICOMWEB_AUTH |
No | Authentication type: basic or bearer |
DICOMWEB_USER |
Conditional | Username — required when DICOMWEB_AUTH=basic |
DICOMWEB_PASS |
Conditional | Password — required when DICOMWEB_AUTH=basic |
DICOMWEB_TOKEN |
Conditional | Bearer token — required when DICOMWEB_AUTH=bearer |
DICOMWEB_TIMEOUT |
No | Fetch timeout in milliseconds. Omit to disable. |
MCP Client Setup
Claude Desktop
Add the server to claude_desktop_config.json:
{
"mcpServers": {
"dicomweb": {
"command": "npx",
"args": ["-y", "dicomweb-mcp-server"],
"env": {
"DICOMWEB_HOST": "https://your-dicomweb-server/dicomweb"
}
}
}
}
You can supply all environment variables directly in the env block instead of using a .env file.
VS Code (GitHub Copilot Agent Mode)
Add to your VS Code settings.json or workspace .vscode/mcp.json:
{
"servers": {
"dicomweb": {
"type": "stdio",
"command": "npx",
"args": ["-y", "dicomweb-mcp-server"],
"env": {
"DICOMWEB_HOST": "https://your-dicomweb-server/dicomweb"
}
}
}
}
Cursor
Add to .cursor/mcp.json in your project root, or to the global ~/.cursor/mcp.json:
{
"mcpServers": {
"dicomweb": {
"command": "npx",
"args": ["-y", "dicomweb-mcp-server"],
"env": {
"DICOMWEB_HOST": "https://your-dicomweb-server/dicomweb"
}
}
}
}
Available Tools
find-studies
Searches DICOM studies on the configured DICOMweb server. Results are sorted by study date, newest first.
| Parameter | Type | Description |
|---|---|---|
query |
string | Space-separated key=value filter string (see Query Syntax). Pass "" to return all studies. |
Example prompts
- "Find all CT studies for patient John Doe"
- "Search for studies from January 2024"
find-series
Searches DICOM series within a single study. Results are sorted by series date, newest first.
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID — obtain from find-studies |
query |
string | Space-separated key=value filter string. Pass "" to return all series. |
find-instances
Searches DICOM instances within a single series. Results are sorted by Instance Number ascending.
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID — obtain from find-studies |
seriesInstanceUid |
string | Series Instance UID — obtain from find-series |
query |
string | Space-separated key=value filter string. Pass "" to return all instances. |
find-encapsulated-pdf-reports
Finds all Encapsulated PDF instances in a study by looking for DOC-modality series and filtering by the Encapsulated PDF SOP Class UID (1.2.840.10008.5.1.4.1.1.104.1).
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID — obtain from find-studies |
Example prompts
- "Find all PDF reports in study 1.2.3.4"
- "Are there any encapsulated PDF documents in this study?"
get-encapsulated-pdf-report-text
Retrieves an Encapsulated PDF DICOM instance and extracts its text content.
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID |
seriesInstanceUid |
string | Series Instance UID |
sopInstanceUid |
string | SOP Instance UID — obtain from find-encapsulated-pdf-reports |
Note: Text extraction only works for searchable (text-based) PDFs. PDFs that consist entirely of scanned page images without an embedded text layer will yield little or no text. In those cases, no OCR is performed.
Example prompts
- "Read the PDF report for SOP instance 1.2.3.4.5"
- "What does the encapsulated PDF document say?"
find-structured-reports
Finds all Structured Report (SR) instances in a study by looking for SR-modality series and filtering by known SR SOP Class UIDs.
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID — obtain from find-studies |
get-structured-report-text
Retrieves a Structured Report instance and converts it to human-readable text.
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID |
seriesInstanceUid |
string | Series Instance UID |
sopInstanceUid |
string | SOP Instance UID — obtain from find-structured-reports |
get-instance-metadata
Retrieves and formats all DICOM attributes of a single instance as human-readable text. Does not retrieve pixel data.
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID |
seriesInstanceUid |
string | Series Instance UID |
sopInstanceUid |
string | SOP Instance UID — obtain from find-instances |
render-instance-frame
Renders a specific frame from a DICOM instance and returns it as an inline image (JPEG or PNG).
| Parameter | Type | Description |
|---|---|---|
studyInstanceUid |
string | Study Instance UID |
seriesInstanceUid |
string | Series Instance UID |
sopInstanceUid |
string | SOP Instance UID — obtain from find-instances |
frame |
integer | 1-based frame index (use 1 for single-frame instances) |
outputFormat |
enum | image/jpeg or image/png |
Example prompt
- "Show me the first frame of SOP instance 1.2.3.4.5 as a JPEG"
Query Syntax
The query parameter accepted by the search tools is a space-separated list of key=value pairs.
Key formats
| Format | Example |
|---|---|
| DICOM keyword name | PatientName=DOE* |
| 8-digit hex tag | 00100020=12345 |
Special keys
| Key | Description |
|---|---|
limit=N |
Maximum number of results to return |
offset=N |
Skip the first N results (for pagination) |
fuzzymatching=true |
Enable fuzzy (phonetic) name matching |
includefield=all |
Request all available DICOM attributes |
Examples
PatientName=DOE*
StudyDate=20240101-20241231 ModalitiesInStudy=CT
00100020=ABC123 limit=10
fuzzymatching=true PatientName=Smith
Wildcard * is supported in string values where the DICOMweb server allows it.
Typical Workflow
A natural conversational sequence with the MCP server looks like this:
- Search studies —
find-studieswith a patient name or date range. - Browse series —
find-serieswith the Study Instance UID returned in step 1. - List instances —
find-instanceswith Study and Series UIDs from steps 1–2. - Inspect or render —
get-instance-metadatafor DICOM attributes, orrender-instance-frameto view pixel data. - Read SR reports —
find-structured-reportsthenget-structured-report-textfor SR documents. - Read PDF reports —
find-encapsulated-pdf-reportsthenget-encapsulated-pdf-report-textfor Encapsulated PDF documents.
License
dicomweb-mcp-server is released under the MIT License.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。