immich-mcp
immich-mcp
MCP server for Immich photo management. Provides AI-accessible tools for browsing, searching, organizing, and managing your self-hosted photo library — including duplicate detection and safe deletion workflows.
Features
40+ MCP tools covering assets, albums, search, people, tags, shared links, activities, and duplicates
3 MCP prompts for guided workflows: duplicate review, album organization, and untagged photo discovery
Tool annotations (
title,readOnlyHint,destructiveHint,idempotentHint) for safe AI-driven automationDry-run support on all destructive operations
Duplicate analysis with format priority scoring and protection for favorited/album-linked assets
Automatic retries via
httpx.AsyncHTTPTransport(configurable viaIMMICH_MAX_RETRIES)
Requirements
Python 3.11+
Immich server with API access
uv(recommended) orpip
Installation
git clone https://github.com/whitehara/immich-mcp
cd immich-mcp
uv pip install -e .Configuration
Set environment variables before running:
Variable | Required | Default | Description |
| Yes | — | Immich server URL (e.g. |
| Yes | — | API key from Immich → Account Settings → API Keys |
| No | same as | Public URL used for |
| No |
| HTTP timeout in seconds |
| No |
| Retry attempts on transient errors |
Immich API Key Permissions
Immich 1.138.0+ supports granular API key permissions. Grant the following scopes when creating your key (Immich → Account Settings → API Keys → Create).
For full functionality (all tools enabled):
Scope | Required by |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For read-only use (no create/update/delete tools), grant only:
server.about, user.read, asset.read, asset.statistics, album.read, person.read, person.statistics, tag.read, sharedLink.read, activity.read, activity.statistics, duplicate.read
On Immich versions prior to 1.138.0, select All permissions.
Usage
stdio (Claude Desktop / Claude Code)
export IMMICH_BASE_URL=https://photos.example.com
export IMMICH_API_KEY=your-api-key
immich-mcp --transport stdioClaude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"immich": {
"command": "immich-mcp",
"args": ["--transport", "stdio"],
"env": {
"IMMICH_BASE_URL": "https://photos.example.com",
"IMMICH_API_KEY": "your-api-key"
}
}
}
}HTTP (Docker / remote)
docker run -e IMMICH_BASE_URL=https://photos.example.com \
-e IMMICH_API_KEY=your-api-key \
-p 8000:8000 \
ghcr.io/whitehara/immich-mcp:latestOr build locally with docker compose up.
Default transport in Docker is streamable-http on port 8000.
Tool Reference
Annotation columns: R = readOnlyHint, D = destructiveHint, I = idempotentHint
Each tool also carries a human-readable title annotation used by MCP clients for display.
Health
Tool | Description | R | D | I |
| Verify connectivity, returns server version | ✓ | ✓ | |
| List supported server features | ✓ | ✓ |
User
Tool | Description | R | D | I |
| Get the authenticated user's profile (name, email, quota, role) | ✓ | ✓ |
Assets
Tool | Description | R | D | I |
| List assets with filters (favorite, archived, trashed, type) | ✓ | ✓ | |
| Get full metadata for a single asset | ✓ | ✓ | |
| Get thumbnail, original, and web UI URLs for an asset | ✓ | ✓ | |
| Upload an asset from a local file path or URL | |||
| Update favorite, archived, description, rating | ✓ | ||
| Bulk update multiple assets (dry_run supported) | ✓ | ||
| Delete assets, optionally permanently (dry_run supported) | ✓ | ✓ | |
| Get counts by asset type | ✓ | ✓ |
Search
Tool | Description | R | D | I |
| Filter by date, type, location, camera, person, filename | ✓ | ||
| Semantic/CLIP search with natural language queries | ✓ | ||
| Discover popular places, people, and things | ✓ | ✓ |
Albums
Tool | Description | R | D | I |
| List all albums | ✓ | ✓ | |
| Get album details and assets | ✓ | ✓ | |
| Create a new album | |||
| Update album name, description, or cover | ✓ | ||
| Delete an album (assets are not deleted) | ✓ | ✓ | |
| Add assets to an album | ✓ | ||
| Remove assets from an album | ✓ |
People
Tool | Description | R | D | I |
| List recognized people | ✓ | ✓ | |
| Get person details | ✓ | ✓ | |
| Update name or visibility | ✓ | ||
| Merge two face clusters | ✓ | ||
| Get asset count for a person | ✓ | ✓ |
Tags
Tool | Description | R | D | I |
| List all tags | ✓ | ✓ | |
| Get a tag by ID | ✓ | ✓ | |
| Create a tag (use | |||
| Update tag name or color | ✓ | ||
| Delete a tag | ✓ | ✓ |
Shared Links
Tool | Description | R | D | I |
| List all shared links | ✓ | ✓ | |
| Get shared link details | ✓ | ✓ | |
| Create a shareable URL | |||
| Update expiry, password, permissions | ✓ | ||
| Revoke a shared link | ✓ | ✓ |
Activities
Tool | Description | R | D | I |
| List comments and likes | ✓ | ✓ | |
| Add a comment or like | |||
| Delete an activity | ✓ | ✓ | |
| Get comment count | ✓ | ✓ |
Duplicates
Tool | Description | R | D | I |
| List duplicate groups with analysis (format score, resolution, protection status) | ✓ | ✓ | |
| Delete assets from duplicate groups (dry_run supported) | ✓ | ✓ | |
| Dismiss duplicate groups without deleting files (dry_run supported) | ✓ | ✓ |
Duplicate Analysis Fields
immich.duplicates.list with analyze=true (default) returns per-group analysis:
Field | Description |
| Recommended asset to retain (highest quality) |
| Assets not favorited and not in any album |
| Assets that are favorited or in albums — require explicit user approval |
|
|
Quality Priority for keep_id (highest to lowest)
Live Photo > Format score > Resolution > File size
Favorites and album membership are tiebreakers only — they do not override a quality difference. A favorited JPEG will not be recommended over an unfavorited RAW; instead the JPEG is listed in protected_ids for user review.
Format Score (highest to lowest)
RAW/DNG > HEIC/HEIF > PNG/TIFF > JPEG > WebP > GIF
Prompt Reference
Invoke prompts from your MCP client to start guided workflows.
immich/review_duplicates
Step-by-step workflow for reviewing and safely resolving duplicate photos:
Fetch duplicate groups with analysis
Present summary: safe-to-delete count vs. protected assets needing review
For each group, choose an action:
Delete: keep the best asset, move the rest to trash (or permanently delete)
Dismiss: assets are intentionally kept as separate copies — remove the duplicate grouping without deleting files
Dry-run confirmation before execution
immich/organize_album
Guided album creation workflow:
Organize by date, event, person, or location
Uses both metadata search and semantic (CLIP) search
Checks for existing albums to avoid duplicates
Confirms asset count before creating
immich/find_untagged
Discover unorganized assets in the library:
Identifies assets with no album, no description, or no recognized people
Suggests descriptions from EXIF data
Hands off to
immich/organize_albumfor album creation
Safety Model
All destructive tools (delete, merge, remove) carry destructiveHint=true in their MCP annotations, signalling to clients that human confirmation is required before execution. Additional safeguards:
dry_run=trueis the default on all delete operations — no changes occur without explicit opt-inDuplicate analysis places favorited and album-linked assets in
protected_ids; they are never auto-deletedPrompts explicitly instruct the AI to present a summary and obtain user approval before any destructive action
Development
# Install with dev dependencies
uv pip install -e ".[dev]"
# Run tests
pytest
# Run a single test file
pytest tests/tools/test_assets.py -v
# Type check (optional)
pyright src/Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/whitehara/immich-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server