The Neon MCP connector routes your AI agent's tool calls to Neon's own MCP server through Scalekit. Each user signs in to Neon once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 35 tools.
- Tools
- 35
- What they doRead · write · destructive
- 21 · 6 · 821 read6 write8 destructive
- Users sign in with
- OAuth
- OAuth app
- Scalekit's or your own
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. 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>Create the Neon MCP connection
In AgentKit > Connections, create a Neon MCP connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Scalekit credentials are available for Neon MCP server, so you don't need to register an OAuth app.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'neonmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Neon MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'neonmcp_list_branch_computes',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "neonmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Neon MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="neonmcp_list_branch_computes",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolneonmcp_compare_database_schemaCompare the database schema between two branches to identify differences in tables, columns, and constraints.Read-onlyCompare Database Schema
Compare the database schema between two branches to identify differences in tables, columns, and constraints.
Inputs
branchIdstringrequired- The ID of the branch. Leave blank to use the default branch.
databaseNamestringrequired- The name of the database. Defaults to `neondb` if not provided.
projectIdstringrequired- The ID of the Neon project.
neonmcp_describe_branchGet a tree view of all objects in a branch including databases, schemas, tables, views, and functions.Read-onlyDescribe Branch
Get a tree view of all objects in a branch including databases, schemas, tables, views, and functions.
Inputs
branchIdstringrequired- The ID of the branch. Leave blank to use the default branch.
projectIdstringrequired- The ID of the Neon project.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
neonmcp_describe_projectGet details and configuration of a specific Neon project by its ID.Read-onlyDescribe Project
Get details and configuration of a specific Neon project by its ID.
Inputs
projectIdstringrequired- The ID of the Neon project.
neonmcp_describe_table_schemaGet column definitions, data types, and constraints for a specific table in a Neon database.Read-onlyDescribe Table Schema
Get column definitions, data types, and constraints for a specific table in a Neon database.
Inputs
projectIdstringrequired- The ID of the Neon project.
tableNamestringrequired- The name of the table
branchIdstring- The ID of the branch. Leave blank to use the default branch.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
neonmcp_explain_sql_statementAnalyze the query execution plan for a SQL statement using EXPLAIN ANALYZE.Read-onlyExplain Sql Statement
Analyze the query execution plan for a SQL statement using EXPLAIN ANALYZE.
Inputs
projectIdstringrequired- The ID of the Neon project.
sqlstringrequired- The SQL statement to execute.
analyzeboolean- Set to `true` to include ANALYZE in EXPLAIN. Default is `true`.default
true branchIdstring- The ID of the branch. Leave blank to use the default branch.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
neonmcp_fetchFetch detailed information about a specific organization, project, or branch using its ID.Read-onlyFetch
Fetch detailed information about a specific organization, project, or branch using its ID.
Inputs
idstringrequired- The entity ID returned by the `search` tool.
neonmcp_get_connection_stringGet a PostgreSQL connection string for a Neon database, resolving project, branch, and database automatically.Read-onlyGet Connection String
Get a PostgreSQL connection string for a Neon database, resolving project, branch, and database automatically.
Inputs
projectIdstringrequired- The ID of the Neon project.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
computeIdstring- The ID of the compute endpoint. Defaults to the branch's read-write compute if not provided.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
roleNamestring- The database role to connect with. Defaults to `neondb_owner` if not provided.
neonmcp_get_database_tablesList all tables in a Neon database on a specific branch.Read-onlyGet Database Tables
List all tables in a Neon database on a specific branch.
Inputs
projectIdstringrequired- The ID of the Neon project.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
neonmcp_get_doc_resourceFetch a specific Neon documentation page as markdown content by its URL.Read-onlyGet Doc Resource
Fetch a specific Neon documentation page as markdown content by its URL.
Inputs
slugstringrequired- 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.
neonmcp_get_neon_auth_configRead the full Neon Auth configuration for a specific branch.Read-onlyGet Neon Auth Config
Read the full Neon Auth configuration for a specific branch.
Inputs
projectIdstringrequired- The ID of the Neon project.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
neonmcp_inspect_databaseRun a predefined, read-only Postgres diagnostic check (table sizes, unused indexes, locks, bloat, etc.) against a Neon branch.Read-onlyInspect Database
Run a predefined, read-only Postgres diagnostic check (table sizes, unused indexes, locks, bloat, etc.) against a Neon branch.
Inputs
checkstringrequired- Which diagnostic to run: table-sizes, index-sizes, unused-indexes, seq-scans, long-running-queries, locks, outliers, calls, lfc-hit-rate, working-set, vacuum-stats, bloat, replication-slots, or subscriptions.one of
table-sizesindex-sizesunused-indexesseq-scanslong-running-querieslocksoutlierscallslfc-hit-rateworking-setvacuum-statsbloatreplication-slotssubscriptions projectIdstringrequired- The ID of the project to inspect.
branchIdstring- An optional ID of the branch. If not provided the default branch is used.
computeIdstring- The ID of the compute/endpoint. If not provided, the read-write compute associated with the branch will be used.
databaseNamestring- Database to inspect. Omit to cover every database on the branch.
limitinteger- Maximum number of rows to return from the combined result (1-1000). Default is 50.default
50
neonmcp_list_branch_computesList all compute endpoints for a project or branch.Read-onlyList Branch Computes
List all compute endpoints for a project or branch.
Inputs
branchIdstring- The ID of the branch. Leave blank to use the default branch.
projectIdstring- The ID of the Neon project.
neonmcp_list_docs_resourcesList all available Neon documentation pages from the Neon docs index.Read-onlyList Docs Resources
List all available Neon documentation pages from the Neon docs index.
Inputs
This tool takes no inputs.
neonmcp_list_log_field_valuesList the distinct values of a log field (e.g.Read-onlyList Log Field Values
List the distinct values of a log field (e.g. service_name or severity_text) within a branch and time window.
Inputs
fieldstringrequired- The log field (label) whose distinct values to list, e.g. "service_name" or "severity_text". Use list_log_fields to discover valid field names.
branchIdstring- The ID of the branch. Defaults to the project's default branch.
projectIdstring- The ID of the project. Defaults to your only project if unambiguous.
sincestring- Relative lookback window as a duration (e.g. "6h", "24h"). If omitted, the server default lookback (6 hours) applies; the maximum supported window is "7d".
neonmcp_list_log_fieldsList the log fields whose values list_log_field_values can enumerate for a branch (e.g.Read-onlyList Log Fields
List the log fields whose values list_log_field_values can enumerate for a branch (e.g. service_name, severity_text, scope_name, entity_type).
Inputs
branchIdstring- The ID of the branch. Defaults to the project's default branch.
projectIdstring- The ID of the project. Defaults to your only project if unambiguous.
neonmcp_list_organizationsList all organizations the current user belongs to, with optional name or ID filter.Read-onlyList Organizations
List all organizations the current user belongs to, with optional name or ID filter.
Inputs
searchstring- Filter results by partial name or ID.
neonmcp_list_projectsList Neon projects in your account with optional search and pagination.Read-onlyList Projects
List Neon projects in your account with optional search and pagination.
Inputs
cursorstring- The cursor value from the previous response for pagination.
limitnumber- Maximum number of results to return (1–400). Default is 10.default
10 org_idstring- The organization ID to associate the project with.
searchstring- Filter results by partial name or ID.
neonmcp_list_slow_queriesList slow queries from a Neon database to identify performance bottlenecks.Read-onlyList Slow Queries
List slow queries from a Neon database to identify performance bottlenecks.
Inputs
projectIdstringrequired- The ID of the Neon project.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
computeIdstring- The ID of the compute endpoint. Defaults to the branch's read-write compute if not provided.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
limitnumber- Maximum number of results to return (1–400). Default is 10.default
10 minExecutionTimenumber- Minimum query execution time in milliseconds to flag as slow. Default is 1000 ms.default
1000
neonmcp_query_logsQuery logs emitted by Neon serverless functions and other services (structured filters or raw LogQL), correlated by trace ID and time window.Read-onlyQuery Logs
Query logs emitted by Neon serverless functions and other services (structured filters or raw LogQL), correlated by trace ID and time window.
Inputs
bodyContainsstring- Return only logs whose rendered message contains this case-sensitive substring.
branchIdstring- The ID of the branch whose logs to query. Defaults to the project's default branch.
endTimestring- Absolute end of the window, RFC3339. Ends either a relative since window or an absolute startTime window; defaults to now.
limitinteger- Maximum number of log lines to return (1-1000, default 100). Large results are truncated server-side.default
100 logqlstring- Advanced: a raw LogQL expression to run instead of the structured filters above. Only stream selectors and line filters are supported. Do not combine it with structured filters.
minSeveritystring- Return only logs at this OTel severity level or above (trace < debug < info < warn < error < fatal). E.g. "error" returns ERROR and FATAL.one of
tracedebuginfowarnerrorfatal projectIdstring- The ID of the project whose logs to query. If omitted and you have exactly one project, that project is used.
querystring- Legacy compatibility alias for logql. Preserves the previous behavior of overriding any structured filters. Do not supply both raw fields.
serviceNamestring- Filter to a specific OTel service name (service.name).
severityTextstring- Filter to an exact severity text (e.g. "ERROR"). Takes precedence over minSeverity.
sincestring- Relative lookback window ending at endTime, or now when omitted, as a duration (e.g. "30m", "1h", "24h"). Defaults to the last hour; the maximum supported window is "7d". Ignored when startTime is set.
sourcestring- Which service produced the logs. "function" (serverless functions) is the default; "storage" and "pg_endpoint" are also available.one of
functionstoragepg_endpoint startTimestring- Absolute start of the window, RFC3339 (e.g. "2026-07-16T09:00:00Z"). Overrides since; the startTime/endTime window must not span more than seven days.
traceIdstring- Correlate to a distributed trace: return only logs with this trace_id.
neonmcp_searchSearch across all organizations, projects, and branches by keyword, returning matching items with IDs and URLs.Read-onlySearch
Search across all organizations, projects, and branches by keyword, returning matching items with IDs and URLs.
Inputs
querystringrequired- The search keyword. Must be at least 3 characters.
neonmcp_create_branchCreate a new branch in a Neon project for isolated development or testing.WriteCreate Branch
Create a new branch in a Neon project for isolated development or testing.
Inputs
projectIdstringrequired- The ID of the Neon project.
branchNamestring- An optional name for the new branch.
parentIdstring- An 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_projectCreate a new Neon project with a default database and branch, returning the connection string.WriteCreate Project
Create a new Neon project with a default database and branch, returning the connection string.
Inputs
namestring- An optional name for the new project.
org_idstring- The organization ID to associate the project with.
neonmcp_prepare_database_migrationPrepare a database schema migration by generating and executing DDL statements on a temporary branch.WritePrepare Database Migration
Prepare a database schema migration by generating and executing DDL statements on a temporary branch.
Inputs
migrationSqlstringrequired- The SQL DDL statement(s) to apply as a migration.
projectIdstringrequired- The ID of the Neon project.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
neonmcp_prepare_query_tuningStart a query tuning session by analyzing execution plans and suggesting optimizations on a temporary branch.WritePrepare Query Tuning
Start a query tuning session by analyzing execution plans and suggesting optimizations on a temporary branch.
Inputs
databaseNamestringrequired- The name of the database. Defaults to `neondb` if not provided.
projectIdstringrequired- The ID of the Neon project.
sqlstringrequired- The SQL statement to execute.
roleNamestring- The database role to connect with. Defaults to `neondb_owner` if not provided.
neonmcp_provision_neon_authProvision Neon Auth for a branch, enabling managed authentication backed by Better Auth.WriteProvision Neon Auth
Provision Neon Auth for a branch, enabling managed authentication backed by Better Auth.
- Idempotent
Inputs
projectIdstringrequired- The ID of the Neon project.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
neonmcp_provision_neon_data_apiProvision the Neon Data API for HTTP-based access to a Postgres database with JWT authentication.WriteProvision Neon Data Api
Provision the Neon Data API for HTTP-based access to a Postgres database with JWT authentication.
- Idempotent
Inputs
projectIdstringrequired- The ID of the Neon project.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
databaseNamestring- The name of the database. Defaults to neondb if not provided.
neonmcp_complete_database_migrationApply a database migration to the main branch and clean up the temporary migration branch.DestructiveComplete Database Migration
Apply a database migration to the main branch and clean up the temporary migration branch.
Inputs
databaseNamestringrequired- The name of the database. Defaults to `neondb` if not provided.
migrationIdstringrequired- The migration ID returned by `prepare_database_migration`.
migrationSqlstringrequired- The SQL DDL statement(s) to apply as a migration.
parentBranchIdstringrequired- The ID of the parent branch to apply the migration to.
projectIdstringrequired- The ID of the Neon project.
temporaryBranchIdstringrequired- The ID of the temporary branch created during the prepare step.
applyChangesboolean- Set to `true` to apply changes, `false` to discard and only clean up.default
true
neonmcp_complete_query_tuningFinish a query tuning session by applying or discarding changes from the temporary tuning branch.DestructiveComplete Query Tuning
Finish a query tuning session by applying or discarding changes from the temporary tuning branch.
Inputs
databaseNamestringrequired- The name of the database. Defaults to `neondb` if not provided.
projectIdstringrequired- The ID of the Neon project.
suggestedSqlStatementsarrayrequired- The DDL statements suggested by `prepare_query_tuning` (e.g. CREATE INDEX).
temporaryBranchIdstringrequired- The ID of the temporary branch created during the prepare step.
tuningIdstringrequired- The tuning ID returned by `prepare_query_tuning`. Not the branch ID.
applyChangesboolean- Set to `true` to apply changes, `false` to discard and only clean up.default
false branchIdstring- The ID of the branch. Leave blank to use the default branch.
roleNamestring- 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.
shouldDeleteTemporaryBranchboolean- Set to `true` to delete the temporary branch after tuning. Default is `true`.default
true
neonmcp_configure_neon_authConfigure Neon Auth settings for a branch by specifying the desired operation.DestructiveConfigure Neon Auth
Configure Neon Auth settings for a branch by specifying the desired operation.
Inputs
branchIdstringrequired- The ID of the branch to configure Neon Auth for.
operationstringrequired- The configuration operation to perform on Neon Auth.one of
add_trusted_originremove_trusted_originset_allow_localhostupdate_auth_methodsadd_oauth_providerupdate_oauth_providerremove_oauth_providerupdate_email_providersend_test_email projectIdstringrequired- The ID of the Neon project.
allowLocalhostboolean- Whether to allow localhost as a trusted origin. Used with set_allow_localhost operation.
trusted_originstring- The origin URL to add or remove from trusted origins. Required for add_trusted_origin and remove_trusted_origin operations.
neonmcp_delete_branchPermanently delete a branch and all its data from a Neon project.DestructiveDelete Branch
Permanently delete a branch and all its data from a Neon project.
Inputs
branchIdstringrequired- The ID of the branch. Leave blank to use the default branch.
projectIdstringrequired- The ID of the Neon project.
neonmcp_delete_projectPermanently delete a Neon project and all its branches and data.DestructiveDelete Project
Permanently delete a Neon project and all its branches and data.
Inputs
projectIdstringrequired- The ID of the Neon project.
neonmcp_reset_from_parentReset a branch to its parent branch state, discarding all changes made on the branch.DestructiveReset From Parent
Reset a branch to its parent branch state, discarding all changes made on the branch.
Inputs
branchIdOrNamestringrequired- The ID or name of the branch to reset.
projectIdstringrequired- The ID of the Neon project.
preserveUnderNamestring- Optional name to preserve the current branch state before resetting.
neonmcp_run_sqlExecute a single SQL statement against a Neon database and return the results.DestructiveRun Sql
Execute a single SQL statement against a Neon database and return the results.
Inputs
projectIdstringrequired- The ID of the Neon project.
sqlstringrequired- The SQL statement to execute.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
neonmcp_run_sql_transactionExecute multiple SQL statements as a single transaction against a Neon database.DestructiveRun Sql Transaction
Execute multiple SQL statements as a single transaction against a Neon database.
Inputs
projectIdstringrequired- The ID of the Neon project.
sqlStatementsarrayrequired- The SQL statements to execute as a single transaction.
branchIdstring- The ID of the branch. Leave blank to use the default branch.
databaseNamestring- The name of the database. Defaults to `neondb` if not provided.
No tools match.