Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Neon MCP connector

OAuth 2.1/DCRDatabasesDeveloper ToolsAI

Connect to Neon MCP. Manage Neon serverless Postgres databases, projects, branches, and queries from your AI workflows.

Neon MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. quickstart.ts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENV_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'neonmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Neon MCP:', link)
    process.stdout.write('Press Enter after authorizing...')
    await new Promise(r => process.stdin.once('data', r))
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'neonmcp_list_branch_computes',
    toolInput: {},
    })
    console.log(result)

Connect this agent connector to let your agent:

  • Search records — Search across all organizations, projects, and branches by keyword, returning matching items with IDs and URLs
  • Run sql transaction, sql — Execute multiple SQL statements as a single transaction against a Neon database
  • Parent reset from — Reset a branch to its parent branch state, discarding all changes made on the branch
  • Api provision neon data — Provision the Neon Data API for HTTP-based access to a Postgres database with JWT authentication
  • Auth provision neon, configure neon — Provision Neon Auth for a branch, enabling managed authentication backed by Better Auth
  • Query prepare, complete — Start a query tuning session by analyzing execution plans and suggesting optimizations on a temporary branch

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

neonmcp_compare_database_schema#Compare the database schema between two branches to identify differences in tables, columns, and constraints.3 params

Compare the database schema between two branches to identify differences in tables, columns, and constraints.

NameTypeRequiredDescription
branchIdstringrequiredThe ID of the branch. Leave blank to use the default branch.
databaseNamestringrequiredThe name of the database. Defaults to `neondb` if not provided.
projectIdstringrequiredThe ID of the Neon project.
neonmcp_complete_database_migration#Apply a database migration to the main branch and clean up the temporary migration branch.7 params

Apply a database migration to the main branch and clean up the temporary migration branch.

NameTypeRequiredDescription
databaseNamestringrequiredThe name of the database. Defaults to `neondb` if not provided.
migrationIdstringrequiredThe migration ID returned by `prepare_database_migration`.
migrationSqlstringrequiredThe SQL DDL statement(s) to apply as a migration.
parentBranchIdstringrequiredThe ID of the parent branch to apply the migration to.
projectIdstringrequiredThe ID of the Neon project.
temporaryBranchIdstringrequiredThe ID of the temporary branch created during the prepare step.
applyChangesbooleanoptionalSet to `true` to apply changes, `false` to discard and only clean up.
neonmcp_complete_query_tuning#Finish a query tuning session by applying or discarding changes from the temporary tuning branch.9 params

Finish a query tuning session by applying or discarding changes from the temporary tuning branch.

NameTypeRequiredDescription
databaseNamestringrequiredThe name of the database. Defaults to `neondb` if not provided.
projectIdstringrequiredThe ID of the Neon project.
suggestedSqlStatementsarrayrequiredThe DDL statements suggested by `prepare_query_tuning` (e.g. CREATE INDEX).
temporaryBranchIdstringrequiredThe ID of the temporary branch created during the prepare step.
tuningIdstringrequiredThe tuning ID returned by `prepare_query_tuning`. Not the branch ID.
applyChangesbooleanoptionalSet to `true` to apply changes, `false` to discard and only clean up.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
roleNamestringoptionalThe 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.
shouldDeleteTemporaryBranchbooleanoptionalSet to `true` to delete the temporary branch after tuning. Default is `true`.
neonmcp_configure_neon_auth#Configure Neon Auth settings for a branch by specifying the desired operation.5 params

Configure Neon Auth settings for a branch by specifying the desired operation.

NameTypeRequiredDescription
branchIdstringrequiredThe ID of the branch to configure Neon Auth for.
operationstringrequiredThe configuration operation to perform on Neon Auth.
projectIdstringrequiredThe ID of the Neon project.
allowLocalhostbooleanoptionalWhether to allow localhost as a trusted origin. Used with set_allow_localhost operation.
trusted_originstringoptionalThe origin URL to add or remove from trusted origins. Required for add_trusted_origin and remove_trusted_origin operations.
neonmcp_create_branch#Create a new branch in a Neon project for isolated development or testing.3 params

