1. Conduid
  2. Developer Tools
  3. Napari MCP
MCP server · Developer Tools

Napari MCP

🔬 MCP server for AI-powered napari control. Connect Claude, ChatGPT, Cursor, and other LLMs to napari for interactive image analysis. Perfect for automating microscopy workflows and building intelligent image analysis tools.

Unclaimed BSD-3-Clause last commit 6 months ago mcpnaparimicroscopyllmdevtoolsnapari-pluginfastmcpclaude-desktop
59Fair

Scored yesterday · breakdown

About Napari MCP

Napari MCP is an MCP server published by royerlab in the Developer Tools category: 🔬 MCP server for AI-powered napari control. Connect Claude, ChatGPT, Cursor, and other LLMs to napari for interactive image analysis. Perfect for automating microscopy workflows and building intelligent image analysis tools.

The repository has 46 stars and 7 forks, with the last commit 6 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/royerlab/napari-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Napari MCP

Powered by Claude · Grounded in docs

I know everything about Napari MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository yesterday. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionSource scan found eval or shell execution. Review how tool inputs reach it before granting credentials.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.1.0v0.1.0 · 25 Mar 2026What's Changed Fix GH Actions failures by @ilan-theodoro in https://github.com/royerlab/napari-mcp/pull/36 Full Changelog: https://github.com/royerlab/napari-mcp/compare/v0.0.4...v0.1.0
v0.0.4v0.0.4 · 30 Sep 2025What's Changed feat: LLM Auto-Installation CLI System by @ilan-theodoro in https://github.com/royerlab/napari-mcp/pull/34 Full Changelog: https://github.com/royerlab/napari-mcp/compare/v0.0.3...v0.0.4
v0.0.3v0.0.3 · 19 Sep 2025What's Changed Expose timelapse screenshot tool for multitemporal data (#27) by @ilan-theodoro in https://github.com/royerlab/napari-mcp/pull/32 Refactor: unification of tool calls across standalone server and widget by @ilan-theodoro in…
v0.0.2v0.0.2 · 16 Sep 2025What's Changed refactor: remove redundant GUI control tools; start GUI in init_viewer by @ilan-theodoro in https://github.com/royerlab/napari-mcp/pull/22 Align tests to FastMCP Image screenshot; fix no-viewer checks by @ilan-theodoro in…
v0.0.1-alpha0v0.0.1-alpha0 · 15 Sep 2025

README

Napari MCP Server

Tests codecov PyPI version

MCP server for remote control of napari viewers via Model Context Protocol (MCP). Perfect for AI-assisted microscopy analysis with Claude Desktop and other LLM applications.

https://github.com/user-attachments/assets/d261674c-9875-4671-8c60-a7f49d6f1b84

🚀 Quick Start (3 Steps)

1. Install the Package

pip install napari-mcp

2. Auto-Configure Your AI Application

# For Claude Desktop
napari-mcp-install install claude-desktop

# Include a napari GUI backend in the uv environment
napari-mcp-install install claude-desktop --backend pyqt6

# For other applications (Claude Code, Cursor, Cline, etc.)
napari-mcp-install install --help  # See all options

3. Restart Your Application & Start Using

Restart your AI app and you're ready! Try asking:

"Can you call session_information() to show my napari session details?"

→ See Full Documentation for detailed guides

🔌 Using as a napari Plugin

napari-mcp can also be used as a napari plugin for direct integration with a running napari session:

  1. Start napari normally: napari
  2. Open the widget: Plugins → napari-mcp: MCP Server Control
  3. Click "Start Server" to expose your current session to AI assistants
  4. Connect your AI app using the standard installer: napari-mcp-install install <app>

This mode enables AI assistants to control your current napari session rather than starting a new viewer. Perfect for integrating with existing workflows!

→ See Plugin Guide for detailed instructions

🎯 What Can You Do?

Basic Image Analysis

