Logo ImmichMCP

ImmichMCP

Cộng đồng
barryw

MCP server for Immich photo management

Nhà phát hànhbarryw
Kho mãImmichMCP
Ngôn ngữC#
Bản fork
15
Sao
55
Công cụ có sẵn
0
Phương thức truyền tảistdio, streamable-http
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    ImmichMCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    55 sao và 15 bản fork từ kho mã được liên kết.

ImmichMCP

A Model Context Protocol (MCP) server for Immich - the self-hosted photo and video management solution. This server provides a first-class AI interface to manage your Immich library.

Features

  • Asset Management: Search, browse, upload, update, and delete photos/videos
  • Direct Local Upload: Authorize a short-lived, upload-only URL and stream a local folder straight to Immich — no API key exposed, nothing to install beyond curl, resumable by content dedup
  • Smart Search: ML-powered semantic search using CLIP (e.g., "sunset at the beach")
  • Metadata Search: Filter by date, location, camera, people, and more
  • Albums: Create, manage, and share photo albums
  • People: View and manage face recognition clusters
  • Tags: Organize assets with custom tags
  • Shared Links: Create shareable URLs for albums and assets
  • Activities: Add comments and likes to albums/assets

Requirements

  • .NET 10.0 SDK
  • Immich v3.0 or newer server instance
  • Immich API key

Compatibility

ImmichMCP 3.x targets Immich v3 APIs. Use an older ImmichMCP release for Immich v2 servers.

Integration Tests

Read-only integration tests can run against an existing Immich server without deploying ImmichMCP:

bash
export IMMICH_BASE_URL="http://127.0.0.1:2283"
export IMMICH_API_KEY="your-api-key"
export IMMICH_INTEGRATION_TESTS=true
dotnet test ImmichMCP.Tests/ImmichMCP.Tests.csproj --filter "Category=Integration"

Mutation coverage (create/update/delete paths) is disabled by default. Enable it explicitly to also run the full 49-tool smoke:

bash
export IMMICH_INTEGRATION_MUTATION_TESTS=true
dotnet test ImmichMCP.Tests/ImmichMCP.Tests.csproj --filter "Category=Integration"

(If your Immich runs somewhere not directly reachable, point IMMICH_BASE_URL at it however you normally reach it — e.g. a port-forward or tunnel — before running the tests.)

With mutation coverage enabled, ToolCoverageIntegrationTests exercises all 49 tools against the live server. It is strictly non-destructive to existing data: every mutation runs on throwaway fixtures the test creates (uploaded PNGs, an album, a tag, shared links, an activity) and teardown deletes only those; the two tools that would mutate real, un-creatable data (immich_people_update, immich_people_merge) are exercised with bogus IDs only and must refuse safely.

Deployment

ImmichMCP is published as a container image at ghcr.io/barryw/immichmcp. Run it wherever you host containers — Docker, Docker Compose, or Kubernetes.

  • Set IMMICH_BASE_URL and IMMICH_API_KEY (see Environment Variables).
  • Expose the HTTP port (default 5000). The MCP endpoint is served at /mcp. Two health endpoints are available: /health (liveness, use for restarts) and /health/ready (readiness, pings Immich and returns 503 if unreachable, use for traffic routing).
  • For remote/HTTP clients, set IMMICH_TOOL_MODE=gateway so clients enable tool categories on demand instead of loading all tools up front.

Docker Compose

bash
cp .env.example .env          # set IMMICH_BASE_URL and IMMICH_API_KEY
docker compose up --build

Kubernetes

A sample manifest is provided in k8s/deployment.yaml — set the image, the two environment variables, and IMMICH_TOOL_MODE=gateway, then apply it with kubectl.

Installation

Option 1: Run from Source

bash
# Clone the repository
git clone https://github.com/barryw/ImmichMCP.git
cd ImmichMCP

# Set environment variables
export IMMICH_BASE_URL="https://photos.example.com"
export IMMICH_API_KEY="your-api-key"

# Run with stdio transport (for Claude Desktop)
dotnet run --project ImmichMCP -- --stdio

# Or run with HTTP transport (for remote usage)
dotnet run --project ImmichMCP

Option 2: Docker

bash
docker run -e IMMICH_BASE_URL="https://photos.example.com" \
           -e IMMICH_API_KEY="your-api-key" \
           -p 5000:5000 \
           ghcr.io/barryw/immichmcp:latest

Environment Variables

VariableRequiredDefaultDescription
IMMICH_BASE_URLYes-Base URL of your Immich instance
IMMICH_API_KEYYes-API key for authentication
MCP_LOG_LEVELNoInformationLogging level
DOWNLOAD_MODENourlurl returns URLs, base64 returns the file content inline as MCP image/resource content
MAX_INLINE_DOWNLOAD_BYTESNo26214400Max asset size returned inline with DOWNLOAD_MODE=base64; larger assets get a PAYLOAD_TOO_LARGE error that includes the download URL
MAX_PAGE_SIZENo100Maximum items per page
MCP_PORTNo5000HTTP server port
IMMICH_TOOL_MODENostaticstatic exposes all tools; gateway exposes immich_tools_list and immich_tools_enable first

