Claude Code Integration¶
Setup guide for using napari MCP server with Claude Code - perfect for development workflows and AI-assisted coding.
๐ Quick Setup¶
# 1. Install napari-mcp
pip install napari-mcp
# 2. Auto-configure Claude Code
napari-mcp-install claude-code
# 3. Restart Claude Code (if running)
๐ Configuration Location¶
- All platforms:
~/.claude.json
The CLI installer automatically creates or updates this file.
๐ก Why Use Claude Code with napari?¶
- Development Focus: Perfect for napari plugin development
- Code Context: AI understands your current code and project
- File Integration: Easy image loading from workspace
- Live Testing: Test changes immediately with napari viewer
๐งช Testing¶
After configuration, test with:
๐ป Development Workflows¶
Plugin Development¶
Image Analysis Scripts¶
Documentation¶
๐ง Manual Configuration¶
If needed, manually edit ~/.claude.json
:
{
"mcpServers": {
"napari-mcp": {
"command": "uv",
"args": ["run", "--with", "napari-mcp", "napari-mcp"]
}
}
}
Using Persistent Environment¶
๐ ๏ธ Management¶
# Check installation
napari-mcp-install list
# Update configuration
napari-mcp-install claude-code --force
# Uninstall
napari-mcp-install uninstall claude-code
โ Troubleshooting¶
Configuration Not Loaded¶
Claude Code doesn't see napari tools
Solutions:
-
Verify config file exists:
-
Check JSON syntax:
-
Reinstall:
Environment Issues¶
Module not found errors
Solution: Use persistent mode with your development environment:
๐ Next Steps¶
- Quick Start - Basic workflows
- API Reference - All available tools
- Troubleshooting - Common issues