用于3D切片器集成的模型上下文协议服务器
概览
MCP-Slicer 通过模型上下文协议(MCP)将 3D Slicer 与 Claude Desktop 或 Cline 等模型客户端连接,实现对 3D 切片器的直接交互和控制。这种集成支持医学图像处理、场景创建和自然语言操作。 1. : 列出并筛选切片器 MRML 节点并查看其属性 2. : 在切片软件环境中执行 Python 代码 3. : 实时截图切片软件视图 - 完整应用窗口(包括模块面板) - 单个切片视图(红/黄/绿) - 3D渲染视图 - 支持完整的REACT循环并提供视觉反馈 - 3D 切片器 5.8 或更新版本 - Python 3.13 或更新版本 - UV 包管理器 否则安装说明在他们官网上:安装UV 请进入Claude>设置>开发者>编辑配置> claude_desktop_config.json,以包含以下内容: 确保你看到Claude桌面应用中添加了相应的切片工具
概述(AI 翻译)
英文 |简体中文
MCP-Slicer 通过模型上下文协议(MCP)将 3D Slicer 与 Claude Desktop 或 Cline 等模型客户端连接,实现对 3D 切片器的直接交互和控制。这种集成支持医学图像处理、场景创建和自然语言操作。
特色
-
list_nodes:列出和筛选切片器 MRML 节点并查看其属性
-
execute_python_code:在切片软件环境中执行Python代码
-
capture_screenshot:实时截取切片软件视图
- 完整的应用窗口(包括模块面板)
- 单个切片视图(红/黄/绿)
- 3D渲染视图
- 支持完整的REACT循环并支持视觉反馈
安装
先决条件
- 3D 切片器 5.8 或更新版本
- Python 3.13 或更新版本
- UV包管理器
如果你用的是Mac,请以新身份安装UV
在Windows上
然后
否则安装说明在他们官网上:安装UV
** ⚠️ 请先安装UV线 **
Claude 桌面集成
请进入Claude>设置>开发者>编辑配置> claude_desktop_config.json,以包含以下内容:
克莱因整合
用途
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP-Slicer - 3D Slicer Model Context Protocol Integration
MCP-Slicer connects 3D Slicer with model clients like Claude Desktop or Cline through the Model Context Protocol (MCP), enabling direct interaction and control of 3D Slicer. This integration allows for medical image processing, scene creation, and manipulation using natural language.
Features
-
list_nodes: List and filter Slicer MRML nodes and view their properties
-
execute_python_code: Execute Python code in the Slicer environment
-
capture_screenshot: Capture real-time screenshots of Slicer views
- Full application window (including module panels)
- Individual slice views (Red/Yellow/Green)
- 3D rendering view
- Enables complete REACT loop with visual feedback
Installation
Prerequisites
- 3D Slicer 5.8 or newer
- Python 3.13 or newer
- uv package manager
If you’re on Mac, please install uv as
brew install uv
On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
and then
set Path=C:\Users\nntra\.local\bin;%Path%
Otherwise installation instructions are on their website: Install uv
⚠️ Please install UV first
Claude for Desktop Integration
Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following:
{
"mcpServers": {
"slicer": {
"command": "uvx",
"args": ["mcp-slicer"]
}
}
}
Cline Intergration
{
"mcpServers": {
"slicer": {
"command": "uvx",
"args": ["mcp-slicer"]
}
}
}
Usage
Check Claude Settings
Make sure you see the corresponding slicer tools added to the Claude Desktop App
Open Slicer Web Server
- Open the Slicer Web Server module,
- ensure the required interfaces are checked,
- then start the server
Examples
- list_nodes
安装
uvx mcp-slicer配置
{
"mcpServers": {
"slicer": {
"command": "uvx",
"args": ["mcp-slicer"]
}
}
}