Run napari MCP server without permanent installation using uv - perfect for testing, CI/CD, and clean deployments.
!!! tip "CLI Installer Uses This Automatically"
The Quick Start CLI installer (napari-mcp-install) automatically configures your AI app to use zero-install with uv. This guide explains how it works and provides manual alternatives.
Zero install means running napari MCP without permanently installing it on your system. Instead, uv downloads dependencies to a temporary cache and runs the server in an ephemeral environment.
- ✅ No permanent installation - Nothing added to your Python environment
- ✅ Always up-to-date - Gets latest version from PyPI each time
- ✅ Clean environments - No dependency conflicts
- ✅ Easy sharing - Same command works everywhere
- ✅ CI/CD friendly - Reproducible deployments
When you use napari-mcp-install, it creates a configuration that runs:
uv run --with napari-mcp napari-mcpThis command:
- Downloads napari-mcp and dependencies to uv's cache
- Creates a temporary isolated environment
- Runs the server
- Cleans up when done
The CLI installer handles everything:
# Install the package (contains the CLI tool)
pip install napari-mcp
# Auto-configure your application
napari-mcp-install install claude-desktop # or claude-code, cursor, etc.This creates a configuration file with:
{
"mcpServers": {
"napari-mcp": {
"command": "uv",
"args": ["run", "--with", "napari-mcp", "napari-mcp"]
}
}
}→ See Quick Start for step-by-step instructions
If you prefer manual setup or need custom configurations:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# With pip
pip install uv# Run directly to test
uv run --with napari-mcp napari-mcpManually add to your application's config file:
Example for Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"napari-mcp": {
"command": "uv",
"args": ["run", "--with", "napari-mcp", "napari-mcp"]
}
}
}→ See Advanced Installation for all config file locations
# Include extra packages
uv run --with napari-mcp --with scikit-image --with scipy napari-mcpConfigure in your app:
{
"mcpServers": {
"napari-mcp": {
"command": "uv",
"args": [
"run",
"--with", "napari-mcp",
"--with", "scikit-image",
"--with", "scipy",
"napari-mcp"
]
}
}
}# Pin specific version
uv run --with "napari-mcp==0.1.0" napari-mcp{
"mcpServers": {
"napari-mcp": {
"command": "uv",
"args": ["run", "--with", "napari-mcp==0.1.0", "napari-mcp"]
}
}
}# Verbose output
uv run -v --with napari-mcp napari-mcpThe CLI installer supports both zero-install and persistent modes:
napari-mcp-install install claude-desktopCreates configuration using uv run (zero-install mode).
# First install napari-mcp in your environment
pip install napari-mcp
# Then configure with persistent mode
napari-mcp-install install claude-desktop --persistentThis uses your Python environment instead of uv:
{
"mcpServers": {
"napari-mcp": {
"command": "python",
"args": ["-m", "napari_mcp.server"]
}
}
}uv caches dependencies, so subsequent runs are faster:
# First run (downloads dependencies)
uv run --with napari-mcp napari-mcp # ~10-30 seconds
# Subsequent runs (uses cache)
uv run --with napari-mcp napari-mcp # ~2-5 seconds# Pre-download dependencies
uv run --with napari-mcp --with napari --help
# Now actual runs will be faster| Aspect | Zero Install (uv) | Persistent Install |
|---|---|---|
| Setup time | Instant | 5-10 minutes |
| Disk usage | Temporary cache | Permanent |
| Dependencies | Auto-managed | Manual |
| Updates | Automatic | Manual upgrade |
| Conflicts | Isolated | Can conflict |
| Development | Limited | Excellent |
| CI/CD | Perfect | Needs setup |
- Testing napari MCP for the first time
- Don't want to permanently install anything
- Need consistent versions across team/CI
- Want automatic updates
- Running in clean/temporary environments
- Developing napari plugins
- Need offline access
- Require specific/custom dependencies
- Performance is critical (avoid startup time)
- Want full control over environment
!!! failure "uv: command not found"
Solution: Install uv:
bash curl -LsSf https://astral.sh/uv/install.sh | sh # Restart terminal
!!! note "First run is slow" Expected: uv downloads dependencies on first run (~10-30 seconds). Subsequent runs use cache and are much faster (~2-5 seconds).
!!! failure "Can't download dependencies"
Solutions:
1. Check internet connection
2. Check firewall/proxy settings
3. Use persistent mode instead:
bash pip install napari-mcp napari-mcp-install install <app> --persistent
!!! failure "Dependencies seem outdated" Solution: Clear uv cache: ```bash uv cache clean
# Then try again
uv run --with napari-mcp napari-mcp
```
# Check which mode is configured
napari-mcp-install list
# Switch to zero-install mode
napari-mcp-install install <app>
# Switch to persistent mode
napari-mcp-install install <app> --persistent
# Preview changes
napari-mcp-install install <app> --dry-runConfigure behavior via environment variables:
# Increase timeout for slow networks
export UV_HTTP_TIMEOUT=300
# Use specific Python version
export UV_PYTHON=python3.11
# Verbose logging
export UV_LOG_LEVEL=debugAdd to config:
{
"mcpServers": {
"napari-mcp": {
"command": "uv",
"args": ["run", "--with", "napari-mcp", "napari-mcp"],
"env": {
"UV_HTTP_TIMEOUT": "300"
}
}
}
}Zero install is perfect for CI/CD:
# .github/workflows/test.yml
jobs:
test:
steps:
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Run napari MCP tests
run: uv run --with napari-mcp napari-mcp --helpNo need to install dependencies - uv handles everything!
- Quick Start - Automated setup with CLI installer
- Advanced Installation - Manual configuration and development
- Integration Guides - Application-specific setup
- Troubleshooting - Common issues
Zero install = Zero hassle! 🎉 The CLI installer uses this automatically for clean, reproducible deployments.