MCP-Slicer

by zhaoyouj

Integrations

  • Provides integration with the Python Package Index for installation of the MCP-Slicer package

MCP-Slicer - 3D Slicer Model Context Protocol Integration

English | 简体中文

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

  1. list_nodes: List and filter Slicer MRML nodes and view their properties
  2. execute_python_code: Execute Python code in the Slicer environment

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

Open Slicer Web Server

  1. Open the Slicer Web Server module,
  2. ensure the required interfaces are checked,
  3. then start the server

Examples

- list_nodes

What Markups nodes are in the Slicer scene now, list their names, what is their length if it is a line, and what is its angle if it is an angle

- execute python code

Draw a translucent green cube of 8 cm in the Slicer scene, mark its vertices, and then draw a red sphere inscribed in it.

Technical Details

Utilizes existing Slicer Web Server interfaces. For technical details, please see Slicer web server user guide

Limitations & Security Considerations

  • The execute_python_code tool allows running arbitrary Python code in 3D Slicer, which is powerful but potentially dangerous.⚠️ Not recommended for production use.
  • Complex operations may need to be broken down into smaller steps.

Contributing

Contributions are welcome! Feel free to submit Pull Requests.

Disclaimer

This is a third-party integration project, not developed by the 3D Slicer team.

You must be authenticated.

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

local-only server

The server can only run on the client's local machine because it depends on local resources.

Connects 3D Slicer with AI assistants through the Model Context Protocol, enabling medical image processing and scene manipulation using natural language.

  1. Features
    1. Installation
      1. Prerequisites
      2. Claude for Desktop Integration
      3. Cline Intergration
    2. Usage
      1. Check Claude Settings
      2. Open Slicer Web Server
    3. Examples
      1. - list_nodes
      2. - execute python code
    4. Technical Details
      1. Limitations & Security Considerations
        1. Contributing
          1. Disclaimer

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables AI assistants to create images and videos using Amazon Nova Canvas and Nova Reel models.
              Last updated -
              2
              Python
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              quality
              Connects Houdini to Claude AI through Model Context Protocol, enabling AI-assisted 3D modeling, scene creation, simulation setup, and rendering through natural language commands.
              Last updated -
              37
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that allows AI assistants to search for, explore, and retrieve 3D printable models from Thingiverse.
              Last updated -
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              Connects Cinema 4D to Claude, enabling AI-assisted 3D modeling and scene manipulation through natural language commands.
              Last updated -
              10
              Python
              MIT License
              • Apple

            View all related MCP servers

            ID: kn2cl0hh2g