---
canonical_url: "https://docs.composio.dev/toolkits/neon_mcp"
markdown_url: "https://docs.composio.dev/toolkits/neon_mcp.md"
product: "platform"
version: null
last_updated: null
---

# Neon MCP

Manage Neon projects, branches, databases, and development workflows.

- **Category:** databases
- **Auth:** DCR_OAUTH
- **Composio-managed OAuth available?** No
- **Tools:** 104
- **Triggers:** 0
- **Slug:** `NEON_MCP`
- **Version:** 20260910_00

## Tools

### Add auth oauth provider

**Slug:** `NEON_MCP_ADD_AUTH_OAUTH_PROVIDER`

Adds an OAuth provider configuration to the specified branch's Neon Auth integration.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string ("google" | "github" | "microsoft" | "vercel") | Yes |  |
| `branch_id` | string | Yes |  |
| `client_id` | string | No |  |
| `project_id` | string | Yes |  |
| `client_secret` | string | No |  |
| `microsoft_tenant_id` | string | No |  |

### Add auth trusted domain

**Slug:** `NEON_MCP_ADD_AUTH_TRUSTED_DOMAIN`

Adds a domain to the redirect URI whitelist for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `auth_provider` | string ("mock" | "stack" | "better_auth") | Yes |  |

### Compare database schema

**Slug:** `NEON_MCP_COMPARE_DATABASE_SCHEMA`

Compare one database's SQL schema on a branch to another. `database_name` is required. Omit `base_branch_id` to compare against the parent; it is a branch id (`br-...`), not a name. Pass `lsn`, `timestamp`, `base_lsn`, or `base_timestamp` only for a point-in-time comparison.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `lsn` | string | No |  |
| `base_lsn` | string | No |  |
| `branch_id` | string | Yes |  |
| `timestamp` | string | No |  |
| `project_id` | string | Yes |  |
| `database_name` | string | Yes |  |
| `base_branch_id` | string | No |  |
| `base_timestamp` | string | No |  |

### Complete database migration

**Slug:** `NEON_MCP_COMPLETE_DATABASE_MIGRATION`

Apply or discard a prepared migration and delete the temporary branch. NEVER run autonomously; always ask the user first. Pass migration_id, migration_sql, database_name, project_id, temporary_branch_id, and parent_branch_id from prepare_database_migration. Set apply_changes false to discard; omitting it applies the migration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes | The project ID. Pass the exact value from prepare_database_migration. |
| `migration_id` | string | Yes | The migration ID from prepare_database_migration. |
| `apply_changes` | boolean | No | Whether to apply the migration. Set to false to just delete the temp branch without applying. |
| `database_name` | string | Yes | The database name. Pass the exact value from prepare_database_migration. |
| `migration_sql` | string | Yes | The SQL statements to apply. Pass the exact value from prepare_database_migration. |
| `parent_branch_id` | string | Yes | The parent branch ID where migration will be applied. |
| `temporary_branch_id` | string | Yes | The temporary branch ID to delete after migration. |

### Complete query tuning

**Slug:** `NEON_MCP_COMPLETE_QUERY_TUNING`

Apply or discard query-tuning changes and delete the temporary branch. NEVER run autonomously. Before calling, apply suggested SQL with run_sql on the temporary branch and re-run explain_sql_statement. Pass the tuning_id from prepare_query_tuning, not the branch id, plus temporary_branch_id. Set apply_changes true to apply; omitting it discards. Call this even when the user rejects the changes. Do not use prepare_database_migration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | No | The ID or name of the branch that receives the changes. If not provided, the default (main) branch will be used. |
| `role_name` | string | No | The name of the role to connect with. If you have used a specific role in prepare_query_tuning you MUST pass the same role again to this tool. If not provided, the default role (usually "neondb_owner") will be used. |
| `tuning_id` | string | Yes | The ID of the tuning to complete. This is NOT the branch ID. Remember this ID from the prior step using tool prepare_query_tuning. |
| `project_id` | string | Yes | The ID of the project to execute the query against |
| `apply_changes` | boolean | No | Whether to apply the suggested changes to the main branch |
| `database_name` | string | Yes | The name of the database to execute the query against |
| `temporary_branch_id` | string | Yes | The ID of the temporary branch that needs to be deleted after tuning. |
| `suggested_sql_statements` | array | Yes | The SQL DDL statements to execute to improve performance. These statements are the result of the prior steps, for example creating additional indexes. |
| `should_delete_temporary_branch` | boolean | No | Whether to delete the temporary branch after tuning |

### Create auth user

**Slug:** `NEON_MCP_CREATE_AUTH_USER`

Creates a new user in the Neon Auth user directory for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `email` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Create branch

