YD

yaddyvirus/darktable-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

25 stars 9 forks 质量 58 趋势 0

支持基于Claude的AI驱动照片编辑MCP服务器。支持RAW文件、非破坏性编辑、裁剪、导出等功能。

概览

由Yadullah Abidi开发(YaddyVirus) 一个模型上下文协议(MCP)服务器,允许你使用 Claude 作为你的 AI 照片编辑器进行照片编辑。支持和 。 告诉Claude你想要什么——“让画面更温暖、更有戏剧性”,“裁剪到16:9”,“恢复高光过曝”——它会应用编辑,显示预览,并导出最终图像。支持RAW文件(CR2、NEF、ARW等)和JPEG。 - 🖼️ — CR2、NEF、ARW、RAF、DNG、ORF、RW2等 - 🎨 — 曝光、白平衡、对比度、高光/阴影、饱和度、鲜艳度、清晰度、锐度、降噪、小品 — ✂️ 自由裁剪、宽高比裁剪(16:9、4:3、1:1......)、直线 — 📝 — 给导出有意义的名称 - 📊 — Claude 在建议编辑前检查裁剪和色调分布 - 💾 — 所有编辑都存储在侧车 JSON 中;原始未被触及 - 🔄 编辑以 .xmp 侧车编写 Darktable 可读取 - 📋 — 将一张图片的编辑应用到多张其他图片上 - Python 3。

概述(AI 翻译)

由Yadullah Abidi开发(YaddyVirus)

一个模型上下文协议(MCP)服务器,允许你使用 Claude 作为你的 AI 照片编辑器编辑照片。支持 Claude Desktop 和 Claude Code。

告诉Claude你想要什么——“让画面更温暖、更有戏剧性”,“裁剪到16:9”,“恢复高光过曝”——它会应用编辑,显示预览,并导出最终图像。支持RAW文件(CR2、NEF、ARW等)和JPEG格式。

特色

  • 🖼️ RAW 文件支持 — CR2、NEF、ARW、RAF、DNG、ORF、RW2 等
  • 🎨 完整编辑工具包 — 曝光、白平衡、对比度、高光/阴影、饱和度、鲜艳度、清晰度、锐度、降噪、小景图
  • ✂️ 裁剪并旋转 — 自由裁剪,按宽高比裁剪(16:9、4:3、1:1等),拉直
  • 📝 重命名输出 — 为导出命名有意义
  • 📊 直方图分析 — Claude在建议编辑前检查裁剪和音调分布
  • 💾 非破坏性 — 所有编辑都存储在侧车 JSON 中;原始文件从未被触及
  • 🔄 Darktable XMP 导出 — 编辑内容为 .xmp Darktable 可读取的侧车
  • 📋 批量复制设置 — 将一张图片的编辑应用到多张图片上

要求

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

DarktableMCP

Developed by Yadullah Abidi (YaddyVirus)

A Model Context Protocol (MCP) server that lets you edit photos using Claude as your AI photo editor. Works with Claude Desktop and Claude Code.

Tell Claude what you want — “make this warmer and more dramatic”, “crop to 16:9”, “recover the blown highlights” — and it applies the edits, shows you a preview, and exports the final image. Supports RAW files (CR2, NEF, ARW, etc.) and JPEGs.

Features

  • 🖼️ RAW file support — CR2, NEF, ARW, RAF, DNG, ORF, RW2, and more
  • 🎨 Full editing toolkit — exposure, white balance, contrast, highlights/shadows, saturation, vibrance, clarity, sharpness, noise reduction, vignette
  • ✂️ Crop & rotate — free crop, aspect ratio crop (16:9, 4:3, 1:1…), straighten
  • 📝 Rename outputs — give your exports meaningful names
  • 📊 Histogram analysis — Claude checks clipping and tonal distribution before suggesting edits
  • 💾 Non-destructive — all edits stored in a sidecar JSON; originals never touched
  • 🔄 Darktable XMP export — edits written as .xmp sidecars Darktable can read
  • 📋 Batch copy settings — apply one image’s edits to many others

Requirements


Installation

1. Clone the repository

git clone https://github.com/yadullahabidi/darktable-mcp.git
cd darktable-mcp

2. Install the package

pip install -e .

This installs all dependencies automatically:

  • mcp — Model Context Protocol SDK
  • rawpy — RAW file decoding
  • Pillow — image processing
  • numpy — array operations
  • piexif — EXIF metadata

3. Verify it works

python -m darktable_mcp

You should see it start (it will wait for MCP input — press Ctrl+C to exit). If it starts without errors, you’re good.


Connecting to Claude Desktop

1. Find your Claude Desktop config file

Platform Path
Windows %APPDATA%\Claude\claude_desktop_config.json
macOS ~/Library/Application Support/Claude/claude_desktop_config.json

2. Add the server

Open the config file and add the mcpServers block. If the file already has content, merge carefully — don’t replace the whole file.

Windows:

{
  "mcpServers": {
    "darktable": {
      "command": "python",
      "args": ["-m", "darktable_mcp"]
    }
  }
}

macOS / Linux:

{
  "mcpServers": {
    "darktable": {
      "command": "python3",
      "args": ["-m", "darktable_mcp"]
    }
  }
}

Tip: If python isn’t on your PATH, use the full path to the Python executable.
Windows example: "C:\\Users\\YourName\\AppData\\Local\\Programs\\Python\\Python313\\python.exe"
Find it by running where python (Windows) or which python3 (macOS/Linux) in a terminal.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "darktable": { "command": "python", "args": ["-m", "darktable_mcp"] } } }