PerSQL for Render
Edge SQLite for your Render services.
An isolated database per service, a branch per preview environment. Provision one, set three environment variables, and query with the SDK. Billed per use — no per-database fee.
How it works
Connect
Sign in and provision an isolated SQLite database in your namespace.
Set three vars
Paste PERSQL_TOKEN, PERSQL_DATABASE, PERSQL_API_URL into the service's Environment, or an Env Group.
Query
Read the vars with @persql/sdk and run SQL. Preview environments get their own branch.
Then query it
import { PerSQL } from "@persql/sdk";
const db = new PerSQL({
token: process.env.PERSQL_TOKEN,
baseURL: process.env.PERSQL_API_URL,
}).database(process.env.PERSQL_DATABASE);
const { data } = await db.query("SELECT 1 AS ok");
A database per preview
Point a coding agent at the Render MCP. preview_recipe returns the CI snippet that spawns a preview-pr-<n> branch when a preview environment opens and deletes it on close — branches carry the parent's schema, not its rows, so they're cheap until written to.
https://render.persql.com/mcp
Authenticate with a PerSQL bearer token. Tools: preview_list, preview_recipe.