MCP-Slicer is an MCP server that connects 3D Slicer to AI model clients such as Claude Desktop and Cline through the Model Context Protocol. Medical researchers, biomedical imaging specialists, and healthcare software developers use it to interact with 3D Slicer scenes using natural language instructions. The server interfaces with the 3D Slicer Web Server to inspect scene nodes, execute custom Python commands inside the active application session, and retrieve visual feedback across multiple viewports. By providing access to MRML nodes, users can query active markup geometries, inspect slice measurements, and generate complex synthetic shapes such as models and spheres within the 3D environment. In addition, MCP-Slicer exposes real-time screen-capture capabilities for full application layouts, individual red, yellow, and green slice viewports, and dedicated 3D camera angles. These capabilities enable reasoning loops where an LLM issues code, evaluates the visual results, and refines downstream tasks without manual UI intervention. Because arbitrary code execution is enabled in the host runtime, the tool is primarily designated for local research, prototyping, and developer workflows.
Category: Design, Media & Creative
Tags: 3d-modeling, 3d-slicer, image-processing, medical-imaging
uv package manager on your system. 3. Open 3D Slicer, navigate to the Slicer Web Server module, verify required interfaces are checked, and start the web server. 4. To configure Claude Desktop, open claude_desktop_config.json via Settings > Developer > Edit Config, and add the following entry: json { "mcpServers": { "slicer": { "command": "uvx", "args": ["mcp-slicer"] } } } 5. For Cline, add the same slicer definition into your Cline MCP configuration. 6. Restart your MCP client and confirm list_nodes, execute_python_code, and capture_screenshot appear in the tools menu.Part of MCP Servers
MCP-Slicer enables model clients to interact directly with 3D Slicer. It exposes tools to inspect and filter MRML nodes and properties, execute arbitrary Python code directly within the running Slicer session, and capture real-time screenshots of slice views or 3D camera angles for AI visual inspection.
Installation requires Python 3.13 or newer, 3D Slicer 5.8 or newer, and the uv package manager. You configure your client, such as Claude Desktop, to run the command uvx with the argument mcp-slicer. You must also start the Slicer Web Server module within 3D Slicer before connecting.
MCP-Slicer works with MCP-compliant clients including Claude Desktop and Cline. Any development environment or agent interface that supports configuring local command-based Model Context Protocol servers can launch the server through the uvx execution command.
No, MCP-Slicer is explicitly not recommended for production use. The execute_python_code tool permits the execution of arbitrary Python code inside your running 3D Slicer runtime, which provides significant control but poses security risks if connected without human oversight or used on untrusted networks.
Yes, MCP-Slicer is open source and licensed under the MIT license. Its codebase is hosted on GitHub, where developers can inspect the implementation, review integrations with the 3D Slicer Web Server, submit issue reports, and contribute pull requests.