Skip to main content
Glama

MCP-Slicer - 3D切片器模型上下文协议集成

English |简体中文

Python 版本 许可证:MIT PyPI 版本

MCP-Slicer 通过模型上下文协议 (MCP) 将 3D Slicer 与 Claude Desktop 或 Cline 等模型客户端连接起来,从而实现 3D Slicer 的直接交互和控制。这种集成允许使用自然语言进行医学图像处理、场景创建和操作。

特征

  1. list_nodes:列出并过滤Slicer MRML节点并查看其属性

  2. execute_python_code:在 Slicer 环境中执行 Python 代码

Related MCP server: QGIS MCP

安装

先决条件

  • 3D Slicer 5.8 或更高版本

  • Python 3.13 或更高版本

  • uv 包管理器

如果你使用的是 Mac,请将 uv 安装为

brew install uv

在 Windows 上

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

进而

set Path=C:\Users\nntra\.local\bin;%Path%

否则,安装说明在其网站上:安装 uv

⚠️ 请先安装 UV

Claude 用于桌面集成

转到 Claude > 设置 > 开发人员 > 编辑配置 > claude_desktop_config.json 以包含以下内容:

{
  "mcpServers": {
    "slicer": {
      "command": "uvx",
      "args": ["mcp-slicer"]
    }
  }
}

克莱恩积分

{
  "mcpServers": {
    "slicer": {
      "command": "uvx",
      "args": ["mcp-slicer"]
    }
  }
}

用法

检查克劳德设置

打开切片器 Web 服务器

  1. 打开Slicer Web Server模块,

  2. 确保检查所需的接口,

  3. 然后启动服务器

示例

- 列表节点

现在Slicer场景中有哪些Markups节点,列出它们的名称,如果是线,它们的长度是多少,如果是角度,它们的角度是多少

- 执行python代码

在Slicer场景中绘制一个边长8cm的半透明绿色立方体,标记它的顶点,然后在其中绘制一个内接的红色球体。

技术细节

利用现有的 Slicer Web 服务器接口。有关技术细节,请参阅Slicer Web 服务器用户指南

限制和安全注意事项

  • execute_python_code工具允许在 3D Slicer 中运行任意 Python 代码,功能强大但具有潜在危险。

    ⚠️不建议用于生产用途。

  • 复杂的操作可能需要分解为更小的步骤。

贡献

欢迎贡献代码!欢迎随时提交 Pull Request。

免责声明

这是一个第三方集成项目,不是由 3D Slicer 团队开发的。

A
license - permissive license
A
quality
C
maintenance

Maintenance

0Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Connects Blender to AI through the Model Context Protocol to enable prompt-assisted 3D modeling and scene manipulation. It supports object creation, material control, and arbitrary Python code execution directly within the Blender environment.
    22
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects Blender to AI assistants through the Model Context Protocol, enabling direct AI control of 3D modeling, scene creation, and manipulation via natural language.
    MIT

View all related MCP servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhaoyouj/mcp-slicer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server