> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Neon

> **This Connector is in Beta**
>
> Merge has validated Neon against the provider's documented API and not yet verified it against the live one, so its behavior can differ from the documentation. It carries the same tool surface it will have at general availability. [Connectors overview](/merge-agent-handler/connectors/overview) covers the tier and how to turn Beta Connectors off.

> **Ready to connect**
>
> Connects with credentials the end user enters, such as an API key, so you don't need to register an OAuth app.

**Authentication:** OAuth or API key. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Available Tools

#### add_auth_oauth_provider

Enable a social login provider on a branch's Neon Auth: oauth_provider_id is google, github, microsoft, vercel, apple or discord.

#### add_auth_trusted_domain

Add a trusted domain to a branch's Neon Auth so sign-in may redirect to it: domain is a URL with scheme ([https://app.example.com](https://app.example.com)).

#### approve_project_transfer_request

Accept a project transfer request sent to you, moving the project into org_id (list_organizations) or your own account when null; the sender loses it.

#### assign_project_member

Set an organization member's role on an org-owned project: viewer, editor or admin.

#### assign_vpc_endpoint

Assign a cloud VPC endpoint to an organization for Private Networking, or relabel an assigned one.

#### compare_database_schema

Compare a database's SQL schema on a branch with another branch (base_branch_id, by default the parent) and return a unified diff; lsn/timestamp and base_lsn/base_timestamp compare points in time.

#### count_branches

Count a project's branches without listing them; search counts only branches whose name matches.

#### count_projects

Count an organization's active projects without listing them (ones being created or deleted are not counted).

#### create_api_key

Create a personal Neon API key, or an organization key with org_id (from list_organizations), and return its token, which Neon shows only this once.

#### create_auth

Enable Neon Auth on a branch (list_projects gives project_id, list_branches gives branch_id).

#### create_auth_oauth_client

Register an OAuth client with a branch's Neon Auth OAuth server: name, type (confidential keeps a secret, public has none), redirect_uris, resources (from get_auth_oauth_server) and skip_consent.

#### create_auth_sdk_key

Generate SDK keys for a project's Neon Auth integration (legacy POST /projects/auth/keys).

#### create_auth_user

Create a user in a branch's Neon Auth directory with email and an optional display name.

#### create_branch

Create a branch in a project (list_projects gives project_id), by default forking the default branch's head.

#### create_bucket

Create a storage bucket on a Neon branch and return its name and access level.

#### create_compute

Create a compute endpoint on a branch: a read_write compute (one per branch) or a read_only replica.

#### create_credential

Issue a scoped credential on a Neon branch for object storage, the AI Gateway or functions.

#### create_data_api

Enable the Neon Data API (a PostgREST-compatible HTTP endpoint) on one database of a branch and return its url.

#### create_database

Create a Postgres database on a branch, owned by owner_name (an existing role from list_roles).

#### create_function_deployment

Deploy a new version of a Neon function; returns the deployment id and build status.

#### create_function_domain

Register a custom domain that routes to a Neon function and return its CNAME target and DNS, routing and overall status.

#### create_function_trigger

Create a trigger that calls a Neon function on a UTC cron schedule (type schedule) or after each matching upload to a bucket (type storage_object_created); returns its trigger_id.

#### create_jwks_url

Add a JWKS URL from an auth provider (e.g. Clerk, Auth0) so the project accepts tokens it signs.

#### create_org_invitation

Invite people to an organization by email, each with a role (admin, editor, viewer or collaborator).

#### create_presigned_url

Create a temporary GET download or PUT upload URL for one object.

#### create_project

Create a Neon project with its default branch, read-write compute, owner role and database.

#### create_project_permission

Share a project with a Neon account by email.

#### create_project_transfer_request

Create a request to transfer a project to another Neon account or organization.

#### create_realtime

Enable Neon Realtime on a branch, or apply new allowed_origins where it is on.

#### create_role

Create a Postgres role on a branch; returns it with its password.

#### create_snapshot

Take a snapshot of a branch, now or at an lsn or timestamp within its restore window, with an optional name and expires_at.

#### create_vpc_endpoint_restriction

Restrict a project so it accepts connections only through a VPC endpoint (Private Networking), labelled label; connections from elsewhere are refused.

#### delete_api_key

Revoke a Neon API key; anything using it stops working at once and it cannot be restored, so confirm with the user first.

