Node listing tells you what is loaded and execute_python_code does the work, but the third tool closes the loop: the model can see the current interface — panels, slice views, the 3D rendering, overlays — and act on what it sees rather than on what it assumed happened. One convention to know before the first call: execute_python_code returns nothing unless the code assigns its result to a variable named __execResult.
A three-tool bridge into 3D Slicer over its Web Server API — scene listing, Python execution and screenshots.
- list_nodes across the MRML scene, returning names, IDs or properties and filterable by class_name, name and id
- execute_python_code inside Slicer's own Python environment, returning whatever the code assigns to __execResult
- capture_screenshot of the whole application window including dock widgets and slice views, or of one named view, with the camera axis and image size selectable
3D Slicer running with its Web Server enabled — all three tools reach it through the Slicer Web Server API.
One command — uvx mcp-slicer
