- Home
- MCP servers
- MCP Slicer
MCP Slicer
- python
26
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"zhaoyouj-mcp-slicer": {
"command": "uvx",
"args": [
"mcp-slicer"
]
}
}
}You can connect 3D Slicer to model clients through the Model Context Protocol (MCP) to directly control image processing, scene creation, and visualization from natural-language or scripted interactions. This MCP server lets you send commands to Slicer, inspect its scene, run Python in the Slicer environment, and capture visual feedback for a complete AI-assisted workflow.
How to use
You use this MCP server by running it locally and connecting your MCP client (for example Claude Desktop or Cline) to the provided interface. Start the local MCP server, then issue actions from your client such as listing nodes in the Slicer scene, executing Python code inside Slicer, or capturing screenshots for visual feedback. The server enables a REACT-like loop where reasoning, acting, and observing guide the workflow.
How to install
Prerequisites include 3D Slicer 5.8 or newer, Python 3.13 or newer, and the uv package manager. Install uv first to ensure smooth startup.
# Install uv (example for macOS)
brew install uv
# On Windows, install uv
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
set Path=C:\Users\nntra\.local\bin;%Path%
MCP server configuration
Configure your MCP client to launch the slicer MCP server using the stdio method. The server runs as a local process and uses uvx to start the MCP pipeline.
{
"mcpServers": {
"slicer": {
"command": "uvx",
"args": ["mcp-slicer"]
}
}
}
Available tools
list_nodes
List and filter Slicer MRML nodes and view their properties to understand the current scene state.
execute_python_code
Run Python code inside the Slicer environment to manipulate data, create or modify nodes, and perform processing.
capture_screenshot
Capture real-time screenshots of Slicer views to provide visual feedback during an interaction loop.