Introduction
PerSQL is a SQLite-as-a-service running on Cloudflare’s edge. Each database lives inside a Durable Object with embedded SQLite, fully isolated from every other tenant. You can reach it from:
- The web console (console.persql.com) — sign in, click around, run SQL.
- The REST API (
/v1/*) —Authorization: Bearer psql_live_…. - The TypeScript SDK (
@persql/sdk) — same shape as the REST API. - MCP (mcp.persql.com) — typed SQL tools for any Model Context Protocol runtime.
- Public endpoints (
/p/:ns/:db/:slug) — parameterised SQL exposed as HTTP, optionally on your own domain. - The in-product agent — a Kimi K2.5–powered assistant inside the console that can list databases, run queries, draft tables, invite teammates, and more.
Two-minute tour
Section titled “Two-minute tour”-
Sign in at console.persql.com. PerSQL auto-provisions a workspace (the namespace, named after your handle) and a database called
main, and lands you directly on it. Free credit is applied to your balance — no card needed to start. -
Copy your API token. The first time you land on a database, the Connect panel shows a
psql_live_…token in a banner — copy it now, it’s shown only once. (Lost it? Mint a new one at API tokens → New token.) -
Run your first query — either click Run in the Query tab, or from your terminal:
Terminal window curl -X POST https://api.persql.com/v1/db/<your-handle>/main/query \-H "Authorization: Bearer psql_live_xxxxxxxxxxxx" \-H "Content-Type: application/json" \-d '{"sql":"SELECT 1 AS ok"}' -
Pick how to keep going:
- Wire up an agent — MCP for Claude Desktop /
Cursor, or the SDK’s
db.asTool(). - Browse the recipes — per-agent sandbox, sub-agent handoff, PR-preview DB, cost-aware loop.
- Publish a public endpoint.
- Read the concept primer if any of the above terms feel unfamiliar.
- Wire up an agent — MCP for Claude Desktop /
Cursor, or the SDK’s
You can create additional namespaces or databases at any time from the console; the auto-provisioned ones aren’t special.
What’s next
Section titled “What’s next”- Concepts — namespace, database, member, token.
- Console tour — what each screen does.
- Agents quickstart — wire an LLM to your data.
- Recipes — copy-pasteable patterns for the shapes PerSQL was built for.