Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 11,454 Bytes
427634d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | # Connecting your AI assistant to Vision Lighting (MCP setup)
This guide shows you how to let an AI assistant β **Claude** or **Codex** β
drive the Vision Lighting matching tool for you: create jobs, upload schedules,
run matching, review results, leave feedback, and download the comparison
spreadsheet, all from a chat instead of clicking through the website.
It works through something called **MCP** (Model Context Protocol) β think of it
as a secure plug that connects your assistant to your Vision Lighting account.
**You do not need to be technical.** There are two ways to connect β pick the
one that matches your assistant:
- **Method 1 β Sign-in connector (recommended for Claude Desktop & ChatGPT).**
Paste one web address into the app and log in with your Vision Lighting
account in a browser window. **No token, no terminal, nothing to copy.**
- **Method 2 β Access token (for command-line tools: Claude Code, Codex).**
Generate a secret token on the website and paste one line into the tool.
Both give the assistant the same abilities and **your** account's permissions.
---
## Before you start
- Your Vision Lighting web address:
**https://danielkretschmer-lighting-mvp.hf.space**
- Your login (email + password) for that website.
- One AI assistant signed in. Pick whichever you already use:
- **Claude Desktop** β the Claude app on Mac/Windows β use **Method 1**.
- **ChatGPT** β the OpenAI app/website (Plus/Pro/Business) β use **Method 1**.
- **Claude Code** β Anthropic's command-line assistant β use **Method 2**.
- **Codex** β OpenAI's command-line assistant β use **Method 2**.
> However you connect, the assistant acts with **your** permissions. If your
> account is an admin, it can do admin things; if it's a normal operator
> account, it can do everything an operator can and nothing more.
---
## Method 1 β Sign-in connector (Claude Desktop & ChatGPT)
This is the easiest way. You paste **one web address** and log in β there is no
token to generate or copy.
> The address to paste is:
> **`https://danielkretschmer-lighting-mvp.hf.space/mcp`**
### In Claude Desktop
1. Open **Settings β Connectors** and click **Add custom connector**.
2. Give it a name (e.g. `Vision Lighting`) and paste the address above into the
**URL / Remote MCP server** field. Click **Add**.
3. Claude opens a browser window. It lands on a **Vision Lighting** sign-in
page β enter your account email (or username) and password and click
**Sign in & approve**.
4. The window closes and the connector shows as **connected**. You now have a
set of "lighting" tools in your chats.
### In ChatGPT
1. Turn on connectors: **Settings β Connectors** (on some plans this lives
under **Settings β Apps & Connectors** or requires **Developer mode**).
2. Click **Add / Create custom connector**, paste the address above as the
**MCP server URL**, and choose **OAuth** for authentication if asked.
3. Click **Connect / Sign in**. A **Vision Lighting** sign-in page opens β enter
your account email (or username) and password and approve.
4. Once it says connected, ChatGPT can use the lighting tools.
> **What you're approving:** the sign-in page is our own. You're letting that
> app use your Vision Lighting account with your permissions. You can undo it
> any time by removing the connector in the app (and, if you're an admin,
> tokens can be cleared server-side).
Now skip to **Step 3 β Try it** below.
---
## Method 2 β Access token (Claude Code & Codex)
Command-line tools connect with a secret token instead of a browser sign-in.
### Step 1 β Generate your access token
1. Open **https://danielkretschmer-lighting-mvp.hf.space** and log in.
2. Click the **settings button** at the top of the page (hovering over it shows
*"Pipeline model settings"*).
3. Scroll to the section titled **"API tokens (MCP & programmatic access)"**.
4. Type a name so you remember what it's for β e.g. `My Claude` β and click
**Mint token**.
5. A long secret will appear that starts with **`lmvp_`**. **Copy it now and
paste it somewhere safe** (a password manager is ideal).
- β οΈ It is shown **only once**. If you lose it, just mint a new one and
delete the old one β no harm done.
That secret is your token. Anywhere below that says `lmvp_YOUR_TOKEN`, paste
your real token in its place.
---
### Step 2 β Connect your command-line tool
Pick the section that matches the tool you use. You only need one.
#### Option A β Claude Code (recommended, easiest)
1. Install Claude Code (from Anthropic's website) if you don't have it yet.
**Don't start it yet** β leave your normal terminal open.
2. In your **normal terminal** (your regular command prompt β *not* inside
Claude), **replace `lmvp_YOUR_TOKEN` with your token**, then paste this
single line and press Enter:
```
claude mcp add --transport http lighting https://danielkretschmer-lighting-mvp.hf.space/mcp/ --header "Authorization: Bearer lmvp_YOUR_TOKEN"
```
> It's all **one line** β let it wrap on screen; don't add any line breaks.
> You run this once, from the terminal β *not* from a chat inside Claude.
**Already added it before?** If you see *"MCP server lighting already
exists"*, remove the old one first, then run the line above again:
```
claude mcp remove lighting
```
3. **Now** start Claude by typing `claude` and pressing Enter. It will have a
new set of "lighting" tools available.
To remove it later, run this in the terminal: `claude mcp remove lighting`.
#### Option B β Claude Desktop, the token way (advanced)
> **Most people should use Method 1 above instead** β the sign-in connector is
> far simpler and needs no token or Node.js. Use this token method only if you
> specifically want it.
The Claude Desktop app can also connect through a tiny free helper called
`mcp-remote`. You'll add a small block to its settings file.
1. In Claude Desktop, open **Settings β Developer β Edit Config**. This opens a
file called `claude_desktop_config.json` in a text editor.
2. Paste this inside it (if the file already has a `"mcpServers"` section, add
the `"lighting"` block inside it). **Replace `lmvp_YOUR_TOKEN`:**
```json
{
"mcpServers": {
"lighting": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://danielkretschmer-lighting-mvp.hf.space/mcp/",
"--header",
"Authorization: Bearer lmvp_YOUR_TOKEN"
]
}
}
}
```
3. Save the file and **fully quit and reopen Claude Desktop**.
4. You should see a π / tools icon indicating "lighting" is connected.
> The first time, `npx` downloads the helper automatically β this needs an
> internet connection and Node.js installed. If you don't have Node.js, install
> it from nodejs.org (pick the "LTS" version), then reopen Claude Desktop.
#### Option C β Codex (OpenAI's command-line assistant)
Codex also uses the `mcp-remote` helper. Add this to your Codex config file
(`~/.codex/config.toml` on Mac/Linux), replacing `lmvp_YOUR_TOKEN`:
```toml
[mcp_servers.lighting]
command = "npx"
args = [
"-y",
"mcp-remote",
"https://danielkretschmer-lighting-mvp.hf.space/mcp/",
"--header",
"Authorization: Bearer lmvp_YOUR_TOKEN",
]
```
Save the file and restart Codex.
---
## Step 3 β Try it
Open your assistant and ask it something simple, like:
> *"Using the lighting tools, list my recent runs."*
or
> *"Who am I on the lighting server?"*
If it answers with your account name or a list of runs, you're connected. π
A full job, start to finish, sounds like:
> *"Create a lighting job called 'Newtown', upload this schedule PDF, run the
> matching, wait for it to finish, then show me the matches and give me a link
> to download the comparison spreadsheet."*
---
## What the assistant can do for you
Once connected, you can ask it (in plain English) to:
- **Set up & run:** create a job, upload schedule PDFs, start a run, and wait
for it to finish.
- **Review:** list the matched items, see *why* the model picked a product
(its reasoning, the runner-up candidates, the rule checks), and read the
run's activity log.
- **Correct:** add or delete line items, fix an extracted field (e.g. wattage),
pick a different product (even one not in the suggested list), replace an
item's image, and reorder the items to match the original schedule.
- **Manage runs:** rename, flag, archive, cancel, retry a whole run, or retry
just one item or one stage; get a share link to a run.
- **Export:** get a download link for the comparison Excel file.
- **(Admin accounts only):** switch the AI model/provider, check credential
health, and manage users and tokens.
If you ask for something your account isn't allowed to do, the assistant will
simply be told *"permission required"* β nothing breaks.
---
## Managing your tokens & staying safe
- **Treat your token like a password.** Anyone who has it can act as you.
- You can create **more than one** token (e.g. one per device) and give each a
name, so you can tell them apart.
- To revoke one, go back to the **API tokens** section (Step 1) and click
**Revoke** next to it. The assistant using that token immediately loses
access; everything else keeps working.
- If you ever think a token leaked, revoke it and mint a fresh one β then update
the one line / config block from Step 2.
---
## Troubleshooting
| Problem | Fix |
|---|---|
| **(Method 1)** The sign-in page won't accept my login | Use the **same** email/username + password you use on the Vision Lighting website. If you forgot it, ask an admin to reset it. |
| **(Method 1)** Browser window didn't open, or closed without connecting | Remove the connector and add it again. Make sure the URL is exactly `https://danielkretschmer-lighting-mvp.hf.space/mcp` (no trailing slash needed here). |
| **(Method 1)** ChatGPT doesn't show "add custom connector" | Custom MCP connectors need a paid plan and may be under **Developer mode** β turn it on in **Settings β Connectors**. |
| "MCP server lighting already exists in local config" | You already added it. Run `claude mcp remove lighting` in the terminal, then run the add command again. |
| Assistant says it can't reach the server / "unauthorized" | Re-check the token. Make sure the whole thing (including the `lmvp_` start) was copied, with no extra spaces, and that it's pasted after `Bearer ` (with one space). |
| "404" or "not found" | Make sure the address ends with **`/mcp/`** (with the trailing slash), exactly as shown. |
| Claude Desktop / Codex shows nothing connected | Make sure **Node.js** is installed (nodejs.org, LTS), then fully quit and reopen the app. |
| You lost the token | You can't see it again β just mint a new one (Step 1) and revoke the old one. |
| It worked, then stopped | The token may have been revoked. Mint a new one and update Step 2. |
---
## In one breath
- **Claude Desktop / ChatGPT:** add a custom connector β
`https://danielkretschmer-lighting-mvp.hf.space/mcp` β sign in with your
account β done. No token.
- **Claude Code / Codex:** website β settings β **API tokens** β **Mint token**,
then paste one line/config block (with your `lmvp_β¦` token) into the tool.
- Then ask the assistant to *"list my lighting runs."* π
|