"Load the image from ./data/sample.tif and apply a viridis colormap"
"Create point annotations at coordinates [[100,100], [200,200]]"
"Take a screenshot and save it"

Advanced Workflows

"Execute this code to create a filtered version:
from scipy import ndimage
filtered = ndimage.gaussian_filter(viewer.layers[0].data, sigma=2)
viewer.add_image(filtered, name='filtered')"

"Install scikit-image and segment the cells in this microscopy image"

3D/4D Navigation

"Switch to 3D display mode"
"Navigate to time point 5, Z-slice 10"
"Create a rotating animation of this volume"

Automated Workflows

Want to automate image processing with Python scripts? Use any LLM (OpenAI, Anthropic, etc.) with napari MCP:

→ See Python Integration Examples for batch processing and workflow automation

🤖 Supported AI Applications

Application Command Status
Claude Desktop napari-mcp-install install claude-desktop ✅ Full Support
Claude Code napari-mcp-install install claude-code ✅ Full Support
Cursor IDE napari-mcp-install install cursor ✅ Full Support
Cline (VS Code) napari-mcp-install install cline-vscode ✅ Full Support
Cline (Cursor) napari-mcp-install install cline-cursor ✅ Full Support
Gemini CLI napari-mcp-install install gemini ✅ Full Support
Codex CLI napari-mcp-install install codex ✅ Full Support

→ See Integration Guides for application-specific instructions

🛠 Available MCP Tools

The server exposes 16 tools for complete napari control:

Core Functions

  • Session Management: init_viewer, close_viewer, session_information
  • Layer Operations: add_layer, list_layers, get_layer, remove_layer, set_layer_properties, reorder_layer, apply_to_layers, save_layer_data
  • Viewer Controls: configure_viewer
  • Utilities: screenshot, execute_code, install_packages, read_output

⚠️ Security Notice

!!! warning "Code Execution Capabilities" This server includes powerful tools that allow arbitrary code execution:

- **`execute_code()`** - Runs Python code in the server environment
- **`install_packages()`** - Installs packages via pip

The bridge server binds to `127.0.0.1` (localhost only) with no authentication.
Any local process can invoke these tools.

**Use only with trusted AI assistants on local networks.**
Never expose to public internet without proper sandboxing.

📖 Documentation

🧪 Development Setup


# Clone repository
git clone https://github.com/royerlab/napari-mcp.git
cd napari-mcp

# Install with development dependencies
pip install -e ".[dev]"

# Run tests
pytest -m "not realgui"  # Skip GUI tests
pytest --cov=src --cov-report=html  # With coverage

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run pre-commit hooks: pre-commit run --all-files
  5. Commit changes (git commit -m 'Add amazing feature')
  6. Push to branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

📋 Architecture

  • state.py — ServerState holding all mutable state (viewer, locks, execution namespace)
  • server.py — create_server(state) factory; tools defined as closures over state
  • qt_helpers.py — Qt application and viewer lifecycle management
  • output.py — Output truncation utility
  • bridge_server.py — Plugin bridge server (overrides 3 tools for Qt thread safety)
  • viewer_protocol.py — ViewerProtocol for typed viewer backends
  • cli/ — napari-mcp-install CLI for configuring AI applications

Key features:

  • Thread-safe: All napari operations are serialized
  • Non-blocking: Qt event loop runs asynchronously
  • Stateful: Maintains viewer state across tool calls
  • Extensible: Easy to add new tools

📚 Resources

📄 License

BSD-3-Clause License - see LICENSE file for details.

🙏 Acknowledgments


Built with ❤️ for the microscopy and AI communities

README fetched from the repository yesterday. The original is authoritative.

Questions

About Napari MCP

How do I install Napari MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Napari MCP safe to use with an AI agent?

Its trust score is 59 out of 100 (fair). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Napari MCP still maintained?

The last commit was 6 months ago and 5 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.