Create a new branch in a Neon project for isolated development or testing.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
branchNamestringoptionalAn optional name for the new branch.
parentIdstringoptionalAn optional branch ID (e.g. 'br-...') to branch from. If omitted, the branch is created from the project's default branch. Use this to fork an existing non-default branch — for example, to make an isolated copy of a dev/staging branch for experimentation.
neonmcp_create_project#Create a new Neon project with a default database and branch, returning the connection string.2 params

Create a new Neon project with a default database and branch, returning the connection string.

NameTypeRequiredDescription
namestringoptionalAn optional name for the new project.
org_idstringoptionalThe organization ID to associate the project with.
neonmcp_delete_branch#Permanently delete a branch and all its data from a Neon project.2 params

Permanently delete a branch and all its data from a Neon project.

NameTypeRequiredDescription
branchIdstringrequiredThe ID of the branch. Leave blank to use the default branch.
projectIdstringrequiredThe ID of the Neon project.
neonmcp_delete_project#Permanently delete a Neon project and all its branches and data.1 param

Permanently delete a Neon project and all its branches and data.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
neonmcp_describe_branch#Get a tree view of all objects in a branch including databases, schemas, tables, views, and functions.3 params

Get a tree view of all objects in a branch including databases, schemas, tables, views, and functions.

NameTypeRequiredDescription
branchIdstringrequiredThe ID of the branch. Leave blank to use the default branch.
projectIdstringrequiredThe ID of the Neon project.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
neonmcp_describe_project#Get details and configuration of a specific Neon project by its ID.1 param

Get details and configuration of a specific Neon project by its ID.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
neonmcp_describe_table_schema#Get column definitions, data types, and constraints for a specific table in a Neon database.4 params

Get column definitions, data types, and constraints for a specific table in a Neon database.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
tableNamestringrequiredThe name of the table
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
neonmcp_explain_sql_statement#Analyze the query execution plan for a SQL statement using EXPLAIN ANALYZE.5 params

Analyze the query execution plan for a SQL statement using EXPLAIN ANALYZE.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
sqlstringrequiredThe SQL statement to execute.
analyzebooleanoptionalSet to `true` to include ANALYZE in EXPLAIN. Default is `true`.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
neonmcp_fetch#Fetch detailed information about a specific organization, project, or branch using its ID.1 param

Fetch detailed information about a specific organization, project, or branch using its ID.

NameTypeRequiredDescription
idstringrequiredThe entity ID returned by the `search` tool.
neonmcp_get_connection_string#Get a PostgreSQL connection string for a Neon database, resolving project, branch, and database automatically.5 params

Get a PostgreSQL connection string for a Neon database, resolving project, branch, and database automatically.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
computeIdstringoptionalThe ID of the compute endpoint. Defaults to the branch's read-write compute if not provided.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
roleNamestringoptionalThe database role to connect with. Defaults to `neondb_owner` if not provided.
neonmcp_get_database_tables#List all tables in a Neon database on a specific branch.3 params

List all tables in a Neon database on a specific branch.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
neonmcp_get_doc_resource#Fetch a specific Neon documentation page as markdown content by its URL.1 param

Fetch a specific Neon documentation page as markdown content by its URL.

NameTypeRequiredDescription
slugstringrequiredThe 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.
neonmcp_get_neon_auth_config#Read the full Neon Auth configuration for a specific branch.2 params

Read the full Neon Auth configuration for a specific branch.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
neonmcp_list_branch_computes#List all compute endpoints for a project or branch.2 params

List all compute endpoints for a project or branch.

NameTypeRequiredDescription
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
projectIdstringoptionalThe ID of the Neon project.
neonmcp_list_docs_resources#List all available Neon documentation pages from the Neon docs index.0 params

List all available Neon documentation pages from the Neon docs index.

neonmcp_list_organizations#List all organizations the current user belongs to, with optional name or ID filter.1 param