**Slug:** `NEON_MCP_CREATE_BRANCH`

Creates a branch with a read-write compute and waits until it is ready. Pass `no_compute: true` to skip the endpoint. Does not return a connection string; call `get_connection_string` with the project and branch id. Copies the parent at HEAD; point-in-time restore is `restore_snapshot`.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `compute` | object | No |  |
| `parent_id` | string | No |  |
| `no_compute` | boolean | No | Skip the read-write endpoint. Default false. Cannot be combined with compute. |
| `project_id` | string | Yes |  |

### Create postgres database

**Slug:** `NEON_MCP_CREATE_POSTGRES_DATABASE`

Creates a database in the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `owner_name` | string | Yes |  |
| `project_id` | string | Yes |  |

### Create postgres endpoint

**Slug:** `NEON_MCP_CREATE_POSTGRES_ENDPOINT`

Creates a compute endpoint on a branch. Does not return a connection string; call `get_connection_string`.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `type` | string ("read_only" | "read_write") | Yes |  |
| `disabled` | boolean | No |  |
| `settings` | object | No |  |
| `branch_id` | string | Yes |  |
| `region_id` | string | No |  |
| `project_id` | string | Yes |  |
| `pooler_mode` | string ("transaction") | No |  |
| `provisioner` | string | No |  |
| `pooler_enabled` | boolean | No |  |
| `passwordless_access` | boolean | No |  |
| `suspend_timeout_seconds` | integer | No |  |
| `autoscaling_limit_max_cu` | number | No |  |
| `autoscaling_limit_min_cu` | number | No |  |

### Create postgres role

**Slug:** `NEON_MCP_CREATE_POSTGRES_ROLE`

Creates a Postgres role in the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes |  |
| `no_login` | boolean | No |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Create project

**Slug:** `NEON_MCP_CREATE_PROJECT`

Creates a Neon project and waits until the default compute is ready. Pass `org_id` with a personal API key. Does not return a connection string; call `get_connection_string` with the project id.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `branch` | object | No |  |
| `org_id` | string | No |  |
| `settings` | object | No |  |
| `region_id` | string | No |  |
| `pg_version` | integer | No |  |
| `provisioner` | string | No |  |
| `store_passwords` | boolean | No |  |
| `autoscaling_limit_max_cu` | number | No |  |
| `autoscaling_limit_min_cu` | number | No |  |
| `default_endpoint_settings` | object | No |  |
| `history_retention_seconds` | integer | No |  |

### Create snapshot

**Slug:** `NEON_MCP_CREATE_SNAPSHOT`

Creates a snapshot from the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `lsn` | string | No |  |
| `name` | string | No |  |
| `branch_id` | string | Yes |  |
| `timestamp` | string | No |  |
| `expires_at` | string | No |  |
| `project_id` | string | Yes |  |

### Create storage bucket

**Slug:** `NEON_MCP_CREATE_STORAGE_BUCKET`

Creates a new branchable object storage bucket on the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `access_level` | string ("private" | "public_read") | No |  |

### Delete auth oauth provider

**Slug:** `NEON_MCP_DELETE_AUTH_OAUTH_PROVIDER`

Deletes an OAuth provider from the specified project.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `oauth_provider_id` | string ("google" | "github" | "microsoft" | "vercel") | Yes |  |

### Delete auth trusted domain

**Slug:** `NEON_MCP_DELETE_AUTH_TRUSTED_DOMAIN`

