Postgres for AI agents
Agents create, query and delete Postgres databases through the API, CLI or MCP server, with scoped keys and scale to zero built in.
The database primitives agents need: a Postgres per task, created through the API, CLI or MCP server, that costs no compute when nobody is using it.
Agents create, query and delete Postgres databases through the API, CLI or MCP server, with scoped keys and scale to zero built in.
Claude Code, Cursor, Codex and other coding agents work with Xata through the MCP server and CLI.
Hand setup to your coding agent. It installs the CLI, creates a project and connects your app.
An agent that needs a scratch database should not wait on a ticket or share one with every other run. With Xata it creates one when the task starts and deletes it when the task ends.
$ xata branch create --name my-test --no-parent
✓ Postgres ready · ~1s
postgresql://xata@db.xata.tech/my-test
Instead of one database that lives for years, agents create many that live for minutes. Fast provisioning makes that practical, and scale to zero keeps the idle ones from adding up.
A new database is ready in about a second. A branch with a copy of real data takes about three.
Turn on scale to zero and an idle database releases its compute. The next connection wakes it.
Agents already write the queries. With Xata they can also create the branch to run them on.
Paste one prompt into your coding agent and it walks you through the setup, asking before it creates anything billable.
Your agent asks first, then installs it.
Sign in through the browser, or use a scoped API key in CI.
The agent proposes the settings and asks before creating anything billable.
Credentials go into a gitignored env file, never into the chat.
Create a database when the task starts, delete it when it ends.