3D Slicer Integration
STDIOConnects 3D Slicer with model clients for medical image processing through MCP protocol.
Connects 3D Slicer with model clients for medical image processing through MCP protocol.
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.
list_nodes: List and filter Slicer MRML nodes and view their properties
execute_python_code: Execute Python code in the Slicer environment
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
Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following:
{ "mcpServers": { "slicer": { "command": "uvx", "args": ["mcp-slicer"] } } }
{ "mcpServers": { "slicer": { "command": "uvx", "args": ["mcp-slicer"] } } }
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
Draw a translucent green cube of 8 cm in the Slicer scene, mark its vertices, and then draw a red sphere inscribed in it.
Utilizes existing Slicer Web Server interfaces. For technical details, please see Slicer web server user guide
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.
Contributions are welcome! Feel free to submit Pull Requests.
This is a third-party integration project, not developed by the 3D Slicer team.