Skip to main content

Image Label MCP server

An MCP server for Image Label, a free image annotation tool. It lets Claude and other AI assistants list and upload your images, add or clean up annotations, and export COCO or YOLO training data. A LangGraph agent is included.

Use cases and setup guide: https://labels.sachin-kale.com/mcp

LangGraph agent (label-image-agent)      Claude Desktop / Claude Code / any MCP client
              │  langchain-mcp-adapters             │
              └──────────────┬──────────────────────┘
                             ▼
                    label-image-mcp (stdio or HTTP)
                             │
                             ▼
                 Image Label API  (/api/images ...)

Account

The tools need an Image Label account (request one). They see, change and upload only images saved to that account; without one they see no images. Work kept only in your browser is not visible to them.

Install

Claude Desktop: download label-image-mcp.mcpb from the latest release, open it, and enter your username and password when asked.

Claude Code:

claude mcp add label-image -e LABEL_USERNAME=... -e LABEL_PASSWORD=... -- uvx label-image-mcp

Any MCP client (needs uv):

{
  "mcpServers": {
    "label-image": {
      "command": "uvx",
      "args": ["label-image-mcp"],
      "env": { "LABEL_USERNAME": "...", "LABEL_PASSWORD": "..." }
    }
  }
}

Agent skill

skills/label-image/SKILL.md teaches the agent when and how to use these tools: which annotation types end up in exports, cleaning up labels safely, and merging per-image exports into one COCO or YOLO dataset with consistent class ids (bundled scripts/merge_exports.py). It follows the open SKILL.md format, so it works in Claude Code and other agents that support skills.

# Claude Code: install for all your projects (or copy into a project's .claude/skills/)
git clone --depth 1 https://github.com/sachinbkale27/label-image-mcp /tmp/label-image-mcp
mkdir -p ~/.claude/skills && cp -r /tmp/label-image-mcp/skills/label-image ~/.claude/skills/

Configuration

Variable Default Purpose
LABEL_USERNAME / LABEL_PASSWORD unset Account credentials. Without them the tools see no images
LABEL_API_URL https://labels.sachin-kale.com/api API base URL, for another deployment or sam local start-api

Tools

Tool What it does
list_images(category?) Image summaries with annotation counts
get_image(image_id) Metadata, annotations and a signed viewing URL
update_image_metadata(image_id, name?, category?, sub_category?, description?) Edit image details
add_annotations(image_id, annotations) Append pins, polygons, circles, rectangles or arrows
replace_annotations(image_id, annotations) Replace all annotations
remove_annotations(image_id, annotation_ids) Remove annotations by id
upload_image(path, name?, category?, description?) Upload a local image file
upload_image_from_url(url, name?, category?, description?) Download an image from an https URL (up to 20 MB) and upload it
segment_objects(image_id, objects, model?, save?) Trace exact outlines with Segment Anything from a rough box or a point per object, and save them as polygons. model: sam (photos) or medsam (CT, MRI, X-ray, ultrasound, endoscopy, pathology; boxes only)
export_annotations(image_id, format) COCO JSON or YOLO, same output as the web app's export

There is deliberately no tool for deleting images.

segment_objects calls the API's POST /images/{id}/segment, which runs SAM (facebook/sam-vit-base) or MedSAM (wanglab/medsam-vit-base) in a Lambda container (backend/segment). After a quiet spell the model takes a while to start; the client retries then. Results are for research and dataset building, not diagnosis.

HTTP mode

label-image-mcp --http [--host 127.0.0.1] [--port 8765] serves Streamable HTTP at http://HOST:PORT/mcp, so several clients can share one running server:

claude mcp add --transport http label-image http://127.0.0.1:8765/mcp

Hosted mode

label-image-mcp --http --hosted --host 0.0.0.0 is for running the server remotely, for example on AWS Lambda behind the Lambda Web Adapter. It keeps no session state, answers with JSON, and requires Authorization: Bearer <token> on every request; with no token configured it refuses all requests.

Variable Purpose
MCP_AUTH_TOKEN The bearer token clients must send
LABEL_CREDENTIALS_SECRET AWS Secrets Manager secret with username, password and mcp_token, instead of the variables above
LABEL_UPLOAD_URL_HOSTS Comma-separated hosts upload_image_from_url may download from (recommended when hosted)

LangGraph agent

A terminal chat agent that uses these tools. The graph is START → agent ⇄ tools, with conversation memory kept for the session.

uv tool install "label-image-mcp[agent]"
export ANTHROPIC_API_KEY=... LABEL_USERNAME=... LABEL_PASSWORD=...
label-image-agent
Variable Default Purpose
LABEL_AGENT_MODEL anthropic:claude-sonnet-5-5 Model as provider:model, e.g. openai:gpt-4.1 or ollama:llama3.1 (install langchain-openai / langchain-ollama)
LABEL_MCP_URL unset Connect to a running HTTP server instead of starting one

Development

uv sync --extra agent
uv run pytest
npx @modelcontextprotocol/inspector uv run label-image-mcp

In the Image Label app repo, ./start.sh runs this server in HTTP mode next to the web app. It reads credentials from mcp-server/.env. Releases are described in PUBLISHING.md.

License

MIT

Metadata

Release files for label-image-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for label-image-mcp 0.2.0
File Size Uploaded Provenance
label_image_mcp-0.2.0.tar.gz 217.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for label-image-mcp 0.2.0
File Interpreter ABI Platform
label_image_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 234.7 kB

Release files / label_image_mcp-0.2.0.tar.gz

Download URL label_image_mcp-0.2.0.tar.gz
Size 217.9 kB
Tags Source
SHA-256 checksum
How to use checksums
736ee72b29c5af6fdfec6a4217355bec6984ee15e79803d9c5548cb010f7e37d
BLAKE2b-256 checksum
How to use checksums
cc6da7ecf588e26d11f8be8e90e477c71dd46e12959cfece8a41f645b68ab8b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / label_image_mcp-0.2.0-py3-none-any.whl

Download URL label_image_mcp-0.2.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54b03c4ee381257ab01e94bf64285f5aa85499aaef004da7fbe47c1ecd83b8cf
BLAKE2b-256 checksum
How to use checksums
5d959129164ba7f3c5e4dbe07cd5120473f481adce2b979b5c1cd2cb7c773167
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for label-image-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for label_image_mcp-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page