Removes a domain from the redirect URI whitelist for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domains` | array | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `auth_provider` | string ("mock" | "stack" | "better_auth") | Yes |  |

### Delete auth user

**Slug:** `NEON_MCP_DELETE_AUTH_USER`

Deletes the specified user from the Neon Auth user directory for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `auth_user_id` | string | Yes |  |

### Delete branch

**Slug:** `NEON_MCP_DELETE_BRANCH`

Delete a branch and all its data. NEVER run autonomously; always ask the user first. For the whole project, use `delete_project`.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Delete data api

**Slug:** `NEON_MCP_DELETE_DATA_API`

Deletes the Neon Data API for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `database_name` | string | Yes |  |

### Delete function

**Slug:** `NEON_MCP_DELETE_FUNCTION`

Deletes the function identified by its slug.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Delete functions custom domain

**Slug:** `NEON_MCP_DELETE_FUNCTIONS_CUSTOM_DOMAIN`

Removes a custom domain registered on the branch and stops routing it.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Delete postgres database

**Slug:** `NEON_MCP_DELETE_POSTGRES_DATABASE`

Deletes the specified database from the branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `database_name` | string | Yes |  |

### Delete postgres endpoint

**Slug:** `NEON_MCP_DELETE_POSTGRES_ENDPOINT`

Deletes the specified compute endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |
| `endpoint_id` | string | Yes |  |

### Delete postgres role

**Slug:** `NEON_MCP_DELETE_POSTGRES_ROLE`

Deletes the specified Postgres role from the branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `role_name` | string | Yes |  |
| `project_id` | string | Yes |  |

### Delete project

**Slug:** `NEON_MCP_DELETE_PROJECT`

Delete a Neon project and all its data. NEVER run autonomously; always ask the user first. For a single branch, use `delete_branch`.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |

### Delete snapshot

**Slug:** `NEON_MCP_DELETE_SNAPSHOT`

Deletes the specified snapshot.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |
| `snapshot_id` | string | Yes |  |

### Delete storage bucket

**Slug:** `NEON_MCP_DELETE_STORAGE_BUCKET`

Deletes the named bucket from the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `bucket_name` | string | Yes |  |

### Delete storage object

**Slug:** `NEON_MCP_DELETE_STORAGE_OBJECT`

Deletes the named object from the bucket on the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `object_key` | string | Yes |  |
| `project_id` | string | Yes |  |
| `bucket_name` | string | Yes |  |

### Delete storage objects by prefix

**Slug:** `NEON_MCP_DELETE_STORAGE_OBJECTS_BY_PREFIX`

Soft-deletes every object on the specified branch whose key starts with `prefix`, in a single call.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `prefix` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `bucket_name` | string | Yes |  |

### Deploy function

**Slug:** `NEON_MCP_DEPLOY_FUNCTION`

Creates a deployment for the function. Supply at least one of `zip`, `environment`, or `runtime`; omitted fields inherit the latest version. The first deployment must include `zip`.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `zip` | string | No | Base64-encoded binary file contents. |
| `slug` | string | Yes |  |
| `runtime` | string ("nodejs24") | No |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `environment` | string | No |  |

### Describe branch

**Slug:** `NEON_MCP_DESCRIBE_BRANCH`

Get a tree view of all objects in a branch, including databases, schemas, tables, views, and functions. Do not use when you only need table names (use `get_database_tables` instead) or column detail (use `describe_table_schema` instead).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes | An ID of the branch to describe |
| `project_id` | string | Yes | The ID of the project |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |

### Describe project

**Slug:** `NEON_MCP_DESCRIBE_PROJECT`

Retrieves the project record (settings, compute, usage). Call `list_branches` for branches.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |

### Describe table schema

**Slug:** `NEON_MCP_DESCRIBE_TABLE_SCHEMA`

Get column definitions, data types, and constraints for a specific table. Do not use when you need all tables in a database (use `get_database_tables` instead).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | No | An optional ID of the branch to execute the query against. If not provided the default branch is used. |
| `project_id` | string | Yes | The ID of the project to execute the query against |
| `table_name` | string | Yes | The table name, optionally schema-qualified (for example, crm.contacts) |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |

### Disable auth

**Slug:** `NEON_MCP_DISABLE_AUTH`

Disables the Neon Auth integration for the specified branch, removing the connection to the authentication provider.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `delete_data` | boolean | No |  |

### Explain sql statement

**Slug:** `NEON_MCP_EXPLAIN_SQL_STATEMENT`

Analyze the query execution plan for a SQL statement using EXPLAIN ANALYZE. Do not use when you need to execute the query for results (use `run_sql` instead).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sql` | string | Yes | The SQL statement to analyze |
| `analyze` | boolean | No | Whether to include ANALYZE in the EXPLAIN command |
| `branch_id` | string | No | An optional ID of the branch to execute the query against. If not provided the default branch is used. |
| `project_id` | string | Yes | The ID of the project to execute the query against |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |

### Fetch

**Slug:** `NEON_MCP_FETCH`

Fetch detailed information about a specific organization, project, or branch using the ID returned by the `search` tool.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID returned by the search tool to fetch detailed information about the entity |

### Finalize branch restore

**Slug:** `NEON_MCP_FINALIZE_BRANCH_RESTORE`

Finalize a branch created with `restore_snapshot` and `finalize: false`: reassign computes (this restarts them) and swap names so it replaces the original branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Get ai gateway

**Slug:** `NEON_MCP_GET_AI_GATEWAY`

Returns the AI Gateway endpoint host for the specified branch, used to render code-snippet base URLs.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Get auth

**Slug:** `NEON_MCP_GET_AUTH`

Retrieves the Neon Auth integration details for the specified branch, including the auth provider type and integration status.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Get branch

**Slug:** `NEON_MCP_GET_BRANCH`

Retrieves information about the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Get connection string

**Slug:** `NEON_MCP_GET_CONNECTION_STRING`

