pgcloud
v0.1.0Neon Postgres projects, branches, SQL, and migrations from your MCP client.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_projects
List all Neon projects in your account.
| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum number of Neon projects to return. |
org_id | string | Optional Neon organization ID; when given, only projects belonging to that organization are listed. |
search | string | Optional search term to filter projects by name. |
describe_project
Describes a Neon project
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project to describe. |
create_project
Create a new Neon project.
| Parameter | Type | Description |
|---|---|---|
name | string | Optional name for the new Neon project; when omitted, Neon assigns a default name. |
org_id | string | Optional Neon organization ID that will own the new project. |
region_id | string | Optional Neon region ID in which to create the project, such as aws-us-east-1. |
delete_project
Delete a Neon project
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project to delete, together with everything in it. |
create_branch
Create a branch in a Neon project
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project in which to create the branch. |
branchName | string | Optional name for the new branch; when omitted, Neon assigns a default name. |
parentBranchId | string | Optional ID of the branch to copy from; when omitted, the branch is created from the project's default branch. |
delete_branch
Delete a branch from a Neon project
| Parameter | Type | Description |
|---|---|---|
branchId * | string | ID of the branch to delete. |
projectId * | string | ID of the Neon project that owns the branch. |
describe_branch
Get a tree view of all objects in a branch, including databases, schemas, tables, views, and functions
| Parameter | Type | Description |
|---|---|---|
branchId * | string | ID of the branch to describe, including the databases it holds. |
projectId * | string | ID of the Neon project that owns the branch. |
list_branch_computes
List compute endpoints for a project or a specific branch, including compute ID, type, and size.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project whose compute endpoints to list. |
branchId | string | Optional ID of a branch; when given, only compute endpoints for that branch are listed. |
list_organizations
List all organizations that the current user has access to, optionally filtered by a search term.
| Parameter | Type | Description |
|---|---|---|
search | string | Optional search term to filter organizations by name. |
get_connection_string
Get a PostgreSQL connection string for a Neon database with all parameters being optional
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project whose connection string to return. |
branchId | string | Optional ID of the branch to connect to; when omitted, the project's default branch is used. |
databaseName | string | Optional name of the database to connect to; when omitted, the project's default database is used. |
pooled | boolean | Optional flag: when true, return a pooled connection string (through Neon's connection pooler); when false or omitted, return a direct connection string. |
roleName | string | Optional name of the database role to connect as; when omitted, the default role is used. |
run_sql
Execute a single SQL statement against a Neon database.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project that owns the database. |
sql * | string | The single SQL statement to execute against the Neon database. |
branchId | string | Optional ID of the branch to run against; when omitted, the project's default branch is used. |
databaseName | string | Optional name of the database to run against; when omitted, the project's default database is used. |
roleName | string | Optional name of the database role to run as; when omitted, the default role is used. |
run_sql_transaction
Execute a SQL transaction against a Neon database, should be used for multiple SQL statements.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project that owns the database. |
sql * | array | Array of SQL statements to execute together in a single transaction against the Neon database. |
branchId | string | Optional ID of the branch to run against; when omitted, the project's default branch is used. |
databaseName | string | Optional name of the database to run against; when omitted, the project's default database is used. |
roleName | string | Optional name of the database role to run as; when omitted, the default role is used. |
get_database_tables
Get all tables in a Neon database
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project that owns the database. |
branchId | string | Optional ID of the branch whose tables to list; when omitted, the project's default branch is used. |
databaseName | string | Optional name of the database whose tables to list; when omitted, the project's default database is used. |
describe_table_schema
Describe the schema of a table in a Neon database
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project that owns the table. |
tableName * | string | Name of the table whose columns to describe. |
branchId | string | Optional ID of the branch containing the table; when omitted, the project's default branch is used. |
databaseName | string | Optional name of the database containing the table; when omitted, the project's default database is used. |
list_slow_queries
List slow queries from pg_stat_statements, ordered by mean execution time.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project that owns the database. |
branchId | string | Optional ID of the branch to inspect; when omitted, the project's default branch is used. |
databaseName | string | Optional name of the database to inspect; when omitted, the project's default database is used. |
limit | number | Optional maximum number of slow queries to return, clamped to between 1 and 100; defaults to 10. |
explain_sql_statement
Describe the PostgreSQL query execution plan for a SQL statement by running EXPLAIN in the database
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project that owns the database. |
sql * | string | The SQL statement whose PostgreSQL execution plan to return, run under EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON). |
branchId | string | Optional ID of the branch to explain against; when omitted, the project's default branch is used. |
databaseName | string | Optional name of the database to explain against; when omitted, the project's default database is used. |
prepare_database_migration
Perform a database schema migration by executing the given SQL on a temporary branch for safety, ready to complete onto the main branch.
| Parameter | Type | Description |
|---|---|---|
migrationSql * | string | The migration SQL to test on a temporary branch before it is applied to the original branch. |
projectId * | string | ID of the Neon project that owns the database to migrate. |
branchId | string | Optional ID of the branch to migrate; the temporary branch is created from it and completion applies the migration back to it. When omitted, the project's default branch is used. |
databaseName | string | Optional name of the database to migrate; when omitted, the project's default database is used. |
complete_database_migration
Complete a database migration when the user confirms the migration is ready to be applied to the main branch.
| Parameter | Type | Description |
|---|---|---|
migrationId * | string | ID of the prepared migration session returned by prepare_database_migration. |
projectId * | string | ID of the Neon project the migration was prepared for; must match the prepared migration's project. |
databaseName | string | Optional name of the database to apply the migration to; when omitted, the database recorded when the migration was prepared is used. |
prepare_query_tuning
Analyze a slow query or DML statement on a temporary branch, returning its execution plan to suggest optimizations.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | ID of the Neon project that owns the database. |
sql * | string | The slow query or DML statement to analyze on a temporary branch; its execution plan is returned to suggest optimizations. |
branchId | string | Optional ID of the branch to tune against; the temporary tuning branch is created from it. When omitted, the project's default branch is used. |
databaseName | string | Optional name of the database the statement runs against; when omitted, the project's default database is used. |
complete_query_tuning
Complete a query tuning session by either applying the changes to the main branch or discarding them.
| Parameter | Type | Description |
|---|---|---|
applyChanges * | boolean | Whether to apply the tuning session's changes to the original branch (true) or discard them (false); the temporary branch is deleted either way. |
projectId * | string | ID of the Neon project the tuning session was prepared for; must match the session's project. |
tuningId * | string | ID of the query tuning session returned by prepare_query_tuning. |