MCP-Slicer
Integrates 3D Slicer with model clients via MCP, allowing natural language control for medical image processing and scene manipulation.
MCP-Slicer - 3D Slicer Model Context Protocol Integration
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
-
list_nodes: List and filter Slicer MRML nodes and view their properties
-
execute_python_code: Execute Python code in the Slicer environment
-
capture_screenshot: Capture real-time screenshots of Slicer views
- Full application window (including module panels)
- Individual slice views (Red/Yellow/Green)
- 3D rendering view
- Enables complete REACT loop with visual feedback
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
Make sure you see the corresponding slicer tools added to the Claude Desktop App
Open Slicer Web Server
- Open the Slicer Web Server module,
- ensure the required interfaces are checked,
- 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.
- capture_screenshot
Capture the current state of Slicer to provide visual feedback to AI
Usage examples:
capture_screenshot()- Capture full application windowcapture_screenshot(view_type="slice", view_name="red")- Capture Red slice viewcapture_screenshot(view_type="3d", camera_axis="A")- Capture 3D view from anterior
This enables a complete REACT loop where AI can:
- Reason about what to do
- Act using
execute_python_code - Observe the result using
capture_screenshot
Technical Details
Utilizes existing Slicer Web Server interfaces. For technical details, please see Slicer web server user guide
Limitations & Security Considerations
-
The
execute_python_codetool 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.
相關伺服器
Scout Monitoring MCP
贊助Put performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
贊助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
MapleStory MCP Server
Access NEXON MapleStory open API data for character info, union details, guild data, rankings, and game mechanics.
Agent VRM MCP Server
A server that provides VRM avatar functionality for Large Language Models (LLMs) by connecting to an AgentVRM engine.
Chess FEN MCP Server
Validate and visualize chess positions using FEN notation.
Remote Terminal MCP for Cursor
A remote terminal tool for Cursor to manage and connect to remote servers via SSH, jump hosts, and Docker containers.
Tenets
Offline MCP server that ranks & summarizes code using BM25, TF-IDF, embeddings & git signals; integrates with Cursor, Claude Desktop and Windsurf; privacy preserving.
MCPizer
Enables AI assistants to call any REST API or gRPC service by automatically converting their schemas into MCP tools.
SVG to PNG MCP Server
A server that converts SVG code to PNG images using the cairosvg library.
Luma AI MCP Server
Generate and manipulate AI videos and images using Luma AI's Dream Machine API.
GoPeak
The most comprehensive MCP server for Godot Engine. 95+ tools for scene management, GDScript LSP, DAP debugging, screenshot capture, input injection, and CC0 asset library.
MalwareAnalyzerMCP
Execute terminal commands for malware analysis. Requires Node.js 18 or higher.