Skip to content

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.
  1. 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.

  2. 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 tokensNew token.)

  3. 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"}'
  4. 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.

You can create additional namespaces or databases at any time from the console; the auto-provisioned ones aren’t special.