Get a PostgreSQL connection string for a Neon database. The branch must have a compute endpoint. `create_project` and `create_branch` do not return one; call this after they succeed. All parameters are optional; the tool resolves the project, branch, and database automatically if not specified. Requires write access: the connection string carries a privileged role password, so it is unavailable in read-only mode. A read-only caller who needs a DATABASE_URL must copy it from https://console.neon.tech manually.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | No | The ID or name of the branch. If not provided, the default branch will be used. |
| `role_name` | string | No | The name of the role to connect with. If not provided, the database owner name will be used. |
| `compute_id` | string | No | The ID of the compute/endpoint. If not provided, the read-write compute associated with the branch will be used. |
| `project_id` | string | Yes | The ID of the project. If not provided, the only available project will be used. |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |

### Get data api

**Slug:** `NEON_MCP_GET_DATA_API`

Retrieves the Neon Data API configuration for the specified branch, including endpoint URL, enabled state, and database settings.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `database_name` | string | Yes |  |

### Get database tables

**Slug:** `NEON_MCP_GET_DATABASE_TABLES`

List all tables in a Neon database. Do not use when you need column-level detail for a specific table (use `describe_table_schema` instead).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | No | An optional ID of the branch. If not provided the default branch is used. |
| `project_id` | string | Yes | The ID of the project |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |

### Get default branch

**Slug:** `NEON_MCP_GET_DEFAULT_BRANCH`

Resolve the project's default branch by the default flag, not by name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |

### Get doc resource

**Slug:** `NEON_MCP_GET_DOC_RESOURCE`

Fetch one Neon documentation page as markdown. Pass a slug from list_docs_resources (for example docs/guides/prisma.md).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | Yes | The docs page slug (path) to fetch, e.g. 'docs/guides/prisma.md'. Slugs use .md file endings matching the URLs in the documentation index. Use the list_docs_resources tool first to discover available slugs. |

### Get function

**Slug:** `NEON_MCP_GET_FUNCTION`

Returns the function identified by its slug.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Get neon auth config

**Slug:** `NEON_MCP_GET_NEON_AUTH_CONFIG`

Read Neon Auth config for a branch with OAuth and SMTP secrets redacted as "***redacted***". Requires provision_neon_auth first.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | No | Branch ID. If omitted, the project default branch is used (same as provision_neon_auth). |
| `project_id` | string | Yes | Neon project ID |

### Get operation

**Slug:** `NEON_MCP_GET_OPERATION`

Retrieves details for the specified operation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |
| `operation_id` | string | Yes |  |

### Get postgres database

**Slug:** `NEON_MCP_GET_POSTGRES_DATABASE`

Retrieves information about the specified database.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `database_name` | string | Yes |  |

### Get postgres endpoint

**Slug:** `NEON_MCP_GET_POSTGRES_ENDPOINT`

Retrieves information about the specified compute endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |
| `endpoint_id` | string | Yes |  |

### Get postgres role

**Slug:** `NEON_MCP_GET_POSTGRES_ROLE`

Retrieves details about the specified role.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `role_name` | string | Yes |  |
| `project_id` | string | Yes |  |

### Get snapshot schedule

**Slug:** `NEON_MCP_GET_SNAPSHOT_SCHEDULE`

Returns the backup schedule for the specified branch, including the configured snapshot frequencies.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Get storage

**Slug:** `NEON_MCP_GET_STORAGE`

Returns whether branchable object storage is usable for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Inspect database

**Slug:** `NEON_MCP_INSPECT_DATABASE`

