Lightroom Classic MCP

Lightroom Classic MCP

Enables 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.

Category
访问服务器

README

Lightroom Classic MCP

Lightroom Classic MCP banner

Agentic professional photo editing for Adobe Lightroom Classic on macOS.

This project combines a Lightroom Classic plugin bundle and a Python MCP server so Codex, Claude, and other MCP clients can operate Lightroom through Lightroom itself. The goal is simple: expose serious editing and catalog workflows without touching the catalog database directly.

This project is not affiliated with or endorsed by Adobe.

Install In 2 Minutes

If you want to use this with Codex or Claude, start here:

git clone https://github.com/4xiomdev/lightroom-classic-mcp.git
cd lightroom-classic-mcp
./scripts/install_for_ai.sh --client both

That one command:

  • installs the Lightroom plugin bundle
  • bootstraps the Python runtime
  • registers the MCP server with Codex
  • registers the MCP server with Claude

By default, the registered MCP command expects Lightroom to already be open. That avoids surprising app launches when Codex or Claude probes the server.

Homebrew install:

brew tap 4xiomdev/tap
brew install lightroom-classic-mcp
lightroom-classic-mcp-install --client both

If you prefer the old behavior where the MCP command opens Lightroom for you, use --auto-launch during install.

Use With Codex

Fast path:

./scripts/install_for_ai.sh --client codex

Manual Codex registration:

codex mcp add lightroom-classic -- bash -lc 'cd "/absolute/path/to/lightroom-classic-mcp" && ./scripts/start_managed_server.sh'

Use With Claude

Fast path:

./scripts/install_for_ai.sh --client claude

Manual Claude registration:

claude mcp add -s local lightroom-classic -- bash -lc 'cd "/absolute/path/to/lightroom-classic-mcp" && ./scripts/start_managed_server.sh'

More detail: docs/CLIENT_SETUP.md

Launch Behavior

The MCP wrapper does not auto-open Lightroom by default.

That is intentional. During clean-install testing, automatic app launch turned out to be noisy and surprising, especially when clients probe MCP servers in the background.

Default behavior:

  • open Lightroom yourself
  • then let Codex or Claude connect through MCP

If you want the MCP wrapper to launch Lightroom for you, install with:

./scripts/install_for_ai.sh --client both --auto-launch

Why This Exists

Lightroom Classic is still the center of a lot of real photo workflows, but it is hard to automate safely from external tools. This project gives an AI agent a controlled way to:

  • inspect the current selection
  • read and write metadata
  • read and write Develop settings
  • apply grouped looks and presets
  • work with masks, collections, snapshots, exports, and virtual copies

The key design choice is that Lightroom still performs the actual work. The Python side acts as a bridge and validation layer, not as a catalog editor.

What This Feels Like

This is meant to feel like a professional photo editing operator for Lightroom Classic:

  • inspect selected photos and catalog state
  • inspect the original file directly from the Lightroom-provided path
  • apply structured edit changes safely
  • read and write Develop settings through Lightroom
  • automate repetitive editing workflows
  • stay local, deterministic, and compatible with real Lightroom usage

Inspection-First Workflow

The preferred workflow is:

  1. ask Lightroom for the active photo or current selection
  2. use the returned absolute file path to inspect the original image directly
  3. decide your edit
  4. apply Lightroom changes through MCP
  5. export only if you need a rendered before/after or final output

New inspection tools:

  • get_active_photo_file
  • get_selected_photo_files

These are read-only MCP tools that return Lightroom metadata plus a normalized inspection payload:

  • absolute file path
  • local ID
  • filename
  • dimensions when available
  • file existence / readability / inspectability flags
  • basic file metadata like suffix, MIME type, and size when readable

Example Agent Prompts

Inspect the active image before editing:

Use get_active_photo_file, inspect the image at the returned path, then tell me what edit you would make before changing anything in Lightroom.

Snapshot first, then make a targeted edit:

Use get_active_photo_file to inspect the active image, create a Lightroom snapshot, then lift the subject slightly without blowing out highlights.

Use export only for verification:

Inspect the active image from its original file path, make the edit in Lightroom, then export a verification JPEG so we can compare before and after.

Restore if needed:

If the edit is not an improvement, restore the most recent Lightroom snapshot instead of trying to manually undo each slider.

Who This Is For

  • photographers building agentic editing workflows around Lightroom Classic
  • creative technologists connecting Codex or Claude to a real editing environment
  • developers who want a local-first Lightroom MCP server that is installable and scriptable

How It Works

lightroom-classic-mcp is split into three parts:

  1. a Lightroom plugin bundle in plugin/LightroomMCPCustom.lrplugin
  2. a localhost socket bridge implemented inside Lightroom
  3. a Python MCP server in src/lightroom_mcp_custom/

