lr-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.12", "3.13"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: astral-sh/setup-uv@v6
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - run: uv sync --locked
20
+ - run: uv run pytest -q
21
+ - run: uv build
@@ -0,0 +1,19 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ pypi:
9
+ runs-on: ubuntu-latest
10
+ environment: pypi
11
+ permissions:
12
+ id-token: write # PyPI trusted publishing
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: astral-sh/setup-uv@v6
16
+ - run: uv sync --locked
17
+ - run: uv run pytest -q
18
+ - run: uv build
19
+ - run: uv publish
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ dist/
4
+ .env
5
+ .tokens.json
6
+ .certs/
lr_mcp-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Swen Mun
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
lr_mcp-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.5
2
+ Name: lr-mcp
3
+ Version: 0.1.0
4
+ Summary: Unofficial MCP server for the Adobe Photoshop Lightroom Partner API: browse albums, filter and view photos, export renditions
5
+ Project-URL: Repository, https://github.com/longfin/lr-mcp
6
+ Author: Swen Mun
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Keywords: adobe,claude,lightroom,mcp,photography
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Topic :: Multimedia :: Graphics
15
+ Requires-Python: >=3.12
16
+ Requires-Dist: mcp<3,>=2.3
17
+ Description-Content-Type: text/markdown
18
+
19
+ # lr-mcp
20
+
21
+ An unofficial MCP server for **Adobe Photoshop Lightroom** — the cloud-based Lightroom app, not Lightroom Classic. It talks to the [Lightroom Partner API](https://developer.adobe.com/lightroom/lightroom-api-docs/) (`https://lr.adobe.io`) with your own Adobe credentials.
22
+
23
+ > This project is not affiliated with, endorsed by, or sponsored by Adobe. Adobe, Photoshop and Lightroom are either registered trademarks or trademarks of Adobe in the United States and/or other countries.
24
+
25
+ ## Tools
26
+
27
+ | Tool | What it does |
28
+ |---|---|
29
+ | `lr_login` | Browser OAuth sign-in (only needed when tokens are missing or expired) |
30
+ | `lr_account` | Subscription status and cloud storage usage |
31
+ | `lr_list_albums` | Search albums by path and get their ids |
32
+ | `lr_list_photos` | Filter by album, capture date, rating, pick/reject flag, camera, lens, ISO, file name |
33
+ | `lr_get_photo` | Capture info plus a summary of the photo's edit settings (XMP) |
34
+ | `lr_view_photos` | Return edited JPEG renditions as images the model can see (up to 12) |
35
+ | `lr_download_photos` | Save 640 – 2560 px or full-size JPEGs to disk |
36
+ | `lr_create_project_album` / `lr_add_to_project_album` / `lr_delete_project_album` | Manage project albums owned by this server |
37
+
38
+ ### Limits of the Partner API
39
+
40
+ - Edits (develop settings) and ratings of existing photos are read-only.
41
+ - Photos cannot be deleted.
42
+ - Albums you created in Lightroom cannot be modified; only project albums created through the API can.
43
+ - Preset contents cannot be read.
44
+
45
+ ## Setup
46
+
47
+ Setup takes about ten minutes. Steps marked **[human]** need a person at a browser; an AI agent can do the rest (see [For AI agents](#for-ai-agents)).
48
+
49
+ ### Prerequisites
50
+
51
+ - An Adobe account with a Lightroom plan or trial.
52
+ - [uv](https://docs.astral.sh/uv/getting-started/installation/) (`uv --version`). It installs Python 3.12+ itself if needed.
53
+ - `openssl` (`openssl version`). Preinstalled on macOS and most Linux distributions.
54
+
55
+ ### 0. Install
56
+
57
+ ```bash
58
+ uv tool install lr-mcp
59
+ lr-mcp doctor
60
+ ```
61
+
62
+ This puts an `lr-mcp` command in `~/.local/bin` (run `uv tool update-shell` and open a new terminal if the shell cannot find it). All later steps use it. Update with `uv tool upgrade lr-mcp`.
63
+
64
+ `doctor` checks the setup in order and prints the first thing to fix. Before you start step 1, it confirms that the sign-in callback port (8000 by default) is free; if it is not, choose another port now (see step 2) so the redirect URI you enter in step 1 matches.
65
+
66
+ ### 1. Create an Adobe credential [human]
67
+
68
+ Each user needs their own credential: until Adobe reviews an integration it accepts only 25 beta users, so a shared client ID is not practical.
69
+
70
+ 1. Sign in to the [Adobe Developer Console](https://developer.adobe.com/console) and click **Create new project**.
71
+ 2. In the project, click **Add API**, choose **Lightroom Services**, then pick the **OAuth Web App** credential type.
72
+ 3. Set **Default redirect URI** to `https://localhost:8000/callback` and **Redirect URI pattern** to `https://localhost:8000/.*`, then save. (If you chose another port in step 0, use it here instead of 8000.)
73
+ 4. Open **Lightroom Services** in the project's left menu, click **Manage beta users**, and add the email of the Adobe account you will sign in with. Without this, the API refuses the account.
74
+ 5. Open **Credentials → OAuth Web App** and keep the **Client ID** and **Client Secret** at hand for step 2.
75
+
76
+ ### 2. Save the credential
77
+
78
+ Settings live in a `.env` file in the state directory, which `doctor` prints on its first line (`~/.config/lr-mcp/` by default). Environment variables with the same names override the file.
79
+
80
+ | Variable | Required | Description |
81
+ |---|---|---|
82
+ | `ADOBE_CLIENT_ID` | yes | Client ID (also called API key) |
83
+ | `ADOBE_CLIENT_SECRET` | yes | Client secret |
84
+ | `LR_MCP_PORT` | no | Sign-in callback port, default `8000` |
85
+
86
+ Create the file, then open it in an editor and paste the two values after the `=` signs (add `LR_MCP_PORT=<port>` if you are not using 8000):
87
+
88
+ ```bash
89
+ mkdir -p ~/.config/lr-mcp
90
+ printf 'ADOBE_CLIENT_ID=\nADOBE_CLIENT_SECRET=\n' > ~/.config/lr-mcp/.env
91
+ chmod 600 ~/.config/lr-mcp/.env
92
+ open -e ~/.config/lr-mcp/.env # macOS; on Linux use any editor, e.g. nano
93
+ ```
94
+
95
+ To keep the state somewhere else, set the environment variable `LR_MCP_HOME` to a directory. It cannot go in `.env` (it says where `.env` is), so it must also be set for `lr-mcp login` and in the MCP client config (`"env"` in step 5). If `XDG_CONFIG_HOME` is set, the default is `$XDG_CONFIG_HOME/lr-mcp`.
96
+
97
+ ### 3. Sign in [human]
98
+
99
+ ```bash
100
+ lr-mcp login
101
+ ```
102
+
103
+ A browser window opens on the Adobe sign-in page. Sign in with the account added as a beta user and allow access. Adobe then redirects to `https://localhost:8000/callback`, which uses a self-signed certificate, so the browser shows a certificate warning: choose **Advanced → Proceed to localhost** (Chrome) or **Show Details → visit this website** (Safari). The page then says "Signed in" and the terminal prints where the tokens were saved. Tokens are stored with mode 600 and refreshed automatically.
104
+
105
+ ### 4. Check
106
+
107
+ ```bash
108
+ lr-mcp doctor
109
+ ```
110
+
111
+ Every line should start with `[ok]`, ending in `Catalog found. Setup is complete.` Otherwise it prints a `fix:` for the first problem and exits with status 1.
112
+
113
+ ### 5. Add to your MCP client
114
+
115
+ **Claude Desktop.** Edit the config file (create it if missing):
116
+
117
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
118
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
119
+
120
+ Add an entry under `mcpServers`, keeping any existing ones (if a `lightroom` entry already exists, replace it). Claude Desktop does not read your shell's `PATH`, so use the absolute path printed by `which lr-mcp`:
121
+
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "lightroom": {
126
+ "command": "/Users/<you>/.local/bin/lr-mcp"
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+ If you set `LR_MCP_HOME`, add `"env": {"LR_MCP_HOME": "/path/to/dir"}` to the entry. Quit Claude Desktop completely and reopen it; the `lr_*` tools then appear in the tools menu. On macOS the server log is `~/Library/Logs/Claude/mcp-server-lightroom.log`.
133
+
134
+ **Claude Code:**
135
+
136
+ ```bash
137
+ claude mcp add lightroom -s user -- lr-mcp
138
+ ```
139
+
140
+ The client config can be added before or after signing in; without tokens the tools reply "Not signed in" and `lr_login` can do the sign-in from the chat.
141
+
142
+ ## Troubleshooting
143
+
144
+ | Symptom | Fix |
145
+ |---|---|
146
+ | `lr-mcp: command not found` | Run `uv tool update-shell` and open a new terminal, or call `~/.local/bin/lr-mcp` directly. |
147
+ | `doctor`: `Callback port … is in use` | Put `LR_MCP_PORT=<free port>` in `.env` and use that port in the console's redirect URI. |
148
+ | `doctor`: `Not set: ADOBE_CLIENT_ID…` | Step 2: fill in `.env` in the state directory. |
149
+ | The Adobe sign-in page shows an error right away | Usually a wrong `ADOBE_CLIENT_ID`: `doctor` cannot verify it before sign-in. Copy it again from the console. |
150
+ | `doctor`: `rejected the client id` | `ADOBE_CLIENT_ID` is wrong or the tokens belong to another credential. Fix `.env`, then sign in again. |
151
+ | `doctor`: `Lightroom API refused the account` | The signed-in account is not a beta user (step 1.4) or has no Lightroom plan. |
152
+ | The sign-in page says the redirect URI is invalid | The console's redirect URI must be exactly `https://localhost:<port>/callback`, with the same port as `LR_MCP_PORT`. |
153
+ | The sign-in redirect shows another app's page or never loads | Something else listens on the port (`lsof -iTCP:8000 -sTCP:LISTEN`). Use another port as above. |
154
+ | `login` times out after 5 minutes | The browser stopped at the certificate warning; proceed past it next time. |
155
+ | `Token refresh failed` | Run `lr-mcp login` again. |
156
+ | Tools missing in Claude Desktop | Use the absolute path to `lr-mcp`, fully restart the app, and read the log file above. |
157
+
158
+ ## For AI agents
159
+
160
+ If a user asks you to set this server up:
161
+
162
+ - **Never ask the user to paste the client secret into the chat, and never print `.env`.** Create the file with empty values (step 2, using the state directory `doctor` prints) and ask the user to fill it in with an editor. To check it without revealing values, `grep -cE '^ADOBE_CLIENT_(ID|SECRET)=.+' <state dir>/.env` must print `2`; `doctor` shows only the first characters of the client ID.
163
+ - Install (step 0) and run `lr-mcp doctor` before giving the user the console steps: it checks the callback port first, and the redirect URI they enter must use a free port. Run `doctor` again after every step; a `fix:` that starts with `[human]` is something to hand to the user.
164
+ - The user must create the credential, add the beta user, fill in `.env`, and finish the browser sign-in. Give them the exact console steps from step 1, with the port `doctor` reported in the redirect URI and pattern.
165
+ - `lr-mcp login` blocks for up to 5 minutes while the user signs in. Run it in the background or ask the user to run it, and warn them about the certificate page.
166
+ - Setup is done when `doctor` prints `Catalog found. Setup is complete.` Add the client config (step 5) before or after that. For Claude Desktop, merge into the existing JSON instead of overwriting it, use the absolute path from `which lr-mcp`, pass `LR_MCP_HOME` in `"env"` if it is set, and tell the user to quit and reopen the app.
167
+
168
+ ## Development
169
+
170
+ ```bash
171
+ git clone https://github.com/longfin/lr-mcp && cd lr-mcp
172
+ uv sync
173
+ uv run lr-mcp doctor
174
+ uv run pytest
175
+ ```
176
+
177
+ To run a checkout from an MCP client, use `uv run --directory /path/to/lr-mcp lr-mcp` as the command. Without installing, `uvx lr-mcp <command>` also works.
178
+
179
+ ## License
180
+
181
+ [MIT](LICENSE)
lr_mcp-0.1.0/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # lr-mcp
2
+
3
+ An unofficial MCP server for **Adobe Photoshop Lightroom** — the cloud-based Lightroom app, not Lightroom Classic. It talks to the [Lightroom Partner API](https://developer.adobe.com/lightroom/lightroom-api-docs/) (`https://lr.adobe.io`) with your own Adobe credentials.
4
+
5
+ > This project is not affiliated with, endorsed by, or sponsored by Adobe. Adobe, Photoshop and Lightroom are either registered trademarks or trademarks of Adobe in the United States and/or other countries.
6
+
7
+ ## Tools
8
+
9
+ | Tool | What it does |
10
+ |---|---|
11
+ | `lr_login` | Browser OAuth sign-in (only needed when tokens are missing or expired) |
12
+ | `lr_account` | Subscription status and cloud storage usage |
13
+ | `lr_list_albums` | Search albums by path and get their ids |
14
+ | `lr_list_photos` | Filter by album, capture date, rating, pick/reject flag, camera, lens, ISO, file name |
15
+ | `lr_get_photo` | Capture info plus a summary of the photo's edit settings (XMP) |
16
+ | `lr_view_photos` | Return edited JPEG renditions as images the model can see (up to 12) |
17
+ | `lr_download_photos` | Save 640 – 2560 px or full-size JPEGs to disk |
18
+ | `lr_create_project_album` / `lr_add_to_project_album` / `lr_delete_project_album` | Manage project albums owned by this server |
19
+
20
+ ### Limits of the Partner API
21
+
22
+ - Edits (develop settings) and ratings of existing photos are read-only.
23
+ - Photos cannot be deleted.
24
+ - Albums you created in Lightroom cannot be modified; only project albums created through the API can.
25
+ - Preset contents cannot be read.
26
+
27
+ ## Setup
28
+
29
+ Setup takes about ten minutes. Steps marked **[human]** need a person at a browser; an AI agent can do the rest (see [For AI agents](#for-ai-agents)).
30
+
31
+ ### Prerequisites
32
+
33
+ - An Adobe account with a Lightroom plan or trial.
34
+ - [uv](https://docs.astral.sh/uv/getting-started/installation/) (`uv --version`). It installs Python 3.12+ itself if needed.
35
+ - `openssl` (`openssl version`). Preinstalled on macOS and most Linux distributions.
36
+
37
+ ### 0. Install
38
+
39
+ ```bash
40
+ uv tool install lr-mcp
41
+ lr-mcp doctor
42
+ ```
43
+
44
+ This puts an `lr-mcp` command in `~/.local/bin` (run `uv tool update-shell` and open a new terminal if the shell cannot find it). All later steps use it. Update with `uv tool upgrade lr-mcp`.
45
+
46
+ `doctor` checks the setup in order and prints the first thing to fix. Before you start step 1, it confirms that the sign-in callback port (8000 by default) is free; if it is not, choose another port now (see step 2) so the redirect URI you enter in step 1 matches.
47
+
48
+ ### 1. Create an Adobe credential [human]
49
+
50
+ Each user needs their own credential: until Adobe reviews an integration it accepts only 25 beta users, so a shared client ID is not practical.
51
+
52
+ 1. Sign in to the [Adobe Developer Console](https://developer.adobe.com/console) and click **Create new project**.
53
+ 2. In the project, click **Add API**, choose **Lightroom Services**, then pick the **OAuth Web App** credential type.
54
+ 3. Set **Default redirect URI** to `https://localhost:8000/callback` and **Redirect URI pattern** to `https://localhost:8000/.*`, then save. (If you chose another port in step 0, use it here instead of 8000.)
55
+ 4. Open **Lightroom Services** in the project's left menu, click **Manage beta users**, and add the email of the Adobe account you will sign in with. Without this, the API refuses the account.
56
+ 5. Open **Credentials → OAuth Web App** and keep the **Client ID** and **Client Secret** at hand for step 2.
57
+
58
+ ### 2. Save the credential
59
+
60
+ Settings live in a `.env` file in the state directory, which `doctor` prints on its first line (`~/.config/lr-mcp/` by default). Environment variables with the same names override the file.
61
+
62
+ | Variable | Required | Description |
63
+ |---|---|---|
64
+ | `ADOBE_CLIENT_ID` | yes | Client ID (also called API key) |
65
+ | `ADOBE_CLIENT_SECRET` | yes | Client secret |
66
+ | `LR_MCP_PORT` | no | Sign-in callback port, default `8000` |
67
+
68
+ Create the file, then open it in an editor and paste the two values after the `=` signs (add `LR_MCP_PORT=<port>` if you are not using 8000):
69
+
70
+ ```bash
71
+ mkdir -p ~/.config/lr-mcp
72
+ printf 'ADOBE_CLIENT_ID=\nADOBE_CLIENT_SECRET=\n' > ~/.config/lr-mcp/.env
73
+ chmod 600 ~/.config/lr-mcp/.env
74
+ open -e ~/.config/lr-mcp/.env # macOS; on Linux use any editor, e.g. nano
75
+ ```
76
+
77
+ To keep the state somewhere else, set the environment variable `LR_MCP_HOME` to a directory. It cannot go in `.env` (it says where `.env` is), so it must also be set for `lr-mcp login` and in the MCP client config (`"env"` in step 5). If `XDG_CONFIG_HOME` is set, the default is `$XDG_CONFIG_HOME/lr-mcp`.
78
+
79
+ ### 3. Sign in [human]
80
+
81
+ ```bash
82
+ lr-mcp login
83
+ ```
84
+
85
+ A browser window opens on the Adobe sign-in page. Sign in with the account added as a beta user and allow access. Adobe then redirects to `https://localhost:8000/callback`, which uses a self-signed certificate, so the browser shows a certificate warning: choose **Advanced → Proceed to localhost** (Chrome) or **Show Details → visit this website** (Safari). The page then says "Signed in" and the terminal prints where the tokens were saved. Tokens are stored with mode 600 and refreshed automatically.
86
+
87
+ ### 4. Check
88
+
89
+ ```bash
90
+ lr-mcp doctor
91
+ ```
92
+
93
+ Every line should start with `[ok]`, ending in `Catalog found. Setup is complete.` Otherwise it prints a `fix:` for the first problem and exits with status 1.
94
+
95
+ ### 5. Add to your MCP client
96
+
97
+ **Claude Desktop.** Edit the config file (create it if missing):
98
+
99
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
100
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
101
+
102
+ Add an entry under `mcpServers`, keeping any existing ones (if a `lightroom` entry already exists, replace it). Claude Desktop does not read your shell's `PATH`, so use the absolute path printed by `which lr-mcp`:
103
+
104
+ ```json
105
+ {
106
+ "mcpServers": {
107
+ "lightroom": {
108
+ "command": "/Users/<you>/.local/bin/lr-mcp"
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ If you set `LR_MCP_HOME`, add `"env": {"LR_MCP_HOME": "/path/to/dir"}` to the entry. Quit Claude Desktop completely and reopen it; the `lr_*` tools then appear in the tools menu. On macOS the server log is `~/Library/Logs/Claude/mcp-server-lightroom.log`.
115
+
116
+ **Claude Code:**
117
+
118
+ ```bash
119
+ claude mcp add lightroom -s user -- lr-mcp
120
+ ```
121
+
122
+ The client config can be added before or after signing in; without tokens the tools reply "Not signed in" and `lr_login` can do the sign-in from the chat.
123
+
124
+ ## Troubleshooting
125
+
126
+ | Symptom | Fix |
127
+ |---|---|
128
+ | `lr-mcp: command not found` | Run `uv tool update-shell` and open a new terminal, or call `~/.local/bin/lr-mcp` directly. |
129
+ | `doctor`: `Callback port … is in use` | Put `LR_MCP_PORT=<free port>` in `.env` and use that port in the console's redirect URI. |
130
+ | `doctor`: `Not set: ADOBE_CLIENT_ID…` | Step 2: fill in `.env` in the state directory. |
131
+ | The Adobe sign-in page shows an error right away | Usually a wrong `ADOBE_CLIENT_ID`: `doctor` cannot verify it before sign-in. Copy it again from the console. |
132
+ | `doctor`: `rejected the client id` | `ADOBE_CLIENT_ID` is wrong or the tokens belong to another credential. Fix `.env`, then sign in again. |
133
+ | `doctor`: `Lightroom API refused the account` | The signed-in account is not a beta user (step 1.4) or has no Lightroom plan. |
134
+ | The sign-in page says the redirect URI is invalid | The console's redirect URI must be exactly `https://localhost:<port>/callback`, with the same port as `LR_MCP_PORT`. |
135
+ | The sign-in redirect shows another app's page or never loads | Something else listens on the port (`lsof -iTCP:8000 -sTCP:LISTEN`). Use another port as above. |
136
+ | `login` times out after 5 minutes | The browser stopped at the certificate warning; proceed past it next time. |
137
+ | `Token refresh failed` | Run `lr-mcp login` again. |
138
+ | Tools missing in Claude Desktop | Use the absolute path to `lr-mcp`, fully restart the app, and read the log file above. |
139
+
140
+ ## For AI agents
141
+
142
+ If a user asks you to set this server up:
143
+
144
+ - **Never ask the user to paste the client secret into the chat, and never print `.env`.** Create the file with empty values (step 2, using the state directory `doctor` prints) and ask the user to fill it in with an editor. To check it without revealing values, `grep -cE '^ADOBE_CLIENT_(ID|SECRET)=.+' <state dir>/.env` must print `2`; `doctor` shows only the first characters of the client ID.
145
+ - Install (step 0) and run `lr-mcp doctor` before giving the user the console steps: it checks the callback port first, and the redirect URI they enter must use a free port. Run `doctor` again after every step; a `fix:` that starts with `[human]` is something to hand to the user.
146
+ - The user must create the credential, add the beta user, fill in `.env`, and finish the browser sign-in. Give them the exact console steps from step 1, with the port `doctor` reported in the redirect URI and pattern.
147
+ - `lr-mcp login` blocks for up to 5 minutes while the user signs in. Run it in the background or ask the user to run it, and warn them about the certificate page.
148
+ - Setup is done when `doctor` prints `Catalog found. Setup is complete.` Add the client config (step 5) before or after that. For Claude Desktop, merge into the existing JSON instead of overwriting it, use the absolute path from `which lr-mcp`, pass `LR_MCP_HOME` in `"env"` if it is set, and tell the user to quit and reopen the app.
149
+
150
+ ## Development
151
+
152
+ ```bash
153
+ git clone https://github.com/longfin/lr-mcp && cd lr-mcp
154
+ uv sync
155
+ uv run lr-mcp doctor
156
+ uv run pytest
157
+ ```
158
+
159
+ To run a checkout from an MCP client, use `uv run --directory /path/to/lr-mcp lr-mcp` as the command. Without installing, `uvx lr-mcp <command>` also works.
160
+
161
+ ## License
162
+
163
+ [MIT](LICENSE)
@@ -0,0 +1,36 @@
1
+ [project]
2
+ name = "lr-mcp"
3
+ version = "0.1.0"
4
+ description = "Unofficial MCP server for the Adobe Photoshop Lightroom Partner API: browse albums, filter and view photos, export renditions"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [{ name = "Swen Mun" }]
9
+ requires-python = ">=3.12"
10
+ dependencies = ["mcp>=2.3,<3"]
11
+ keywords = ["mcp", "lightroom", "adobe", "photography", "claude"]
12
+ classifiers = [
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Operating System :: OS Independent",
17
+ "Topic :: Multimedia :: Graphics",
18
+ ]
19
+
20
+ [project.urls]
21
+ Repository = "https://github.com/longfin/lr-mcp"
22
+
23
+ [project.scripts]
24
+ lr-mcp = "lr_mcp.server:main"
25
+
26
+ [build-system]
27
+ requires = ["hatchling"]
28
+ build-backend = "hatchling.build"
29
+
30
+ [dependency-groups]
31
+ dev = [
32
+ "pytest>=9.1.1",
33
+ ]
34
+
35
+ [tool.pytest.ini_options]
36
+ testpaths = ["tests"]
File without changes