List all organizations the current user belongs to, with optional name or ID filter.

NameTypeRequiredDescription
searchstringoptionalFilter results by partial name or ID.
neonmcp_list_projects#List Neon projects in your account with optional search and pagination.4 params

List Neon projects in your account with optional search and pagination.

NameTypeRequiredDescription
cursorstringoptionalThe cursor value from the previous response for pagination.
limitnumberoptionalMaximum number of results to return (1–400). Default is 10.
org_idstringoptionalThe organization ID to associate the project with.
searchstringoptionalFilter results by partial name or ID.
neonmcp_list_shared_projects#List projects shared with the current user for collaboration.3 params

List projects shared with the current user for collaboration.

NameTypeRequiredDescription
cursorstringoptionalThe cursor value from the previous response for pagination.
limitnumberoptionalMaximum number of results to return (1–400). Default is 10.
searchstringoptionalFilter results by partial name or ID.
neonmcp_list_slow_queries#List slow queries from a Neon database to identify performance bottlenecks.6 params

List slow queries from a Neon database to identify performance bottlenecks.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
computeIdstringoptionalThe ID of the compute endpoint. Defaults to the branch's read-write compute if not provided.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
limitnumberoptionalMaximum number of results to return (1–400). Default is 10.
minExecutionTimenumberoptionalMinimum query execution time in milliseconds to flag as slow. Default is 1000 ms.
neonmcp_prepare_database_migration#Prepare a database schema migration by generating and executing DDL statements on a temporary branch.3 params

Prepare a database schema migration by generating and executing DDL statements on a temporary branch.

NameTypeRequiredDescription
migrationSqlstringrequiredThe SQL DDL statement(s) to apply as a migration.
projectIdstringrequiredThe ID of the Neon project.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
neonmcp_prepare_query_tuning#Start a query tuning session by analyzing execution plans and suggesting optimizations on a temporary branch.4 params

Start a query tuning session by analyzing execution plans and suggesting optimizations on a temporary branch.

NameTypeRequiredDescription
databaseNamestringrequiredThe name of the database. Defaults to `neondb` if not provided.
projectIdstringrequiredThe ID of the Neon project.
sqlstringrequiredThe SQL statement to execute.
roleNamestringoptionalThe database role to connect with. Defaults to `neondb_owner` if not provided.
neonmcp_provision_neon_auth#Provision Neon Auth for a branch, enabling managed authentication backed by Better Auth.3 params

Provision Neon Auth for a branch, enabling managed authentication backed by Better Auth.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
neonmcp_provision_neon_data_api#Provision the Neon Data API for HTTP-based access to a Postgres database with JWT authentication.3 params

Provision the Neon Data API for HTTP-based access to a Postgres database with JWT authentication.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
databaseNamestringoptionalThe name of the database. Defaults to neondb if not provided.
neonmcp_reset_from_parent#Reset a branch to its parent branch state, discarding all changes made on the branch.3 params

Reset a branch to its parent branch state, discarding all changes made on the branch.

NameTypeRequiredDescription
branchIdOrNamestringrequiredThe ID or name of the branch to reset.
projectIdstringrequiredThe ID of the Neon project.
preserveUnderNamestringoptionalOptional name to preserve the current branch state before resetting.
neonmcp_run_sql#Execute a single SQL statement against a Neon database and return the results.4 params

Execute a single SQL statement against a Neon database and return the results.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
sqlstringrequiredThe SQL statement to execute.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.
neonmcp_run_sql_transaction#Execute multiple SQL statements as a single transaction against a Neon database.4 params

Execute multiple SQL statements as a single transaction against a Neon database.

NameTypeRequiredDescription
projectIdstringrequiredThe ID of the Neon project.
sqlStatementsarrayrequiredThe SQL statements to execute as a single transaction.
branchIdstringoptionalThe ID of the branch. Leave blank to use the default branch.
databaseNamestringoptionalThe name of the database. Defaults to `neondb` if not provided.