# 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."* 🎉