Run one read-only neon inspect db check (pick `check` from the input schema). Not for arbitrary SQL (`run_sql`), one statement's plan (`explain_sql_statement`), or applying indexes (`prepare_query_tuning`). Omit `database_name` to cover every database; some checks are compute-wide. If a check needs an extension, the tool names `CREATE EXTENSION`; ask before running it.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `check` | string ("table-sizes" | "index-sizes" | "unused-indexes" | "seq-scans" | "long-running-queries" | "stalled-queries" | "locks" | "outliers" | "calls" | "lfc-hit-rate" | "working-set" | "vacuum-stats" | "bloat" | "replication-slots" | "subscriptions") | Yes | Which diagnostic to run: `table-sizes`: Size of each table (including TOAST), largest first (pg_table_size) `index-sizes`: Size of each index, largest first (pg_relation_size) `unused-indexes`: Non-unique indexes with fewer than 50 scans — candidates for removal (pg_stat_user_indexes) `seq-scans`: Number of sequential scans recorded against each table (pg_stat_user_tables) `long-running-queries`: Queries running longer than 5 minutes (pg_stat_activity) `stalled-queries`: Active queries running longer than 30 seconds with parallel-worker grouping, waits, and blockers, oldest query group first (compute-wide) `locks`: Locks held with the acquiring query and its age (pg_locks + pg_stat_activity) `outliers`: The 25 queries with the highest cumulative execution time since statistics were last reset (needs pg_stat_statements) `calls`: The 25 most frequently executed queries since statistics were last reset (needs pg_stat_statements) `lfc-hit-rate`: Local File Cache hit rate (compute-wide, needs neon extension) `working-set`: Estimated working set vs LFC size (compute-wide, needs neon extension) `vacuum-stats`: Autovacuum status per table: last (auto)vacuum, dead tuples, threshold `bloat`: Estimated bloat for the 25 most bloated tables (statistical estimate, no extension needed) `replication-slots`: Replication slots (compute-wide): kind, status, client, restart/confirmed-flush LSNs, and lag (pg_replication_slots + pg_stat_replication) `subscriptions`: Per-table logical replication progress on this subscriber (pg_subscription_rel) |
| `limit` | integer | No | Maximum number of rows to return from the combined result. Per-database ranking and SQL caps are applied first. The response reports how many rows the check produced and whether they were truncated, so raise this only when `truncated` is true. A few checks are capped in SQL and say so in their description. |
| `branch_id` | string | No | An optional ID of the branch. If not provided the default branch is used. |
| `compute_id` | string | No | The ID of the compute/endpoint. If not provided, the read-write compute associated with the branch will be used. |
| `project_id` | string | Yes | The ID of the project to inspect |
| `database_name` | string | No | For a database-scoped check, the database to inspect. Omit to cover every database on the branch. Ranking and SQL row limits stay per database. One failing database fails the whole run. For a compute-wide check, the database to connect through; the check still runs once for the whole compute and the result does not include `databaseName`. The response `limit` applies to the combined rows after that. |

### List auth oauth providers

**Slug:** `NEON_MCP_LIST_AUTH_OAUTH_PROVIDERS`

Lists the OAuth providers configured for the specified branch's Neon Auth integration.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List auth trusted domains

**Slug:** `NEON_MCP_LIST_AUTH_TRUSTED_DOMAINS`

Lists the trusted domains in the redirect URI whitelist for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List branch computes

**Slug:** `NEON_MCP_LIST_BRANCH_COMPUTES`

Retrieves a list of compute endpoints for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List branches

**Slug:** `NEON_MCP_LIST_BRANCHES`

Retrieves a list of branches for the specified project. Returns every page. Pass limit to cap how many.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `search` | string | No |  |
| `sort_by` | string ("name" | "created_at" | "updated_at") | No |  |
| `project_id` | string | Yes |  |
| `sort_order` | string ("asc" | "desc") | No |  |
| `include_deleted` | boolean | No |  |

### List docs resources

**Slug:** `NEON_MCP_LIST_DOCS_RESOURCES`

List Neon documentation page slugs from neon.com/docs/llms.txt. Call this before get_doc_resource; do not guess slugs.

### List functions

**Slug:** `NEON_MCP_LIST_FUNCTIONS`

Lists functions on the specified branch. Returns every page. Pass limit to cap how many.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List functions custom domains

**Slug:** `NEON_MCP_LIST_FUNCTIONS_CUSTOM_DOMAINS`

Lists all custom domains registered on the branch, across every target entity. Returns every page. Pass limit to cap how many.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List log fields

**Slug:** `NEON_MCP_LIST_LOG_FIELDS`

Lists the low-cardinality log fields observed on this branch. Call `list_log_field_values` with `field_name` to list distinct values.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List log field values

**Slug:** `NEON_MCP_LIST_LOG_FIELD_VALUES`

Lists distinct values for a low-cardinality log field. Call `list_log_fields` first for `field_name`; a field the branch has never emitted returns `unknown_field`. Pass `since` or `start_time`, not both; default is the previous six hours, max seven days. Private beta.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `since` | string | No |  |
| `source` | string ("function" | "storage" | "pg_endpoint") | No |  |
| `end_time` | string | No |  |
| `branch_id` | string | Yes |  |
| `field_name` | string | Yes |  |
| `project_id` | string | Yes |  |
| `start_time` | string | No |  |

### List operations

**Slug:** `NEON_MCP_LIST_OPERATIONS`

Lists operations for a project. Omitting `limit` returns every remaining page. There is no `cursor` argument.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `project_id` | string | Yes |  |

### List organizations

**Slug:** `NEON_MCP_LIST_ORGANIZATIONS`

List all organizations the current user belongs to. Supports optional `search` parameter to filter by name or ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `search` | string | No | Search organizations by name or ID. You can specify partial name or ID values to filter results. |

### List postgres databases

**Slug:** `NEON_MCP_LIST_POSTGRES_DATABASES`

