Secure Neon access for AI agents

Serverless Postgres projects, branches, SQL, schema migrations, and query tuning via Neon's official MCP server.

Connect Neon to the gateway to give agents governed access to your Neon account — projects, branches, databases, SQL execution, schema migrations, query tuning, and the Neon docs.

Server URL: https://mcp.neon.tech/mcp

Setup

Neon's MCP server supports Dynamic Client Registration, so there's no app to create on Neon's side — the gateway registers an OAuth client automatically per org. See Dynamic client registration.

Dynamic client registration

  1. In the gateway, open Resources -> Add -> Neon.
  2. Choose Dynamic Client Registration. The gateway self-registers an OAuth client with Neon; no client ID/secret needed.
  3. Each user authorizes their own Neon account. The connection is bounded by that user's Neon permissions — no scopes are requested at registration.

Warning: Neon's MCP server runs in write mode and exposes destructive tools (delete_project, delete_branch, run_sql). Scope them down with a policy before giving agents broad access.

Available tools

ToolAccessDescription
list_projectsreadList Neon projects in the account
list_organizationsreadList organizations the user belongs to
list_shared_projectsreadList projects shared with the user
describe_projectreadGet a project's branches, databases, and metadata
create_projectwriteCreate a new Neon project
delete_projectdeleteDelete a project and all its data
create_branchwriteCreate a branch in a project
describe_branchreadGet objects and metadata for a branch
delete_branchdeleteDelete a branch
reset_from_parentwriteReset a branch to its parent's state
list_branch_computesreadList compute endpoints for a branch
run_sqlwriteExecute a single SQL statement
run_sql_transactionwriteExecute multiple SQL statements in a transaction
explain_sql_statementreadEXPLAIN/ANALYZE a query plan
describe_table_schemareadDescribe a table's schema
get_database_tablesreadList tables in a database
get_connection_stringreadGet a Postgres connection string (includes credentials)
compare_database_schemareadDiff a branch's schema against its parent
prepare_database_migrationwriteApply a schema migration in a temporary branch
complete_database_migrationwriteApply a prepared migration to the main branch
prepare_query_tuningwriteAnalyze and tune a query in a temporary branch
complete_query_tuningwriteApply or discard tuning changes on the main branch
list_slow_queriesreadList slow queries (requires pg_stat_statements)
provision_neon_authwriteProvision Neon Auth for a project
configure_neon_authwriteConfigure Neon Auth settings
get_neon_auth_configreadGet the current Neon Auth configuration
provision_neon_data_apiwriteProvision the Neon Data API for a branch
searchreadSearch the Neon documentation
fetchreadFetch a Neon docs search result by ID
list_docs_resourcesreadList available Neon docs resources
get_doc_resourcereadGet Neon docs resources by path

Policy examples

Read-only Neon access for all agents:

Allow - MCP: neon - Tools: list_*, describe_*, get_*, explain_sql_statement, compare_database_schema, search, fetch - Effect: Allow

Block destructive operations while allowing everything else (higher-priority deny):

Deny - MCP: neon - Tools: delete_*, run_sql, run_sql_transaction - Effect: Deny

On this page