In gateway mode, immich_tools_enable emits the MCP notifications/tools/list_changed notification so clients can refresh the normal tools/list inventory after enabling a category or tool.

Claude Desktop Configuration

Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json on Linux/macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

json
{
  "mcpServers": {
    "immich": {
      "command": "dotnet",
      "args": ["run", "--project", "/path/to/ImmichMCP/ImmichMCP", "--", "--stdio"],
      "env": {
        "IMMICH_BASE_URL": "https://photos.example.com",
        "IMMICH_API_KEY": "your-api-key"
      }
    }
  }
}

Or with Docker:

json
{
  "mcpServers": {
    "immich": {
      "command": "docker",
      "args": ["run", "-i", "--rm",
               "-e", "IMMICH_BASE_URL=https://photos.example.com",
               "-e", "IMMICH_API_KEY=your-api-key",
               "ghcr.io/barryw/immichmcp:latest", "--stdio"]
    }
  }
}

Available Tools

Health & Capabilities

ToolDescription
immich_pingVerify connectivity and return server version
immich_capabilitiesList available API features

Assets

ToolDescription
immich_assets_listList recent assets with filters
immich_assets_getGet full asset metadata
immich_assets_exifGet EXIF data for an asset
immich_assets_download_originalGet download URL for original (or inline content with DOWNLOAD_MODE=base64)
immich_assets_download_thumbnailGet thumbnail/preview URLs (or inline preview image with DOWNLOAD_MODE=base64)
immich_assets_uploadUpload asset (base64)
immich_assets_upload_from_pathUpload from local file path
immich_assets_upload_authorizeMint a short-lived, upload-only URL so a client can upload local files directly to Immich (no API key exposed)
immich_assets_upload_initStart an out-of-band upload session; returns a URL to POST a file to
immich_assets_upload_statusCheck the status of an out-of-band upload session
immich_assets_updateUpdate asset metadata
immich_assets_bulk_updateBulk update multiple assets
immich_assets_deleteDelete asset(s)
immich_assets_statisticsGet asset statistics

Search

ToolDescription
immich_search_metadataSearch by metadata filters
immich_search_smartML-based semantic search (CLIP)
immich_search_ocrOCR text search inside images
immich_search_exploreGet explore/discovery data

Albums

ToolDescription
immich_albums_listList all albums
immich_albums_getGet album details
immich_albums_createCreate new album
immich_albums_updateUpdate album metadata
immich_albums_assets_addAdd assets to album
immich_albums_assets_removeRemove assets from album
immich_albums_deleteDelete album
immich_albums_statisticsGet album statistics

People

ToolDescription
immich_people_listList all recognized people
immich_people_getGet person details
immich_people_updateUpdate person info
immich_people_mergeMerge duplicate people
immich_people_assetsList assets for a person

Tags

ToolDescription
immich_tags_listList all tags
immich_tags_getGet tag by ID
immich_tags_createCreate new tag
immich_tags_updateUpdate tag
immich_tags_deleteDelete tag
immich_tags_assets_addTag assets
immich_tags_assets_removeRemove tag from assets

Shared Links

ToolDescription
immich_shared_links_listList all shared links
immich_shared_links_getGet shared link details
immich_shared_links_createCreate shared link
immich_shared_links_updateUpdate shared link
immich_shared_links_deleteDelete shared link

Activities

ToolDescription
immich_activities_listList comments/likes
immich_activities_createAdd comment or like
immich_activities_deleteDelete activity
immich_activities_statisticsGet activity statistics

Example Usage

Search for photos from last month

Search for photos taken in the last 30 days that are favorites

Create an album and add photos

Create a new album called "2026 Winter Vacation" and add all photos from January 2026

Smart search

Find photos of sunset at the beach

Bulk archive

Archive all photos from 2020 that aren't favorites

Upload a local folder (no install, no exposed API key)

Upload ~/Photos/Iceland2026 to Immich into an album called "Iceland 2026"

Because the MCP server is remote and cannot read your disk, immich_assets_upload_authorize mints a short-lived, upload-only shared-link URL scoped to a (dynamically created) album. The client then uploads the files directly to Immich with curl it already has — the master API key never leaves the server, and no CLI/script needs to be installed. Re-running is safe and resumable: Immich deduplicates by content, so already-uploaded files return duplicate. See the uploading-local-media doc for the exact client recipe.

jsonc
// immich_assets_upload_authorize(album_name: "Iceland 2026", ttl_minutes: 120)
{
  "upload_url": "https://immich.example/api/assets?key=<token>",
  "album_id": "…", "shared_link_id": "…", "expires_at": "2026-07-02T14:00:00.0000000Z"
}
// then: POST each file to upload_url (multipart: assetData, fileCreatedAt, fileModifiedAt)

Safety Features

  • All destructive operations require explicit confirm: true parameter
  • Bulk operations default to dryRun: true mode
  • Dry runs return what would be affected without making changes

