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 代码

安装

先决条件

  • 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 团队开发的。

Deploy Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    Provides an interface between AI assistants and Tripo AI via Model Context Protocol, enabling generation of 3D assets from natural language and importing them to Blender.
    Last updated -
    16
    174
    MIT License
    • Linux
    • Apple
  • -
    security
    -
    license
    -
    quality
    A server that integrates Blender with local AI models via the Model Context Protocol, allowing users to control Blender using natural language prompts for 3D modeling tasks.
    Last updated -
    55
    • Linux
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that enables AI assistants to analyze images using OpenRouter vision models through a simple interface.
    Last updated -
    4
    1
    1
    MIT License
    • Apple
  • -
    security
    A
    license
    -
    quality
    Connects creative applications like Blender and Adobe Creative Suite to AI models through the Model Context Protocol, enabling AI-driven creation, manipulation, and automation within these tools.
    Last updated -
    10
    MIT License
    • Apple

View all related MCP servers

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