darktable-mcp
Darktable MCP 서버
Claude 및 기타 AI 어시스턴트가 사진 관리 및 편집을 위해 darktable을 제어할 수 있도록 지원하는 모델 컨텍스트 프로토콜(MCP) 서버입니다.
주요 기능
사진 라이브러리 관리: 사진 탐색, 평가, 가져오기 및 정리
기본 사진 편집: 노출 조정, 프리셋 적용, 이미지 자르기
일괄 작업: 여러 사진을 효율적으로 처리
안전한 통합: darktable의 공식 Lua API 사용
간편한 설정: 한 번의 명령으로 설치
Related MCP server: darktable-mcp
설치
pip install darktable-mcp구성
Claude Desktop 구성(~/.claude_desktop_config.json)에 추가하세요:
{
"mcpServers": {
"darktable": {
"command": "python",
"args": ["-m", "darktable_mcp"]
}
}
}사용 예시
최고의 사진 평가하기:
"Claude, 지난주에 찍은 풍경 사진들에 별 4개를 매겨줘"
일괄 사진 편집:
"Claude, 노출 부족인 모든 일몰 사진의 노출을 +0.5 조정해줘"
스마트 정리:
"Claude, 카메라에서 사진을 가져와 날짜별로 정리해줘"
요구 사항
Python 3.8+
darktable 4.0+
Claude Desktop 또는 호환되는 MCP 클라이언트
사용 가능한 도구
view_photos()- 필터를 사용하여 사진 라이브러리 탐색rate_photos()- 별점 평가 적용 (1-5)import_batch()- 디렉토리에서 가져오기adjust_exposure()- 노출 설정 수정apply_preset()- 편집 프리셋 적용export_images()- 다양한 형식으로 내보내기
기여
기여를 환영합니다! 기여 가이드라인을 읽어주세요.
라이선스
MIT 라이선스 - 자세한 내용은 LICENSE 파일을 참조하세요.
키워드
darktable, MCP, 모델 컨텍스트 프로토콜, 사진 편집, RAW 처리, 일괄 처리, AI 사진 관리, Claude, 사진 워크플로우
Available Tools
10 toolsapply_presetA
Apply a darktable style (preset) to one or more photos. The preset_name must exactly match a style name from list_styles. Returns counts of applied and missed photos. Requires darktable to be running with the darktable-mcp Lua plugin installed.
Inputs: photo_ids (required), preset_name (required).
apply_ratings_batchA
Write XMP sidecars (xmp:Rating) for a batch of {stem: rating} pairs. Each sidecar sits next to its raw file at .xmp and is picked up automatically by darktable on import. Rating range: -1 (reject), 0 (unrated), 1-5 (stars). Each rating is also appended to <source_dir>/ratings.jsonl for replay/audit. An existing sidecar is never replaced: only its rating value is rewritten, so darktable edit history survives. A sidecar with no recognisable rating is skipped with an error rather than overwritten.
Inputs: ratings (required), source_dir (required), log, force.
export_imagesA
Export photos to JPEG/PNG/TIFF via darktable-cli. Pass absolute file paths in photo_ids — the path field from view_photos drops in directly. Output names are de-collided: two sources sharing a stem (e.g. DSC_0001.NEF from two folders) get suffixed names rather than overwriting each other, so do not assume the written file is .. Read the real path from the output field of the .export_images.jsonl side file.
Inputs: format (required), photo_ids (required), output_path (required), quality, +2 more.
extract_previewsA
Extract auto-rotated JPEG previews from a directory of raw files (NEF/CR2/ARW/DNG/etc) for vision-based rating. Each preview is rotated upright via EXIF orientation and resized to max_dim (default 1024). A smaller thumb_dim (default 384) is also written for token-efficient first-pass culling. Returns a list of items with preview paths plus an EXIF summary (ISO, shutter, focal, aperture, datetime) per file. The scan is recursive, and the output tree mirrors the source tree, so raws with the same filename in different subdirectories get distinct previews. Read the preview path from each item rather than assuming <output_dir>/.jpg.
Inputs: source_dir (required), max_dim, overwrite, thumb_dim, +2 more.
import_batchA
Register a folder as a film roll in the user's darktable library. Useful when you've copied photos from a card or external drive and want darktable to know about them. Returns the count of newly-imported photos. Requires darktable to be running with the darktable-mcp Lua plugin installed.
Inputs: source_path (required), recursive.
import_from_cameraA
Use when a camera or memory card is physically connected. Detects the camera via libgphoto2 and copies all photos to a local directory, then returns the destination path. Copying alone does not put the photos in the library: follow up with import_batch on that destination path to register them as a film roll. Files are written one subdirectory per camera folder or card, prefixed with the camera's identity (e.g. /Nikon_D850_sn_30014567_store_00010001_DCIM_100NCD80/DSC_0001.NEF), because camera filenames repeat across folders, across the two cards of a dual-slot body, and across bodies importing into the same destination. Import the destination recursively. A file that would collide with a different photo already on disk is kept alongside it as -2., never overwritten. This holds for two bodies of the same model that report no serial number and therefore share a subdirectory: before skipping files a destination appears to already hold, such a camera is asked for a small sample of them and the bytes are compared, so a second body's photos are kept rather than dropped. Re-running is cheap: a body with a serial number transfers nothing it already delivered. Any file the card lists that does not reach the destination is reported by name. Cost: this tool runs to completion synchronously and does not return early. A full card can take many minutes, up to the 1 hour default timeout, which is longer than most MCP clients wait for a single request. Progress is observable while it runs by tailing the .import.log file in the destination directory.
Inputs: camera_port, destination, timeout_seconds.
list_stylesA
List all darktable styles (presets) installed on the user's system. Returns name and description for each. Required discovery step before calling apply_preset, since style names must match exactly. Requires darktable to be running with the darktable-mcp Lua plugin installed.
Inputs: no named parameters.
open_in_darktableA
Launch the darktable GUI on a folder. The folder is registered as a film roll on first launch and XMP sidecars are picked up automatically. The lighttable opens already filtered via the official darktable.gui.libs.collect.filter Lua API for any rating spec: exact rating=N, rating_min=N (>=), rating_max=N (<=), arbitrary rating_min..rating_max inner ranges, or no filter at all.
Inputs: source_dir (required), rating, rating_max, rating_min, +1 more.
rate_photosB
Apply a star rating to one or more photos in the user's darktable library. Requires darktable to be running with the darktable-mcp Lua plugin installed.
Inputs: rating (required), photo_ids (required).
view_photosA
Browse photos in the user's darktable library. Filter by filename substring, minimum star rating, or both. Returns id, filename, absolute file path, and rating per match — the path can be passed straight into export_images. Requires darktable to be running with the darktable-mcp Lua plugin installed (see darktable-mcp install-plugin).
Inputs: limit, filter, rating_min.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools map cleanly to a distinct resource+action (import, browse, rate, style, export, preview, GUI launch). The one genuine overlap is rate_photos vs apply_ratings_batch — both write star ratings, one via the running darktable library and one via XMP sidecars for pre-import files — and view_photos vs extract_previews both surface photos, though the rich descriptions clarify the library-browsing vs file-preview distinction.
All tools are snake_case and verb-first, following a readable verb_noun convention (view_photos, list_styles, export_images, extract_previews). Minor deviations: import_from_camera and open_in_darktable use prepositional phrases, and the 'batch' suffix appears in both import_batch and apply_ratings_batch with slightly different grammatical roles, but the overall pattern stays predictable.
Ten tools is well-scoped for the domain: two import paths, library browsing, two rating mechanisms, style discovery/application, preview extraction, export, and GUI launch. Each tool occupies a distinct step in the photo-management workflow and none feels like filler.
The end-to-end pipeline is covered: copy from camera → register film roll → browse → rate → apply style → export, plus an alternative XMP-sidecar rating path that darktable picks up on launch. Missing operations like metadata editing, style creation, photo deletion, and richer library search (tags, dates) are workable gaps rather than dead ends.
Maintenance
Related MCP Connectors
Search photos and video moments by visual meaning, people, dates, and folders across local libraries, Apple Photos, and OneDrive. Manage collections, groups, favorites, people, and duplicate review. Synced metadata remains searchable while the desktop is offline; local and Apple Photos media access needs the owning device online with remote access enabled. OneDrive media can be accessed directly from the cloud. OAuth or Bearer API keys. Paid Cloud Access required; hosted visual search uses prepaid credits. Text-in-image search is semantic matching, not guaranteed exact OCR. Setup: https://organizewith.ai/en/guides/connect-ai-assistants
Read your tracked time and projects, pause tracking or add a note, from Claude or ChatGPT.
Create projects, nodes, and tasks in UluP Spaces by conversation with Claude.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to control Adobe Lightroom Classic on macOS for professional photo editing and catalog management. It allows users to inspect photos, apply develop settings, and automate workflows through a secure local bridge without direct catalog database manipulation.595MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to edit photos in darktable via natural language, adjusting sliders, applying styles, and organizing the library in real time through the MCP protocol.1MIT
- AlicenseCqualityCmaintenanceEnables AI agents to control Adobe Lightroom Classic develop settings, manage presets and catalogs, and perform round-trip handoffs with Adobe Photoshop for advanced retouching. Provides native socket bridging for exposure, color grading, search, ratings, keywords, collections, and export workflows.40MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to drive Adobe Lightroom Classic directly — searching and organizing catalogs, reading and writing the full set of develop parameters, building geometric and AI-generated masks (sky, subject, mountains, water, people), applying presets, and rendering previews, histograms, and exports. All capabilities are exposed as 167 MCP tools over a Lua plugin bridge, with write-confirmation sentinels so silently dropped edits surface as explicit errors.Apache 2.0