Drop a Lumx integration into any codebase from the terminal: customer onboarding, on-ramp deposits, and transactions via the docs MCP server and a copy-paste prompt.
Claude Code runs as a terminal agent that can read your repo, write files, and execute commands. Paste the prompt below to scaffold a Lumx integration into an existing project — or to bootstrap a new one — without ever putting your API key in client code.
If your project doesn’t already have a CLAUDE.md, consider adding one rule:
CLAUDE.md
- Lumx API calls only run server-side. Never reference `process.env.LUMX_API_KEY` from a file that ends up in the browser bundle.
Claude Code can read every file in the working directory. Make sure .env.local is gitignored before you commit, and never paste your key into the chat.
The Lumx documentation ships as an MCP server so Claude Code can pull endpoint shapes and field definitions on demand — no copying schemas into the prompt. Run:
Add the MCP server
claude mcp add --transport http lumx-docs https://docs.lumx.io/mcp
Restart your session. Claude Code will now answer questions like “what fields does POST /transactions/on-ramp accept?” by querying the docs directly, and the agent will reach for the MCP automatically when it needs schema details mid-task.
In the Claude Code session, paste the prompt below.
Lumx integration prompt
Add a stablecoin payments backend that uses the Lumx API. Lumxconnects local banking rails to stablecoins so I can collect, hold,convert, and pay out money in either form.Rules- Read LUMX_API_KEY from environment variables (process.env in Node, os.environ in Python, ENV in Ruby, etc.). Never expose it in client-side code. Always call Lumx from server routes.- Pick the base URL from LUMX_ENV. Default to https://api-sandbox.lumx.io. Use https://api.lumx.io when LUMX_ENV is "production".- Send every request with the headers: Authorization: Bearer ${LUMX_API_KEY} Content-Type: application/json- On non-2xx responses, surface the Lumx error body and HTTP status. Do not retry 4xx.Before writing code- Inspect the repo and write idiomatic code for the existing stack — reuse the existing router style, HTTP client, and error helper if one is already there. If the project is empty, ask me which stack before scaffolding.Server routes to build1. POST /api/customers — calls Lumx POST /customers. Body: type ("INDIVIDUAL" or "BUSINESS"), name, taxId, country (ISO-3), email. Returns the Lumx customer record including verification.link.2. POST /api/on-ramp — calls Lumx POST /transactions/on-ramp. Body: customerId, currency (ISO-3), amount (string). Returns the rail-specific deposit instructions.3. GET /api/transactions/:id — calls Lumx GET /transactions/:id and returns the transaction's current status and timeline.UI to build- Customer onboarding screen: form that calls POST /api/customers, then renders verification.link as a button.- On-ramp deposit screen: form that picks a customer, sets a currency and amount, calls POST /api/on-ramp, then renders the returned deposit instructions.After writing- Run the app, hit each route once with curl in the terminal, and paste the responses back so I can confirm shape.Reference: https://docs.lumx.io
Claude Code will write the files, run the project, and (because the prompt asks for it) call each route with curl to confirm the shape. Walk the UI flow once: create a customer, open the verification link, start an on-ramp, and watch the transaction status update.
Yes — Lumx ships an MCP server that surfaces every page in this site as a tool. See MCP server for setup. Claude Code will pull endpoint shapes and field definitions on demand.
Claude Code 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?
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 work in a fresh, empty repo?
Yes. The prompt asks Claude Code to confirm a stack before scaffolding — just answer with the framework you want (Next.js, FastAPI, Rails, etc.) and it will set up an idiomatic project.