Retrieves a list of databases for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List postgres endpoints

**Slug:** `NEON_MCP_LIST_POSTGRES_ENDPOINTS`

Retrieves a list of compute endpoints for the specified project.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |

### List postgres roles

**Slug:** `NEON_MCP_LIST_POSTGRES_ROLES`

Retrieves a list of Postgres roles from the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List project members

**Slug:** `NEON_MCP_LIST_PROJECT_MEMBERS`

Lists organization members and their per-project roles for an org-owned project. Returns every page. Pass limit to cap how many.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `project_id` | string | Yes |  |

### List project permissions

**Slug:** `NEON_MCP_LIST_PROJECT_PERMISSIONS`

Retrieves details about users who have access to the project, including the permission `id`, the granted-to email address, and the date project access was granted.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |

### List projects

**Slug:** `NEON_MCP_LIST_PROJECTS`

List Neon projects you own. Returns every page. Pass limit to cap how many. There is no `cursor` argument. Pass `org_id` with a personal API key to list that org's projects.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `org_id` | string | No |  |
| `search` | string | No |  |
| `timeout` | integer | No |  |
| `recoverable` | boolean | No |  |

### List regions

**Slug:** `NEON_MCP_LIST_REGIONS`

Lists Neon regions available to the authenticated account.

### List slow queries

**Slug:** `NEON_MCP_LIST_SLOW_QUERIES`

List queries from pg_stat_statements by execution time, slowest first. For sizes, indexes, locks, cache, bloat, or replication use inspect_database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | No | Maximum number of slow queries to return |
| `branch_id` | string | No | An optional ID of the branch. If not provided the default branch is used. |
| `compute_id` | string | No | The ID of the compute/endpoint. If not provided, the read-write compute associated with the branch will be used. |
| `project_id` | string | Yes | The ID of the project to list slow queries from |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |
| `min_execution_time` | number | No | Minimum execution time in milliseconds to consider a query as slow |

### List snapshots

**Slug:** `NEON_MCP_LIST_SNAPSHOTS`

Lists the snapshots for the specified project.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |

### List storage buckets

**Slug:** `NEON_MCP_LIST_STORAGE_BUCKETS`

Lists branchable object storage buckets visible on the specified branch, including those inherited from ancestor branches.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### List storage objects

**Slug:** `NEON_MCP_LIST_STORAGE_OBJECTS`

Lists objects visible in the named bucket on the specified branch, including those inherited from ancestor branches. Returns every page. Pass limit to cap how many.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `prefix` | string | No |  |
| `branch_id` | string | Yes |  |
| `delimiter` | string | No |  |
| `project_id` | string | Yes |  |
| `bucket_name` | string | Yes |  |

### Prepare database migration

**Slug:** `NEON_MCP_PREPARE_DATABASE_MIGRATION`

Apply a schema change on a temporary branch and return a migration_id. Test with run_sql on that branch, ask the user, then complete_database_migration — even if they reject, so the temporary branch is deleted. Pass every field from the prepare response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes | The ID of the project to execute the query against |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |
| `migration_sql` | string | Yes | The SQL to execute to create the migration |

### Prepare query tuning

**Slug:** `NEON_MCP_PREPARE_QUERY_TUNING`

