MCP server for AI-powered Cellpose cell segmentation via Model Context Protocol
SaferSkills independently audited cellpose-mcp (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Cellpose-mcp is a Model Context Protocol (MCP) server that enables AI assistants like Claude, Cursor IDE, etc. to perform cell segmentation through natural language commands. This tool exposes comprehensive Cellpose functionality through 13+ MCP tools, including 2D/3D segmentation, batch processing, image restoration (denoising, deblurring, upsampling), and custom model training. The system integrates seamlessly with Napari, enabling complete workflows from segmentation to interactive visualization.

📌 Note: This project started as a fun project inspired by napari-mcp and adapted for Cellpose segmentation workflows. If you would like to contribute then please get in touch with me at [email protected].
Requirements: Python 3.10 or later (use a virtual environment or conda).
Install from PyPI:
pip install cellpose-mcpInstall and configure for Cursor in one go:
pip install cellpose-mcp && cellpose-mcp-install cursorThe installer uses the Python that runs the command (or a conda env named Cellpose_mcp if present). Restart Cursor after configuring.
Development install (from source):
git clone https://github.com/surajinacademia/cellpose_mcp.git
cd cellpose_mcp
pip install -e .After pip install cellpose-mcp, run the installer for your app. It writes to the correct MCP config file using your current Python.
| Application | Command | Notes |
|---|---|---|
| Cursor IDE | cellpose-mcp-install cursor | Writes to ~/.cursor/mcp.json |
| Claude Desktop | cellpose-mcp-install claude-desktop | Adds to Claude Desktop config |
| Antigravity | cellpose-mcp-install antigravity | Configures Antigravity MCP |
| VS Code (Cline/Roo Cline) | cellpose-mcp-install vscode | Configures Cline/Roo Cline extension |
| Claude Code | Manual only | See Manual Configuration below |
Options: --python-path /path/to/python to use a specific Python; --env-name NAME to use a conda env (default: Cellpose_mcp).
<details> <summary>Manual Configuration for Claude Code</summary>
If you prefer manual setup (or use Claude Code), create a .mcp.json file in your project root. Use the full path to your Python executable if python is not the one that has cellpose-mcp installed (e.g. a venv or conda):
{
"mcpServers": {
"cellpose": {
"command": "python",
"args": ["-m", "cellpose_mcp"],
"env": {
"KMP_DUPLICATE_LIB_OK": "TRUE",
"OMP_NUM_THREADS": "1"
}
}
}
}For Cursor, use the same structure in ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project. </details>
After installation, restart your AI app and try asking:
"Can you list available Cellpose models?"
"Segment the cells in ./data/sample.tif using the cyto2 model"<table> <tr> <td width="50%"> <img src="https://raw.githubusercontent.com/surajinacademia/cellpose_mcp/main/poster/poster_images/img00.png" alt="Original fluorescence microscopy image" /> <p align="center"><em>Original Image: Fluorescence microscopy with green-stained cytoplasm and blue-stained nuclei</em></p> </td> <td width="50%"> <img src="https://raw.githubusercontent.com/surajinacademia/cellpose_mcp/main/poster/poster_images/img00_annotated_overlay.png" alt="Segmented cells with annotations" /> <p align="center"><em>Segmented Result: Cells automatically detected with boundaries and labels</em></p> </td> </tr> </table>
"Segment the cells in ./data/sample.tif using the cyto2 model"
"List available Cellpose models"
"Estimate cell diameter from ./data/image.tif""Segment all TIFF files in ./data/images/ and save masks to ./output/"
"Train a custom segmentation model using images in ./train/images/ and masks in ./train/masks/"
"Restore and segment the noisy image in ./data/noisy.tif using oneclick_cyto3""Process all images in ./data/ with the cyto2 model and save results to ./output/"The server exposes 13+ tools for complete Cellpose functionality:
Key features:
Author: Suraj Sahu Affiliation: Department of Physics, University of California Merced, CA, USA Email: [email protected]
BSD-3-Clause License - see LICENSE file for details.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.