A ready-to-use, AI-assisted development environment for building on the Grid API — Lightspark's payment infrastructure platform (international payouts, on/off-ramps, account management).
Clone it, run one script, and your AI coding tool (Claude Code, Cursor, or Codex) is wired up to Grid's MCP server, agent skill, and documentation.
- Node.js (provides
npx). - One of: Claude Code, Cursor, or Codex.
- A Grid account for later — you don't need a token to set up or to read docs and write code. You'll create one at https://app.lightspark.com the first time you use the MCP server (see Credentials). Start read-only + sandbox.
git clone <this-repo> grid-scaffolding
cd grid-scaffolding
./setup.shsetup.sh will:
- Install the
grid-apiagent skill (npx skills add lightsparkdev/grid-api— select your agent when prompted). - Create
.envfrom.env.example. - Refresh the cached Grid docs in
docs/cache/. - Generate a gitignored
.cursor/mcp.json(once.envis filled) and print the Codex config snippet.
That's it to start — you can now explore the docs and write code with no token.
You don't need any credentials to set up, read the docs, or write code. A token is
required only to use the Grid MCP server (search_docs or execute), so you
provide one exactly when you first need it — not upfront:
- First time you use the MCP server (exploring / searching docs): your agent will
ask for a token. Create a read-only sandbox token at https://app.lightspark.com
and add it where your client's MCP server reads it (
.envfor Claude Code/Cursor — see Per-client notes;~/.codex/config.tomlfor Codex). Running "Help me configure my Grid API credentials" also stores a copy for the skill. - First time you run a live
executeoperation (create a customer, send a payment): a read-only token is rejected, so your agent will ask you to swap in a write-capable sandbox token. - Only move to a production token once you understand the operations your agent runs.
The MCP server reads its credentials when your client connects, so after adding or
changing a token, reconnect/restart your client (and, for Claude Code, re-export the
env vars — see below) so grid_mcp picks it up.
-
Claude Code —
.mcp.jsonis committed and reads${GRID_CLIENT_ID}/${GRID_CLIENT_SECRET}from the environment. These must be exported before you launch Claude Code, or the MCP server cannot authenticate (source .envalone is NOT enough — the values must be exported):set -a; source .env; set +a claudeThe
grid-apiskill separately stores credentials in~/.grid-credentialsfor its own use; that store does not feed thegrid_mcpMCP server, so the exported env vars above are still required for MCP calls. -
Cursor —
setup.shgenerates.cursor/mcp.json(gitignored) from.env. Cursor rules live in.cursor/rules/grid.mdc. -
Codex — paste
config-templates/codex.config.toml.exampleinto~/.codex/config.tomland fill in credentials. (Codex's MCP format evolves — verify against current Codex docs if it does not connect.)
Once you're ready to use the MCP server, ask your agent:
Use the Grid MCP to list supported currencies.
This is the first call that needs a token, so your agent will prompt you for a read-only sandbox one (see Credentials). A successful result confirms both the MCP connection and your credentials.
- Never commit secrets. Real credentials live only in
.env(gitignored) and~/.grid-credentials. Committed configs use env-var references or placeholders. - Sandbox first. Use a read-only sandbox token while experimenting; only issue write-capable / production tokens once you understand what your agent will do.
| Path | Purpose |
|---|---|
.mcp.json |
Claude Code MCP config (env-var refs) |
.cursor/ |
Cursor MCP template + rules |
config-templates/ |
Codex config snippet |
CLAUDE.md, AGENTS.md |
Agent guidance |
docs/grid-context.md |
Curated links + credential/env reference |
docs/cache/ |
Cached copies of Grid's llms.txt / llms-full.txt (refresh with ./setup.sh --refresh-docs; agents prefer live docs / search_docs) |
setup.sh |
One-command setup (--refresh-docs to update cache) |