Analyze a slow query on a temporary branch and return a tuning_id. Apply suggested SQL with run_sql on that branch, re-run explain_sql_statement there, then complete_query_tuning with the tuning_id (not the branch id) — apply_changes true if they accept, omit it or pass false if they reject, so the temporary branch is deleted. Do not use prepare_database_migration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sql` | string | Yes | The SQL statement to analyze and tune |
| `role_name` | string | No | The name of the role to connect with. If not provided, the default role (usually "neondb_owner") will be used. |
| `project_id` | string | Yes | The ID of the project to execute the query against |
| `database_name` | string | Yes | The name of the database to execute the query against |

### Presign storage object

**Slug:** `NEON_MCP_PRESIGN_STORAGE_OBJECT`

Returns a presigned URL that transfers bytes directly to or from the object's bucket on the specified branch, without the caller ever handling S3 credentials.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `operation` | string ("upload" | "download") | Yes |  |
| `object_key` | string | Yes |  |
| `project_id` | string | Yes |  |
| `bucket_name` | string | Yes |  |
| `content_type` | string | No |  |
| `expires_in_seconds` | integer | No |  |

### Provision neon auth

**Slug:** `NEON_MCP_PROVISION_NEON_AUTH`

Enables Neon Auth for the specified branch by connecting it to an authentication provider.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `auth_provider` | string ("mock" | "stack" | "better_auth") | Yes |  |
| `database_name` | string | No |  |

### Provision neon data api

**Slug:** `NEON_MCP_PROVISION_NEON_DATA_API`

Creates a new instance of Neon Data API in the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `jwks_url` | string | No |  |
| `settings` | object | No |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `jwt_audience` | string | No |  |
| `auth_provider` | string ("neon_auth" | "external") | No |  |
| `database_name` | string | Yes |  |
| `provider_name` | string | No |  |
| `skip_auth_schema` | boolean | No |  |
| `add_default_grants` | boolean | No |  |

### Query logs

**Slug:** `NEON_MCP_QUERY_LOGS`

Returns logs for a branch. Pass `limit` to cap how many. There is no `cursor` argument. Filters combine with AND. Pass `logql` instead of structured filters, not with them. Give the window as `since` or `start_time`, not both; default is the previous hour, max seven days; `end_time` is exclusive. Private beta; a branch without logs access returns HTTP 404 with reason "telemetry_not_enabled".

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No |  |
| `logql` | string | No |  |
| `since` | string | No |  |
| `source` | string ("function" | "storage" | "pg_endpoint") | No |  |
| `end_time` | string | No |  |
| `trace_id` | string | No |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `scope_name` | string | No |  |
| `sort_order` | string ("asc" | "desc") | No |  |
| `start_time` | string | No |  |
| `service_name` | string | No |  |
| `body_contains` | string | No |  |
| `severity_text` | string | No |  |
| `minimum_severity` | string ("trace" | "debug" | "info" | "warn" | "error" | "fatal") | No |  |

### Recover project

**Slug:** `NEON_MCP_RECOVER_PROJECT`

Recovers a deleted project within the 7-day deletion recovery period.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |

### Register functions custom domain

**Slug:** `NEON_MCP_REGISTER_FUNCTIONS_CUSTOM_DOMAIN`

Registers a hostname on the branch and routes it to a function. Pass `entity_type: "function"` and `entity_id` as the slug from `list_functions`. Point a CNAME at the returned `cname_target`.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `entity_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `entity_type` | string | Yes |  |

### Reset from parent

**Slug:** `NEON_MCP_RESET_FROM_PARENT`

Reset a branch to its parent's current HEAD. Discards every change the branch has written since it diverged. NEVER run autonomously; always ask the user first. `preserve_under_name` saves the current state first and is required when the branch has children; those children move to the new branch. Point-in-time restore is `restore_snapshot`.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `preserve_under_name` | string | No | Name under which to save the current branch before the reset. Required when the branch has children; those children move to the new branch. |

### Reset postgres role password

**Slug:** `NEON_MCP_RESET_POSTGRES_ROLE_PASSWORD`

Resets the password for the specified Postgres role.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `role_name` | string | Yes |  |
| `project_id` | string | Yes |  |

### Restart postgres endpoint

**Slug:** `NEON_MCP_RESTART_POSTGRES_ENDPOINT`

Restarts the specified compute endpoint by immediately suspending it and then starting it again.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |
| `endpoint_id` | string | Yes |  |

### Restore snapshot

**Slug:** `NEON_MCP_RESTORE_SNAPSHOT`

Restore a snapshot onto a new or existing branch. The call waits until the branch is ready. Pass `target_branch_id` to restore onto an existing branch; omit it to create one. Pass `finalize: false` then call `finalize_branch_restore` to swap names later.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `finalize` | boolean | No | Finalize immediately (move computes onto the restored branch). Defaults to true when restoring as a new branch and false when restoring onto an existing branch. |
| `project_id` | string | Yes |  |
| `snapshot_id` | string | Yes |  |
| `target_branch_id` | string | No |  |

### Run sql

**Slug:** `NEON_MCP_RUN_SQL`

