{"name":"napari-mcp","display_name":"Napari MCP","visibility":"public","icon":"","categories":[],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-mcp.mcp_control_widget","title":"MCP Server Control","python_name":"napari_mcp.widget:MCPControlWidget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-mcp.mcp_control_widget","display_name":"MCP Server Control","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"napari-mcp","version":"0.0.4","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"MCP server for remote control of napari viewers via Model Context Protocol","description":"# Napari MCP Server\n\n[![Tests](https://github.com/royerlab/napari-mcp/workflows/Tests/badge.svg)](https://github.com/royerlab/napari-mcp/actions)\n[![codecov](https://codecov.io/gh/royerlab/napari-mcp/graph/badge.svg?token=E1WY58V877)](https://codecov.io/gh/royerlab/napari-mcp)\n[![PyPI version](https://badge.fury.io/py/napari-mcp.svg)](https://badge.fury.io/py/napari-mcp)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nMCP 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.\n\n## 🚀 Quick Start (3 Steps)\n\n### 1. Install the Package\n\n```bash\npip install napari-mcp\n```\n\n### 2. Auto-Configure Your AI Application\n\n```bash\n# For Claude Desktop\nnapari-mcp-install claude-desktop\n\n# For other applications (Claude Code, Cursor, Cline, etc.)\nnapari-mcp-install --help  # See all options\n```\n\n### 3. Restart Your Application & Start Using\n\nRestart your AI app and you're ready! Try asking:\n```\n\"Can you call session_information() to show my napari session details?\"\n```\n\n**→ See [Full Documentation](https://napari-mcp.readthedocs.io) for detailed guides**\n\n## 🎯 What Can You Do?\n\n### Basic Image Analysis\n```\n\"Load the image from ./data/sample.tif and apply a viridis colormap\"\n\"Create point annotations at coordinates [[100,100], [200,200]]\"\n\"Take a screenshot and save it\"\n```\n\n### Advanced Workflows\n```\n\"Execute this code to create a filtered version:\nfrom scipy import ndimage\nfiltered = ndimage.gaussian_filter(viewer.layers[0].data, sigma=2)\nviewer.add_image(filtered, name='filtered')\"\n\n\"Install scikit-image and segment the cells in this microscopy image\"\n```\n\n### 3D/4D Navigation\n```\n\"Switch to 3D display mode\"\n\"Navigate to time point 5, Z-slice 10\"\n\"Create a rotating animation of this volume\"\n```\n\n### Automated Workflows\nWant to automate image processing with Python scripts? Use any LLM (OpenAI, Anthropic, etc.) with napari MCP:\n\n**→ See [Python Integration Examples](docs/examples/README.md)** for batch processing and workflow automation\n\n## 🤖 Supported AI Applications\n\n| Application | Command | Status |\n|-------------|---------|--------|\n| **Claude Desktop** | `napari-mcp-install claude-desktop` | ✅ Full Support |\n| **Claude Code** | `napari-mcp-install claude-code` | ✅ Full Support |\n| **Cursor IDE** | `napari-mcp-install cursor` | ✅ Full Support |\n| **Cline (VS Code)** | `napari-mcp-install cline-vscode` | ✅ Full Support |\n| **Cline (Cursor)** | `napari-mcp-install cline-cursor` | ✅ Full Support |\n| **Gemini CLI** | `napari-mcp-install gemini` | ✅ Full Support |\n| **Codex CLI** | `napari-mcp-install codex` | ✅ Full Support |\n\n**→ See [Integration Guides](docs/integrations/index.md) for application-specific instructions**\n\n## 🛠 Available MCP Tools\n\nThe server exposes 20+ tools for complete napari control:\n\n### Core Functions\n- **Session Management**: `detect_viewers`, `init_viewer`, `close_viewer`, `session_information`\n- **Layer Operations**: `add_image`, `add_labels`, `add_points`, `list_layers`, `remove_layer`\n- **Viewer Controls**: `set_camera`, `reset_view`, `set_ndisplay`, `set_dims_current_step`\n- **Utilities**: `screenshot`, `execute_code`, `install_packages`\n\n**→ See [API Reference](docs/api/index.md) for complete documentation**\n\n## ⚠️ Security Notice\n\n!!! warning \"Code Execution Capabilities\"\n    This server includes powerful tools that allow arbitrary code execution:\n\n    - **`execute_code()`** - Runs Python code in the server environment\n    - **`install_packages()`** - Installs packages via pip\n\n    **Use only with trusted AI assistants on local networks.**\n    Never expose to public internet without proper sandboxing.\n\n## 📖 Documentation\n\n- **[Quick Start Guide](docs/getting-started/quickstart.md)** - Get running in 3 minutes\n- **[Installation Options](docs/getting-started/installation.md)** - Advanced installation methods\n- **[Integration Guides](docs/integrations/index.md)** - Setup for specific AI applications\n- **[Python Examples](docs/examples/README.md)** - Automate workflows with custom scripts\n- **[Troubleshooting](docs/guides/troubleshooting.md)** - Common issues and solutions\n- **[API Reference](docs/api/index.md)** - Complete tool documentation\n\n## 🧪 Development Setup\n\n```bash\n# Clone repository\ngit clone https://github.com/royerlab/napari-mcp.git\ncd napari-mcp\n\n# Install with development dependencies\npip install -e \".[test,dev]\"\n\n# Run tests\npytest -m \"not realgui\"  # Skip GUI tests\npytest --cov=src --cov-report=html  # With coverage\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes with tests\n4. Run pre-commit hooks: `pre-commit run --all-files`\n5. Commit changes (`git commit -m 'Add amazing feature'`)\n6. Push to branch (`git push origin feature/amazing-feature`)\n7. Open a Pull Request\n\n## 📋 Architecture\n\n- **FastMCP Server**: Handles MCP protocol communication\n- **Napari Integration**: Manages viewer lifecycle and operations\n- **Qt Event Loop**: Asynchronous GUI event processing\n- **Tool Layer**: Exposes napari functionality as MCP tools\n- **External Bridge**: Optional connection to existing napari viewers\n\nKey features:\n- **Thread-safe**: All napari operations are serialized\n- **Non-blocking**: Qt event loop runs asynchronously\n- **Stateful**: Maintains viewer state across tool calls\n- **Extensible**: Easy to add new tools\n\n## 📚 Resources\n\n- **[napari](https://napari.org/)** - Multi-dimensional image viewer\n- **[Model Context Protocol](https://modelcontextprotocol.io/)** - MCP specification\n- **[FastMCP](https://github.com/jlowin/fastmcp)** - Python MCP framework\n- **[Claude Desktop](https://claude.ai/download)** - AI assistant with MCP support\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [napari team](https://napari.org/) for the excellent imaging platform\n- [FastMCP](https://github.com/jlowin/fastmcp) for the MCP framework\n- [Anthropic](https://www.anthropic.com/) for Claude and MCP development\n- [astral-sh](https://astral.sh/) for uv dependency management\n\n---\n\n**Built with ❤️ for the microscopy and AI communities**\n","description_content_type":"text/markdown","keywords":"napari,mcp,microscopy,image-analysis,ai,claude","home_page":null,"download_url":null,"author":null,"author_email":"Ilan Theodoro <ilan.silva@czbiohub.org>","maintainer":null,"maintainer_email":"Ilan Theodoro <ilan.silva@czbiohub.org>","license":"MIT","classifier":["Development Status :: 3 - Alpha","Framework :: napari","Intended Audience :: Science/Research","Intended Audience :: Developers","License :: OSI Approved :: MIT License","Operating System :: OS Independent","Programming Language :: Python :: 3","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13","Topic :: Scientific/Engineering :: Image Processing","Topic :: Scientific/Engineering :: Visualization","Topic :: Software Development :: Libraries :: Python Modules"],"requires_dist":["fastmcp>=2.10.3","napari>=0.5.5","pyqt6>=6.5.0","qtpy>=2.4.1","Pillow>=10.3.0","imageio>=2.34.0","numpy>=1.26.0","typer>=0.9.0","rich>=13.0.0","toml>=0.10.2","pytest>=8.4.0; extra == \"test\"","pytest-asyncio>=0.23.0; extra == \"test\"","pytest-cov>=4.0.0; extra == \"test\"","pytest-qt>=4.0.0; extra == \"test\"","pytest-xdist>=3.5.0; extra == \"test\"","pytest-timeout>=2.2.0; extra == \"test\"","pytest-benchmark>=4.0.0; extra == \"test\"","pytest-mock>=3.12.0; extra == \"test\"","pytest-random-order>=1.1.0; extra == \"test\"","pytest-forked>=1.6.0; extra == \"test\"","hypothesis>=6.100.0; extra == \"test\"","napari[pyqt6,testing]; extra == \"test\"","tox; extra == \"test\"","ruff>=0.12.10; extra == \"dev\"","mypy>=1.17.0; extra == \"dev\"","types-toml>=0.10.8.20240310; extra == \"dev\"","types-Pillow>=10.0.0; extra == \"dev\"","pre-commit>=4.3.0; extra == \"dev\"","bandit>=1.8.6; extra == \"dev\"","black>=24.0.0; extra == \"dev\"","napari-mcp[dev,test]; extra == \"all\""],"requires_python":">=3.10","requires_external":null,"project_url":["Homepage, https://github.com/royerlab/napari-mcp","Repository, https://github.com/royerlab/napari-mcp","Documentation, https://github.com/royerlab/napari-mcp#readme","Bug Tracker, https://github.com/royerlab/napari-mcp/issues","Changelog, https://github.com/royerlab/napari-mcp/blob/main/CHANGELOG.md"],"provides_extra":["test","dev","all"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}