Install PerSQL in your client
Pick the runtime you’re already using. The default config is the URL alone — OAuth-capable runtimes negotiate access in the browser the first time you use a tool, and store the issued token. A static bearer header is supported as fallback for runtimes without OAuth.
- Claude Code — one-line CLI command.
- Claude Desktop — JSON config.
- Cursor — JSON config.
- Cline — JSON config.
- Windsurf — JSON config.
- Other clients — stdio fallback via
mcp-remotefor any client without remote HTTP MCP support.
Agent Skill
Section titled “Agent Skill”For Agent Skills-compatible runtimes (Claude Code,
Cursor, Codex, Gemini CLI, Goose, and others), PerSQL ships a persql skill —
a portable folder that teaches an agent the per-agent-database workflow:
provision a sandbox per task, pre-flight writes, replay what changed, and stay
aware of spend. The agent loads it on demand when a task needs SQL, and it rides
the same MCP / SDK / HTTP surfaces below — no extra setup.
Install it with the CLI:
npm i -g @persql/clipersql skill install # into ./.claude/skillspersql skill install --global # into ~/.claude/skillspersql skill install --dir <skills-path> # any other clientWhen you need a token explicitly
Section titled “When you need a token explicitly”OAuth handles the common case. Mint a psql_live_… token under
console.persql.com → API tokens →
New token when you need it for the CLI, direct HTTP calls, or an
MCP runtime that doesn’t yet implement the OAuth 2.1 flow. Tokens are
scoped to a namespace; an agent connected with the token sees every
database in that namespace.