Prerequisites
- A Lumx account with a Sandbox API key
- Cursor installed and pointed at a project with a server-side runtime (Next.js, Remix, Express, SvelteKit, FastAPI, Django, Rails, etc.)
- A local env file (
.env.local,.env, or framework equivalent) the project already reads at runtime
Step 1 — Get your Lumx credentials
From the Lumx Dashboard, open Developers → API Keys and copy a Sandbox key. See Authentication. Keys are only shown once.Step 2 — Store the key locally
Add the secrets to your project’s env file. Keep the file out of git..env.local
.gitignore (append if missing)
Step 3 — Hook up the Lumx docs MCP
The Lumx documentation ships as an MCP server so Cursor can pull endpoint shapes and field definitions on demand — no copying schemas into the prompt. Add this to.cursor/mcp.json:
.cursor/mcp.json
Step 4 — Paste the prompt
Open the composer (Cmd+I / Ctrl+I) and paste:
Lumx integration prompt
Step 5 — Review the diff
Cursor will propose file changes. Reject any that put the API key in client-side code or that hardcode endpoints — both are common drifts when the agent rushes. Accept the rest, run the project, and walk the flow end-to-end.Example: a server-side Lumx helper
If you’d rather drop this in by hand, here’s the shape the prompt aims for.server/lumx.ts
FAQ
Should I use Cursor Rules to keep the agent honest?
Should I use Cursor Rules to keep the agent honest?
Yes. Add a rule that says “Lumx calls only run server-side. Never reference
process.env.LUMX_API_KEY from a file that ends up in the browser bundle.” Cursor will apply it to every follow-up edit.Cursor wants to commit my .env.local. What now?
Cursor wants to commit my .env.local. What now?
Reject the change and add
.env*.local to .gitignore first. If the file was already committed, rotate the key in the Dashboard and remove the file with git rm --cached .env.local.How do I switch from Sandbox to Production?
How do I switch from Sandbox to Production?
Replace
LUMX_API_KEY with a Production key and set LUMX_ENV=production. Production access requires a call with the Lumx team — see Environments.Can the same prompt extend an existing app?
Can the same prompt extend an existing app?
Yes. The prompt explicitly asks the agent to match your router style and reuse any fetch wrapper that’s already in the repo, so it slots into existing codebases without inventing new patterns.
Next steps
- Create a customer — full reference for the customer payload
- Webhooks — subscribe to status changes instead of polling
- MCP server — connect Cursor to Lumx’s docs MCP for inline answers