# Neon Postgres — Pipedream Connect

> Serverless Postgres in seconds

- API slug: `neon_postgres` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Databases
- Website: https://neon.tech/
- This page (HTML): https://pipedream.com/apps/neon-postgres
- Tools: 7 actions · 5 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: neon_postgres`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "neon_postgres",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Delete Row(s):
const result = await mcp.callTool({
  name: "neon_postgres-delete-rows",
  arguments: {
    schema: "Schema",
    table: "Table",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "neon_postgres-delete-rows",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    neon_postgres: { authProvisionId: "apn_xxxxxxx" },
    schema: "Schema",
    table: "Table",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (7)

### `neon_postgres-delete-rows` — Delete Row(s) (Write)

Deletes a row or rows from a table. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/actions/delete-rows.md

### `neon_postgres-execute-custom-query` — Execute SQL Query (Write)

Execute a custom PostgreSQL query. See our docs to learn more about working with SQL in Pipedream.

Full schema: https://pipedream.com/apps/neon-postgres/actions/execute-custom-query.md

### `neon_postgres-find-row` — Find Row (Read-only)

Finds a row in a table via a lookup column. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/actions/find-row.md

### `neon_postgres-find-row-custom-query` — Find Row With Custom Query (Read-only)

Finds a row in a table via a custom query. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/actions/find-row-custom-query.md

### `neon_postgres-insert-row` — Insert Row (Write)

Adds a new row. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/actions/insert-row.md

### `neon_postgres-update-row` — Update Row (Write)

Updates an existing row. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/actions/update-row.md

### `neon_postgres-upsert-row` — Upsert Row (Write)

Adds a new row or updates an existing row. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/actions/upsert-row.md

## Triggers (5)

### `neon_postgres-new-column` — New Column (Polling)

Emit new event when a new column is added to a table. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/triggers/new-column.md

### `neon_postgres-new-or-updated-row` — New or Updated Row (Polling)

Emit new event when a row is added or modified. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/triggers/new-or-updated-row.md

### `neon_postgres-new-row` — New Row (Polling)

Emit new event when a new row is added to a table. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/triggers/new-row.md

### `neon_postgres-new-row-custom-query` — New Row Custom Query (Polling)

Emit new event when new rows are returned from a custom query that you provide. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/triggers/new-row-custom-query.md

### `neon_postgres-new-table` — New Table (Polling)

Emit new event when a new table is added to the database. See the documentation

Full schema: https://pipedream.com/apps/neon-postgres/triggers/new-table.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