#### delete_auth

Disable Neon Auth on a branch; sign-in stops working for the app.

#### delete_auth_oauth_client

Delete an OAuth client from a branch's Neon Auth OAuth server (list_auth_oauth_clients gives client_id); it can no longer start sign-ins, but tokens already issued are not revoked.

#### delete_auth_oauth_provider

Remove a social login provider from a branch's Neon Auth; users can no longer sign in with it.

#### delete_auth_trusted_domain

Remove trusted domains from a branch's Neon Auth; sign-in can no longer redirect to them.

#### delete_auth_user

Delete a user from a branch's Neon Auth directory; cannot be undone, so ask the user first.

#### delete_branch

Delete a branch with all its data and computes; ask the user first.

#### delete_bucket

Delete an empty storage bucket from a Neon branch.

#### delete_compute

Delete a compute endpoint, dropping its connections; the branch and its data remain.

#### delete_credential

Revoke a scoped credential on a Neon branch so it stops working.

#### delete_data_api

Delete the Neon Data API of one database.

#### delete_database

Delete a database and all its data from a branch; ask the user first.

#### delete_function

Permanently delete a Neon function and its deployments from a branch.

#### delete_function_domain

Remove a custom domain from a Neon branch so it stops routing to its function.

#### delete_function_trigger

Delete a function trigger, or hide an inherited one on this branch, so it stops firing.

#### delete_jwks_url

Remove a JWKS URL from a project; tokens it signed no longer authenticate.

#### delete_project

Delete a project with all its branches, computes, databases and roles; ask the user first.

#### delete_project_permission

Stop sharing a project with an account; it loses access and revoked_at is set.

#### delete_realtime

Disable Neon Realtime on a branch and discard its shared secret: connected clients are dropped and tokens issued with the secret stop working.

#### delete_role

Delete a Postgres role from a branch; it cannot be undone and the role's connections are dropped.

#### delete_snapshot

Delete a snapshot; ask the user first. Branches already restored from it are kept.

#### delete_spending_limit

Remove an organization's monthly spending limit so no spending alerts are sent.

#### delete_storage_object

Delete one object by its exact key. Get project_id from list_projects, branch_id from list_branches, bucket_name from list_buckets and object_key from list_storage_objects.

#### delete_storage_object_by_prefix

Soft-delete objects materialized on this branch under a folder prefix ending in '/' and return the count.

#### delete_vpc_endpoint

Delete a VPC endpoint from an organization.

#### delete_vpc_endpoint_restriction

Remove a VPC endpoint restriction from a project; once none remain the project accepts connections from anywhere its IP allowlist permits.

#### download_storage_object

Download a storage object as a file. Requires an OAuth connection with object download access; with an API key, use create_presigned_url with `operation='download'`.

#### finalize_branch_restore

Finalize a restored branch (restore_status restored): it takes over the original branch's computes and name, restarting them, and the original is renamed to name.

#### get_ai_gateway

Get the AI Gateway endpoint of one Neon branch (beta).

#### get_anonymization

Get the anonymization status of an anonymized branch: state (created, initialized, anonymizing, anonymized, error...), status message, failure time and the last run's details.

#### get_auth

Get the Neon Auth integration of a branch: auth provider, provider project ID, database, owner, transfer status, created time, application name, jwks_url and base_url.

#### get_auth_allow_localhost

Get whether a branch's Neon Auth lets sign-in redirect to localhost (allow_localhost), for local development.

#### get_auth_email_password

Get the email and password sign-in settings of a branch's Neon Auth: enabled, verification method (link or otp), required verification, auto sign-in, verification emails on sign-up and sign-in,…

#### get_auth_email_provider

Get the email server a branch's Neon Auth sends emails through: type (standard SMTP or Neon's shared server), host, port, username, sender email and name.

#### get_auth_oauth_client

Get one OAuth client of a branch's Neon Auth OAuth server by client_id (list_auth_oauth_clients): name, type, redirect URIs, linked resources, consent skip, disabled and created time; never the…

#### get_auth_oauth_server

Get the OAuth server settings of a branch's Neon Auth (Neon Auth as an authorization server for your own apps and MCP clients): enabled, login and consent pages, MCP registration settings and…

#### get_auth_phone_number

Get the phone number sign-in settings of a branch's Neon Auth: enabled and otp_expires_in (seconds a one-time code stays valid).