When the plugin starts, it opens localhost sockets and writes bridge metadata to /tmp/lightroom_mcp_custom_ports.json. The managed server launcher waits for that handshake and then starts the MCP server over stdio.

More detail: docs/ARCHITECTURE.md

Requirements

  • macOS
  • Adobe Lightroom Classic installed locally
  • Python 3.10+
  • An MCP client that can launch a local command

What You Get

  • non-destructive Lightroom SDK-driven edits
  • localhost-only bridge
  • validation before Develop writes
  • a one-command managed startup path
  • a repo layout that keeps the Lightroom plugin and MCP server together
  • direct file-path inspection helpers for active and selected photos

Repository Layout

  • plugin/LightroomMCPCustom.lrplugin/ - Lightroom plugin bundle
  • src/lightroom_mcp_custom/ - Python MCP server and bridge client
  • scripts/install_plugin.sh - installs the plugin bundle into Lightroom's plugin folders
  • scripts/start_managed_server.sh - recommended launcher for daily use
  • scripts/run_server.sh - starts the MCP server directly
  • scripts/smoke_bridge.py - verifies local bridge connectivity
  • scripts/print_mcp_config.sh - prints an MCP config snippet for the current checkout path
  • scripts/package_release.sh - builds source and plugin zip bundles in dist/

Install From A Release

If you downloaded a release zip instead of cloning the repo:

  1. Unzip it anywhere on your Mac.
  2. Run ./scripts/install_for_ai.sh --client both.

If you only want one client, use --client codex or --client claude.

Quick Start

  1. Clone the repo anywhere on your Mac.
git clone <your-repo-url>
cd lightroom-classic-mcp
  1. Run the guided installer.
./scripts/install_for_ai.sh --client both
  1. If Lightroom does not already have the plugin loaded:
  • Open File -> Plug-in Manager
  • Add or enable ~/Library/Application Support/Adobe/Lightroom/Modules/LightroomMCPCustom.lrdevplugin
  1. Verify the bridge.
PYTHONPATH=src python3 scripts/smoke_bridge.py
  1. Print the MCP config snippet for your actual checkout path.
./scripts/print_mcp_config.sh
  1. Use the managed server command in your MCP client.
./scripts/start_managed_server.sh

Recommended MCP Client Command

The printed config from scripts/print_mcp_config.sh is the easiest way to avoid path mistakes. The generated command uses your current absolute checkout path and launches the managed server:

./scripts/start_managed_server.sh

That script:

  1. refreshes the plugin install
  2. checks for a live Lightroom bridge
  3. waits for the bridge port file
  4. launches the MCP server

Why The Managed Launcher Matters

The managed launcher is the reason this project behaves reliably on a normal local Lightroom setup:

  • it refreshes the plugin bundle before each run unless you opt out
  • it fails fast if Lightroom is closed, unless you explicitly enable auto-launch
  • it waits for Lightroom to publish the bridge port file
  • it only starts the MCP server after that handshake exists

That preserves the same startup model this project uses successfully in local development.

Configuration

Optional environment variables:

  • LIGHTROOM_SKIP_INSTALL=1 skips plugin reinstall
  • LIGHTROOM_AUTO_LAUNCH=1 opens Lightroom automatically when the managed server starts
  • LIGHTROOM_FORCE_RESTART=1 force restarts Lightroom before launch
  • LIGHTROOM_WAIT_SECONDS=180 changes the bridge wait timeout
  • LIGHTROOM_ROOT=/custom/path overrides the default Lightroom support directory during install
  • LIGHTROOM_WRITE_PREFS=0 skips the automatic Lightroom plugin-loader preference update
  • LIGHTROOM_VENV_DIR=/custom/venv/path overrides the Python runtime location
  • LIGHTROOM_BOOTSTRAP_PYTHON=python3.12 chooses the Python executable used for venv creation

Safety And Scope

  • Python-side validation clamps or rejects invalid Develop settings before they reach Lightroom
  • Lightroom writes happen through the Lightroom SDK, not direct .lrcat mutation
  • The bridge is localhost-only
  • This project is intentionally local-first and currently macOS-only
  • Snapshot-first is the recommended non-destructive edit pattern, but it is documentation guidance rather than a forced wrapper mode

Testing

Unit tests run with plain pytest.

Live integration tests require a running Lightroom bridge and are opt-in:

LIGHTROOM_RUN_INTEGRATION=1 pytest -q

Without that flag, the integration suite is skipped by default so CI and fresh contributors do not need Lightroom installed just to contribute.

Packaging GitHub Releases

To build release bundles:

./scripts/package_release.sh

That creates:

  • a source zip for the repo
  • a plugin zip containing LightroomMCPCustom.lrplugin

Homebrew release notes and packaging guidance live in docs/DISTRIBUTION.md.

  • Lightroom Classic only
  • macOS only
  • requires the plugin bundle to be installed locally
  • live integration tests cannot run in generic CI because they need Lightroom

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选