# Neon

<div style={{maxWidth: '720px'}}>
![The Neon connector in Workspace Settings, for Postgres projects, branches, and SQL queries, with a Connect button](</docs/_next/static/media/neon-connector.3p9zi-sqlrecf.jpg>)
</div>

The [Neon MCP server](https://neon.com/docs/ai/neon-mcp-server) lets agents query your databases and try schema changes on a branch before they touch your main data.

For use cases and example prompts, see [Neon for AI coding agents](/integrations/neon).

## What is Neon? [#what-is-neon]

[Neon](https://neon.com) is a serverless Postgres database that you can branch like code.

## What agents can do [#what-agents-can-do]

Once you connect Neon, agents can:

- Create, describe, and delete projects, branches, and databases
- Run SQL queries and transactions, and inspect tables and schemas
- Test a migration on a temporary branch before applying it
- Find slow queries and check database health
- Manage computes, snapshots, Postgres roles, and Neon Auth

Agents can only do what the connected Neon account or API key can do.

<Callout>
With full access, agents can run any SQL and delete projects, branches, and databases. Neon recommends its MCP server for development and testing, so connect an account that can't reach production data. To keep agents from changing anything, choose **Read only** when you sign in with Neon.
</Callout>

## Setup [#setup]

Go to **Workspace Settings → Connectors** (or a project's **Connectors** page). Click **Add**, search for Neon, and select it. You can also click **Connect** on the Neon card, or **Connect another** to add another account.

### Step 1: who the connection is for [#step-1-who-the-connection-is-for]

Choose **Me** or **Workspace** as the owner, then choose which agents can use the connection. The default is **Me**, with **My personal assistants** selected. From a project's **Connectors** page, only **In this project** is selected instead. Enable **Team assistants** or **Agents in projects** separately. Anyone in the workspace can use the connection through the team assistants you pick, and anyone with access to the projects you pick can use it, including in sessions they launch themselves. See [connection options](/docs/integrations/connectors#fill-in-the-connection-details) for what each choice means.

Click **Continue**.

### Step 2: how agents reach Neon [#step-2-how-agents-reach-neon]

The second screen has two tabs: **Neon account** and **Access token**. Pick one.

#### Neon account [#neon-account]

This tab is selected by default, and it's the easiest way in — there's no key to create.

Click **Continue to Neon** and sign in. On Neon's approval page, choose whether agents can reach **All projects you can access** or **One project** (enter the project's ID from the Neon Console, not its name), and pick their **Permissions**: **Read only**, or **Read and write** if agents should create branches, change data, or manage projects. Click **Approve**, and you land back on the Connectors page with **Neon connected**. To change these choices later, disconnect and connect again.

Agents then act in Neon as whoever signed in. If you enable **In projects**, anyone with access to those projects can use that account — so sign in with an account whose permissions you're happy to share.

#### Access token [#access-token]

Follow [Neon's API key docs](https://neon.com/docs/manage/api-keys#creating-api-keys) to create a personal or organization API key. Paste it into the **Neon API Key** field and click **Connect Neon**.

## Reconnecting and disconnecting [#reconnecting-and-disconnecting]

If an account connection stops working, the Connectors page shows a **Reconnect needed** badge on it, and agents run without Neon.

To fix it, click **Manage** next to the connection, then **Reconnect Neon**, and sign in again. You can only reconnect a personal connection you own; for someone else's, Superconductor tells you who to ask.

**Disconnect** also revokes Superconductor's access at Neon. For an access token, revoke the key in the Neon Console.

## When to use it [#when-to-use-it]

Ask agents to use Neon for a schema change, a data question, or a slow query. For example:

```text
Create a Neon branch for this ticket, apply the migration there, and tell me if anything breaks.
```

```text
How many customers signed up each week this quarter? Query our analytics database in Neon and put the numbers in a table.
```

```text
Our dashboard got slow this week. Use Neon to find the slowest queries and suggest indexes.
```

```text
Compare the schema on the Neon branch for this pull request with main, and list every difference.
```