#### get_auth_plugin_config

Get every Neon Auth setting of a branch in one call: organization, magic link and phone number plugins, the OAuth server, email server, email and password sign-in, social login providers, localhost…

#### get_auth_webhook

Get the webhook of a branch's Neon Auth: enabled, webhook_url, enabled_events (user, OTP, magic link, invitation and phone events) and timeout_seconds.

#### get_branch

Get one branch by ID: name, parent, state, default flag, protection, expiry, restore status, sizes and timestamps, plus its annotation (key-value metadata).

#### get_compute

Get one compute endpoint: host, type, branch, current_state (init, active or idle), autoscaling limits, suspend timeout and settings.

#### get_connection_uri

Get a Postgres connection string (with the role's password: a secret) for database_name and role_name (list_databases and list_roles) on a branch (list_branches; default branch if null) through a…

#### get_credential

Reveal the live api_token and s3_secret_access_key of an existing scoped credential, e.g. when the issuance response was lost.

#### get_data_api

Get one database's Neon Data API: url, deployment status, settings (exposed db_schemas, anon role, row limit, JWT and CORS options), available_schemas and auth provider fields.

#### get_database

Get one database on a branch by name, with its ID, owner role and timestamps.

#### get_database_schema

Get a database's schema on a branch, as SQL DDL (format sql, in sql) or structured JSON (format json, in structured_schema), at head or at an lsn or timestamp.

#### get_function

Get one Neon function by slug: its name, invocation URL, and current and active deployments with build status and environment variable names.

#### get_function_trigger

Get one function trigger by trigger_id: its type, target function, path, cron schedule and next run, or watched bucket and prefix, and enabled state.

#### get_operation

Get one operation run on a Neon project (an action such as create_branch, create_timeline or start_compute) with its status: scheduling, running, finished, failed, error, cancelling, cancelled or…

#### get_org_member

Get one organization membership: its role, user_id and join date.

#### get_organization

Get one Neon organization's details: name, handle, billing plan, who manages it, creation and update times, and its MFA, HIPAA and SSO enforcement settings.

#### get_project

Get a project's details: name, region, Postgres version, owner, settings (quota, allowed IPs, maintenance window), compute defaults, history retention and this period's usage.

#### get_realtime

Get a branch's Neon Realtime state: enabled, pending (a change is still applying), invocation_url, revision and allowed_origins.

#### get_role

Get one Postgres role on a branch: name, protected flag, sign-in method and timestamps (no password; use get_role_password).

#### get_role_password

Reveal a Postgres role's current password (a secret: do not echo it unless asked).

#### get_snapshot_schedule

Get a branch's automatic snapshot schedule: each entry's frequency, hour, day, month and retention_seconds.

#### get_spending_limit

Get an organization's monthly spending limit in cents.

#### get_storage

Check whether branchable object storage (beta) is usable on one Neon branch: enabled is true with s3_endpoint, region and force_path_style for an S3 client; otherwise enabled is false with reason…

#### get_user

Get the signed-in Neon user's account: ID, email, name, last name, login, avatar, plan, plan limits (active time, compute time, projects, branches, max autoscaling size), linked login accounts and…

#### get_vpc_endpoint

Get one organization VPC endpoint's state and configuration: label, state (new or accepted) and the projects restricted to it.

#### list_advisor_issues

Analyze a database for security and performance issues (severity, title, detail, remediation link).

#### list_api_keys

List Neon API keys: personal keys, or an organization's keys with org_id (from list_organizations).

#### list_auth_oauth_clients

List the OAuth clients registered with a branch's Neon Auth OAuth server: client_id, name, confidential or public, redirect URIs, linked resources, consent skip, disabled and created time.

#### list_auth_oauth_providers

List the social login providers enabled on a branch's Neon Auth (google, github, microsoft, vercel, apple, discord): id, standard or shared credentials, client ID, masked secret and Microsoft/Apple…

#### list_auth_trusted_domains

List the trusted domains of a branch's Neon Auth: the URLs sign-in may redirect to, each with its auth provider.

#### list_branches

List a project's branches (id, name, parent, state, default flag, protection, sizes) with their annotations.

#### list_buckets

List storage buckets visible on a Neon branch, including inherited buckets.

#### list_computes

List the compute endpoints of a project, or of one branch when branch_id is set, with each compute's ID, host, type and state.

#### list_consumptions

List Neon usage over a period, bucketed hourly (168 hours back), daily (60 days) or monthly (one year).

#### list_credentials

List the scoped credentials issued on a Neon branch, without secrets.

#### list_databases

List the Postgres databases on a branch with their ID, name and owner role.

#### list_function_domains

List the custom domains registered on a Neon branch, one page at a time, with each domain's target function, CNAME target and DNS, routing and overall status.

#### list_function_triggers

List every function trigger visible on a Neon branch, inherited ones included, with each trigger's type, target function, path, schedule or watched bucket, and enabled state.

#### list_functions

List the functions on a Neon branch, one page at a time, with each function's slug, name, invocation URL and current and active deployments.

#### list_jwks_urls

List the JWKS URLs a project trusts to verify sign-in tokens, with provider, branch, audience and roles.

#### list_log_field_values

List the distinct values one log field took on a branch in a time window (default the last six hours, at most seven days), e.g. every service_name seen; use them as exact search_logs filters.

#### list_log_fields

List the low-cardinality log fields seen on a branch's logs, such as service_name, severity_text or entity_type.

#### list_masking_rules

List the masking rules of an anonymized branch: each column (database, schema, table, column) and the masking function or literal value applied.

#### list_operations

List the operations run on a Neon project (branch, compute and timeline actions), each with its id, action, status, branch_id, endpoint_id and timing.

#### list_org_invitations

List an organization's invitations with each invitee's email, role, inviter and invitation time.

#### list_org_members

List a Neon organization's members: id, user_id, role, join date, email, MFA status and deactivation time.

#### list_organizations

List the Neon organizations the caller belongs to: ID, name, handle, plan, who manages it, MFA requirement and timestamps.

#### list_preload_libraries

List the shared preload libraries a project can enable for its Postgres version, with description, version and default/experimental flags.

#### list_project_members

List organization members and their roles on an org-owned project (member ID, email, org role, project role, explicit and effective access).

#### list_project_permissions

List who a project is shared with: each permission ID, email, grant time and revoke time.

#### list_projects

List Neon projects (id, name, region, Postgres version, owner org, settings, usage).

#### list_regions

List the Neon regions projects can be created in, with each region's ID, name, approximate location and whether it is the default.

#### list_roles

List the Postgres roles on a branch (name, protected flag, sign-in method, timestamps); passwords are not included (get_role_password).

#### list_snapshots

List a project's snapshots, manual and scheduled, with each one's id, name, source branch, lsn, timestamp, created_at and expires_at.

#### list_storage_objects

List visible objects, including inherited objects, in a Neon storage bucket.

#### list_vpc_endpoint_restrictions

List the VPC endpoints a project is restricted to (vpc_endpoint_id and label).

#### list_vpc_endpoint_services

List the AWS VPC endpoint service names Neon offers in one region for Private Networking (PrivateLink); add every returned name to your VPC endpoint.

#### list_vpc_endpoints

List the private networking VPC endpoints assigned to an organization, with each endpoint's ID, label and region.

#### move_project

Move one or more projects (up to 400) from one organization to another.

#### read_storage_object_text

Read a storage object's contents as text: extracts PDF, DOCX and XLSX and decodes text files, up to 25 MB.

#### remove_org_member

Remove a member from an organization, revoking their access to its projects.

#### restore_branch

Restore a branch to the state of source_branch_id (itself or another branch, via list_branches) at head, source_lsn or source_timestamp, replacing its data; ask the user first.

#### restore_project

Recover a project deleted in the last 7 days, with its branches.

#### restore_snapshot

Restore a snapshot into a new branch, optionally named, to preview its data.

#### rotate_auth_oauth_client_secret

Rotate the secret of a confidential OAuth client of a branch's Neon Auth (list_auth_oauth_clients gives client_id): the old secret stops working at once and the new client_secret is returned only…

#### rotate_credential

Rotate a scoped credential's secrets in place: token_id, scopes and expiry stay, the old secrets stop working, and it returns the new api_token and s3_secret_access_key.

#### rotate_realtime_secret

Rotate a branch's Neon Realtime shared secret.

#### run_anonymization

Start masking the data of an anonymized branch with its masking rules (set them with update_masking_rules); this overwrites the branch's data.

#### search_logs

Search a branch's log records (Postgres compute, storage, functions, Neon Auth) in a time window (default the last hour, at most seven days), newest first unless sort_order is asc.

#### send_auth_test_email

Send a test email to recipient_email through the SMTP server saved on a branch's Neon Auth (update_auth_email_provider).

#### set_default_branch

Make a branch the project's default branch; the previous default loses the flag.

#### transfer_auth_ownership

Start moving a project's Neon-managed auth provider project to your own provider account (legacy POST /projects/auth/transfer_ownership).

#### transition_compute

Start, suspend or restart a compute endpoint.

#### unassign_project_member

Remove a member's explicit role on an org-owned project; their access falls back to the organization default.

#### update_auth_allow_localhost

Allow or block localhost redirects on a branch's Neon Auth: `allow_localhost=true` for local development, false for production.

#### update_auth_config

Rename the application of a branch's Neon Auth: name is shown in auth emails and other messages.

#### update_auth_email_password

Change email and password sign-in on a branch's Neon Auth: enabled, email_verification_method (link or otp), require_email_verification, auto_sign_in_after_verification, verification emails on sign-up…

#### update_auth_email_provider

Set the email server of a branch's Neon Auth.

#### update_auth_logs_export

Turn the export of a branch's Neon Auth events to Neon platform logs on (`enabled=true)` or off.

#### update_auth_magic_link

Change magic link sign-in on a branch's Neon Auth: enabled, expires_in (minutes, 5 to 1440) and disable_sign_up (stop links from creating accounts).

#### update_auth_oauth_client

Change an OAuth client of a branch's Neon Auth (list_auth_oauth_clients gives client_id): name, redirect_uris and resources (each replaces the stored list), skip_consent, disabled.

#### update_auth_oauth_provider

Change a social login provider's credentials on a branch's Neon Auth (list_auth_oauth_providers gives oauth_provider_id): client_id, client_secret, microsoft_tenant_id, apple_team_id, apple_key_id.

#### update_auth_oauth_server

Change the OAuth server of a branch's Neon Auth: enabled, login_page, consent_page, mcp (resource URL, dynamic_registration, client_id_metadata_documents) and resource_identifiers, which replaces the…

#### update_auth_organization_plugin

Change the organization plugin of a branch's Neon Auth (user organizations in your app): enabled, organization_limit per user, membership_limit per organization, creator_role (owner or admin) and…

#### update_auth_phone_number

Change phone number sign-in on a branch's Neon Auth: enabled and otp_expires_in (seconds, 60 to 600).

#### update_auth_user_role

Set the roles of a Neon Auth user, replacing the current ones: roles lists every role to keep (user and admin are built in; custom names work).

#### update_auth_webhook

Replace the webhook of a branch's Neon Auth: enabled (required), webhook_url, enabled_events (user.before_create, user.created, send.otp, send.magic_link, organization.invitation.created or .accepted,…

#### update_branch

Rename a branch, protect or unprotect it, or set or remove its expiry; fields left null are unchanged.

#### update_compute

Change a compute endpoint's name, autoscaling limits, suspend timeout, disabled flag or Postgres settings; fields left null stay unchanged.

#### update_data_api

Change one database's Neon Data API settings and refresh its schema cache so new tables and columns are served.

#### update_database

Rename a database or change its owner role; fields left null are unchanged.

#### update_function

Set or clear the display name of a Neon function and return the updated function.

#### update_function_trigger

Change a function trigger's name, target function, path, enabled state, cron schedule or watched bucket and prefix.

#### update_masking_rules

Replace every masking rule of an anonymized branch with masking_rules (start from list_masking_rules to keep existing ones; \[] clears them).

#### update_org_member

Change an organization member's role to admin, editor (legacy alias member), viewer or collaborator, replacing the current role.

#### update_project

Change a project's name, settings (quota, allowed_ips, maintenance_window, logical replication...), default compute settings or history retention; fields left null are unchanged.

#### update_role_password

Reset a Postgres role's password to a new generated one, returned with the role (a secret) and the operations that apply it; connections using the old password stop working once they finish.

#### update_snapshot

Rename a snapshot or change when it expires (expires_at, or remove_expiry to keep it forever).

#### update_snapshot_schedule

Replace a branch's automatic snapshot schedule with the given entries (frequency daily, weekly or monthly, plus hour, day, month, retention_seconds); ask the user first.

#### update_spending_limit

Set or replace an organization's monthly spending limit, in cents.