label-image-mcp is a server based on the MCP protocol, designed to connect AI assistants (such as Claude) with the image annotation tool Image Label, enabling annotation of histopathology and other images through conversation. Its core goal is to turn H&E slides into training data, with a workflow that includes nuclei detection, region delineation, slide quality control, and data export.
Main capabilities:
- Automatic nuclei detection: uses the StarDist pretrained H&E model, requires no GPU, and can identify nuclei and generate outlines.
- Region delineation: uses Segment Anything or MedSAM (for medical images) to precisely delineate target regions such as glands and cell nests from rough bounding boxes or point prompts.
- Slide quality control: provides stain normalization and quality check features.
- Annotation cleanup: supports replacing or removing annotations to ensure clean data.
- Data export: can export annotation results as COCO JSON, YOLO labels, or QuPath GeoJSON format for subsequent training or analysis.
- Built-in LangGraph agent: provides a terminal chat agent that can call these tools.
Usage:
- Can be tried as a guest without an account; the server generates a guest identity and saves it locally.
- An account can be used by setting the environment variables LABEL_USERNAME and LABEL_PASSWORD, or guest mode can be disabled by setting LABEL_GUEST=0.
- In Claude Desktop, download the latest version of the label-image-mcp.mcpb file and open it; leaving the username and password blank starts it as a guest.
- For other MCP clients, uv needs to be installed and run via the command line.
- HTTP mode is supported and can be started with the --http parameter, making it easy for multiple clients to share a single server instance.
Applicable scenarios:
- Whole-slide imaging (WSI), digital pathology, computational pathology, bioinformatics.
- Tumor microenvironment (TME) analysis, including tumor, immune, and stromal cell types and the immune-to-tumor ratio.
- MLOps data annotation, generating training data in COCO, YOLO, and QuPath formats.
- Nuclei and cell segmentation, cell classification, medical image annotation, stain normalization and slide quality control, cancer research, computer vision dataset construction.
Limitations and notes:
- Nuclei detectionaccuracy varies by tissue type, performing better on human tissue (F1 0.67), lower on mouse tissue (0.50-0.53), and weaker on tissues such as umbilical cord, brain, mouse heart, and skeleton (0.13-0.34). The model is a StarDist pretrained H&E model, not trained on the NuInsSeg dataset, and reviewing contours before use is recommended.
- The cell classification feature has not yet been benchmarked.
- Region outlining was validated only on a small private test set and has not yet been quantitatively compared with expert outlines.
- Uploaded images are stored in AWS us-east-1, private to the account, automatically deleted after 90 days, stored and transmitted encrypted, not used to train models, and not sent to other AI services.
- Do not upload patient-identifying information; results are for research and educational use only and are not for diagnosis.
- Other image size limit is 20 MB.
- There is no tool to delete images.
The tool has been published as the PyPI package label-image-mcp and the MCP Registry entry io.github.sachinbkale27/label-image-mcp. More use cases and setup guides can be found at https://labels.sachin-kale.com/mcp。