Using SaturnSQL with AI Coding Agents
You can run your own coding agent for doing queries in SaturnSQL. Give an agent such as Claude Code, Codex, or Cursor an API key and a link to the API docs, and it can browse your database schemas, run queries, and save the good ones to your query library while you review the results.
Looking for AI inside the editor instead? See the built-in AI SQL editor.
Already paying for Claude, ChatGPT, or Cursor? Then you don't have to pay us for AI too — connect the coding agent you already have. API access is included on every plan, including Free; the built-in AI assistant is an optional Pro feature.
1. Create an API key
API keys are available on all plans, including Free. Go to Settings → API keys. Give the key a name, pick an expiry, and choose its scopes: read (browse schemas and saved queries), execute (run SQL), and write (save queries). The key is shown once, so copy it right away. You can revoke it at any time.
2. Give the key and the docs to your agent
Paste the key into your agent's conversation together with the API reference at saturnsql.com/docs/api. That's all it needs — a prompt like this works:
Here is my SaturnSQL API key: sat_live_... API docs: https://saturnsql.com/docs/api Find out which customers signed up last week and save that as a query called "Weekly signups".
3. What the agent can do
List connections, browse schemas, run SQL (read-only validated, row-limited), and save or update queries. Everything else — keys, billing, users, deleting queries — is rejected and requires signing in.
What about MCP?
We don't offer a direct MCP server, but you don't need one: the API does all the same things, and you can use it the same way. Give your agent the key and the docs link, and it gets schemas, query execution, and saved queries — same result as an MCP integration.
Safety tips
Grant the smallest scope that does the job — read-only is the safe default. Combine it with a read-only database user for defense in depth, use short expiries for one-off tasks, and revoke keys you no longer need.