Execute one SQL statement on a Neon database. If a prior step created a temporary branch, pass that branch_id. NEVER run destructive SQL autonomously; always ask the user first.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sql` | string | Yes | The SQL query to execute |
| `branch_id` | string | No | An optional ID of the branch to execute the query against. If not provided the default branch is used. |
| `project_id` | string | Yes | The ID of the project to execute the query against |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |

### Run sql transaction

**Slug:** `NEON_MCP_RUN_SQL_TRANSACTION`

Execute multiple SQL statements as one transaction. If a prior step created a temporary branch, pass that branch_id. NEVER run destructive SQL autonomously; always ask the user first.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | No | An optional ID of the branch to execute the query against. If not provided the default branch is used. |
| `project_id` | string | Yes | The ID of the project to execute the query against |
| `database_name` | string | No | The name of the database. If not provided, the default neondb or first available database is used. |
| `sql_statements` | array | Yes | The SQL statements to execute |

### Search

**Slug:** `NEON_MCP_SEARCH`

Search across all organizations, projects, and branches by keyword. Returns matching items with id, title, and URL. Query must be at least 3 characters. Do not use when you need all projects (use `list_projects` instead).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | The search query to find matching organizations, projects, or branches |

### Set default branch

**Slug:** `NEON_MCP_SET_DEFAULT_BRANCH`

Sets the specified branch as the project's default branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Set snapshot schedule

**Slug:** `NEON_MCP_SET_SNAPSHOT_SCHEDULE`

Replace a branch's automatic snapshot schedule. Frequency must be daily, weekly, or monthly.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `schedule` | array | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Start postgres endpoint

**Slug:** `NEON_MCP_START_POSTGRES_ENDPOINT`

Starts a compute endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |
| `endpoint_id` | string | Yes |  |

### Suspend postgres endpoint

**Slug:** `NEON_MCP_SUSPEND_POSTGRES_ENDPOINT`

Suspends the specified compute endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `project_id` | string | Yes |  |
| `endpoint_id` | string | Yes |  |

### Update auth config

**Slug:** `NEON_MCP_UPDATE_AUTH_CONFIG`

Updates the auth configuration for the branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Update auth oauth provider

**Slug:** `NEON_MCP_UPDATE_AUTH_OAUTH_PROVIDER`

Updates an OAuth provider for the specified project.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `client_id` | string | No |  |
| `project_id` | string | Yes |  |
| `client_secret` | string | No |  |
| `oauth_provider_id` | string ("google" | "github" | "microsoft" | "vercel") | Yes |  |
| `microsoft_tenant_id` | string | No |  |

### Update auth user role

**Slug:** `NEON_MCP_UPDATE_AUTH_USER_ROLE`

Updates the role of a user in the Neon Auth user directory for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `roles` | array | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |
| `auth_user_id` | string | Yes |  |

### Update branch

**Slug:** `NEON_MCP_UPDATE_BRANCH`

Updates the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `branch_id` | string | Yes |  |
| `protected` | boolean | No |  |
| `expires_at` | string | No |  |
| `project_id` | string | Yes |  |

### Update data api

**Slug:** `NEON_MCP_UPDATE_DATA_API`

Updates the Neon Data API configuration for the specified branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch_id` | string | Yes |  |
| `db_schemas` | array | No |  |
| `project_id` | string | Yes |  |
| `db_max_rows` | integer | No |  |
| `db_anon_role` | string | No |  |
| `openapi_mode` | string | No |  |
| `database_name` | string | Yes |  |
| `jwt_role_claim_key` | string | No |  |
| `db_extra_search_path` | string | No |  |
| `db_aggregates_enabled` | boolean | No |  |
| `server_timing_enabled` | boolean | No |  |
| `jwt_cache_max_lifetime` | integer | No |  |
| `server_cors_allowed_origins` | string | No |  |

### Update function

**Slug:** `NEON_MCP_UPDATE_FUNCTION`

Updates the function's mutable metadata — currently only the display `name`.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes |  |
| `slug` | string | Yes |  |
| `branch_id` | string | Yes |  |
| `project_id` | string | Yes |  |

### Update postgres database

**Slug:** `NEON_MCP_UPDATE_POSTGRES_DATABASE`

Updates the specified database in the branch.

branch_id is a branch id (br-...), not a branch name. Call list_branches to resolve a name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `branch_id` | string | Yes |  |
| `owner_name` | string | No |  |
| `project_id` | string | Yes |  |
| `database_name` | string | Yes |  |

### Update postgres endpoint

**Slug:** `NEON_MCP_UPDATE_POSTGRES_ENDPOINT`

Updates the specified compute endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `disabled` | boolean | No |  |
| `settings` | object | No |  |
| `branch_id` | string | No |  |
| `project_id` | string | Yes |  |
| `endpoint_id` | string | Yes |  |
| `pooler_mode` | string ("transaction") | No |  |
| `provisioner` | string | No |  |
| `pooler_enabled` | boolean | No |  |
| `passwordless_access` | boolean | No |  |
| `suspend_timeout_seconds` | integer | No |  |
| `autoscaling_limit_max_cu` | number | No |  |
| `autoscaling_limit_min_cu` | number | No |  |

### Update project

**Slug:** `NEON_MCP_UPDATE_PROJECT`

Updates the specified project.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `settings` | object | No |  |
| `project_id` | string | Yes |  |
| `default_endpoint_settings` | object | No |  |
| `history_retention_seconds` | integer | No |  |

### Update snapshot

**Slug:** `NEON_MCP_UPDATE_SNAPSHOT`

Updates the specified snapshot.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No |  |
| `expires_at` | string | No |  |
| `project_id` | string | Yes |  |
| `snapshot_id` | string | Yes |  |
