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

Credential modes

Neon supports per-org dynamic registration only, so there is no app to create on Neon's side and no client ID or secret to enter. See Credential modes for how it compares with Use SecureAuth's app and Bring your own app.

Before you begin

  • A Neon account that can reach the projects and branches your agents need.
  • Administrator access to your Agent Authority workspace, to add the resource.

Setup

  1. In the Agent Authority console, go to Resources and click Add Resource.
  2. Select Neon from the catalog.
  3. On Choose how to install Neon, click Per-org dynamic registration. Selecting it adds the resource right away with its tools pre-configured.

Dynamic client registration

When you add the resource, the gateway registers its own OAuth client with Neon – the credential that lets it sign users in. Neon's own organization and project permissions still apply, so an agent can only reach what the person who signed in could already reach.

Verify the connection

The gateway syncs the Neon tools automatically. To check the connection end to end, ask your agent to run a request:

List my Neon projects

If your projects come back, the connection is working.

How users connect

Access is per user. Each additional user connects their own Neon account the first time their agent calls a Neon tool: the gateway returns a sign-in link, the user authorizes once, and the tools work from then on. Go to Connections to manage linked accounts.

Available tools

Destructive tools are enabled by default

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.

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

Required scopes

The gateway does not request a fixed scope list for Neon. It registers the client without naming any scopes and records the ones Neon returns.

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

Next steps

  • Create a policy – start from the read-only pattern in Policy examples above.
  • Connections – manage the Neon accounts your users have linked.

On this page