Response Format

All tools return a consistent JSON envelope:

json
{
  "ok": true,
  "result": { ... },
  "meta": {
    "request_id": "uuid",
    "page": 1,
    "page_size": 25,
    "total": 123,
    "next": "cursor-or-null",
    "immich_base_url": "https://photos.example.com"
  },
  "warnings": []
}

Error responses:

json
{
  "ok": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Asset not found",
    "details": { ... }
  },
  "meta": { ... }
}

Upstream failures are never swallowed into empty/success-looking results: a non-2xx response from Immich surfaces as an error, and per the MCP spec every tool-execution error is returned as a result with isError: true (not a JSON-RPC protocol error), so the calling model can see and react to it. Error code maps the upstream status (AUTH_FAILED, NOT_FOUND, VALIDATION, RATE_LIMIT, UPSTREAM_ERROR).

License

MIT License - see LICENSE file for details.

Related Projects

  • Immich - Self-hosted photo and video management
  • PaperlessMCP - MCP server for Paperless-ngx

Cài đặt

TypingMind
{
  "mcpServers": {
    "immichmcp": {
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "/path/to/your/ImmichMCP/ImmichMCP",
        "--",
        "--stdio"
      ]
    }
  }
}

Dùng MCP ImmichMCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối ImmichMCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. Bạn có thể chạy MCP ngay trên thiết bị của mình hoặc kết nối qua URL của máy chủ MCP từ xa.

Cách 1: Dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm ImmichMCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của ImmichMCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "immichmcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của ImmichMCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của ImmichMCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng ImmichMCP giúp tôi làm việc này không?
ImmichMCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng ImmichMCP.

Cách 2: Thêm URL máy chủ MCP

Dùng cách này khi ImmichMCP đã được lưu trữ từ xa hoặc nhóm của bạn muốn có một trình kết nối dùng chung cho nhiều người dùng.

1

Mở mục Trình kết nối MCP

Trong TypingMind, vào Plugin, mở mục Trình kết nối MCP, rồi chọn Thêm URL.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Vào mục Plugin.
  3. Mở mục Trình kết nối MCP.
  4. Nhấp vào Thêm URL.
Biểu mẫu Thêm URL máy chủ MCP tùy chỉnh của TypingMind
2

Dán URL máy chủ

Nhập URL máy chủ MCP do nhà cung cấp cung cấp vào trường URL máy chủ. Thêm tên kết nối, mô tả, biểu tượng, header HTTP tùy chỉnh hoặc cài đặt ứng dụng khách OAuth nếu máy chủ yêu cầu.

  1. Dán URL máy chủ MCP do nhà cung cấp cung cấp vào trường URL máy chủ.
  2. Nhập tên kết nối cho ImmichMCP.
  3. Thêm mô tả và biểu tượng nếu bạn muốn dễ nhận biết kết nối hơn.
  4. Thêm header HTTP tùy chỉnh hoặc thông tin ứng dụng khách OAuth nếu máy chủ yêu cầu xác thực.
3

Tạo kết nối

Nhấp vào Tạo kết nối, sau đó quay lại danh sách Plugin và xác nhận kết nối MCP mới đang hoạt động.

  1. Nhấp vào Tạo kết nối.
  2. Quay lại danh sách trình kết nối MCP.
  3. Xác nhận kết nối ImmichMCP hiển thị trạng thái đang hoạt động.
  4. Làm mới danh sách plugin nếu kết nối chưa xuất hiện ngay.
4

Đổi mô hình mà không cần kết nối lại

Bắt đầu cuộc trò chuyện với mô hình bạn thích, bật các công cụ của ImmichMCP trong mục Plugin và chuyển sang mô hình khác khi cần. Kết nối MCP vẫn sẵn dùng trong không gian làm việc TypingMind.

  1. Bắt đầu cuộc trò chuyện mới trong TypingMind.
  2. Chọn mô hình AI bạn muốn dùng.
  3. Bật các công cụ của ImmichMCP trong mục Plugin.
  4. Yêu cầu mô hình dùng công cụ khi cần.
  5. Chuyển sang mô hình AI khác và dùng lại cùng kết nối MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng ImmichMCP giúp tôi làm việc này không?
ImmichMCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng ImmichMCP.

Câu hỏi thường gặp

Máy chủ MCP ImmichMCP dùng để làm gì?

ImmichMCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP ImmichMCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng ImmichMCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP ImmichMCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối ImmichMCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP ImmichMCP với TypingMind?

Bạn có thể kết nối ImmichMCP trong TypingMind bằng trình kết nối MCP cục bộ hoặc bằng cách thêm URL máy chủ MCP từ xa. Dùng trình kết nối cục bộ khi máy chủ cần truy cập tệp, ứng dụng hoặc tài nguyên riêng trên thiết bị của bạn; dùng URL máy chủ khi máy chủ MCP được lưu trữ từ xa.

MCP ImmichMCP cung cấp những công cụ nào trong TypingMind?

ImmichMCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP ImmichMCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu ImmichMCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