Branching is Neon's actual feature, and the migration pair turns it into a safety mechanism: the change is applied and tested on a temporary branch and merges only when you say so. The access controls matter as much — read-only, project scoping and tool categories all travel in the URL, so an agent can be given querying and schema tools with no ability to create or delete anything.
A hosted MCP server for Neon's Postgres platform, fronting the Neon API: project and branch management, SQL execution, schema inspection, query tuning, and a two-step migration flow that tests changes on a throwaway branch first.
- Projects: list_projects, list_shared_projects, describe_project, create_project, delete_project, list_organizations
- Branches: create_branch, delete_branch, describe_branch, list_branch_computes, compare_database_schema, reset_from_parent
- SQL: run_sql for a single statement, run_sql_transaction for several in one transaction, get_connection_string, get_database_tables, describe_table_schema
- Migrations in two steps: prepare_database_migration applies and tests the change on a temporary branch, complete_database_migration merges it and cleans up
- Performance: inspect_database runs 15 read-only Postgres checks on a branch, list_slow_queries and explain_sql_statement narrow it down, and prepare_query_tuning with complete_query_tuning test an optimisation on a temporary branch before you commit to it
- Observability: query_logs, list_log_fields and list_log_field_values over Neon serverless function and storage logs
- Provisioning: provision_neon_auth and configure_neon_auth for authentication infrastructure, provision_neon_data_api for HTTP database access
- Discovery and docs: search and fetch across organisations, projects and branches; list_docs_resources and get_doc_resource for Neon's own documentation
- Query parameters on the server URL that decide the tool surface: readonly removes every write tool, projectId pins it to one project, and category keeps only the groups you name
An MCP client, a Neon account and Node.js v18.0.0 or newer. The hosted endpoint at https://mcp.neon.tech/mcp authenticates over OAuth, or with a Neon API key in the Authorization header for clients that cannot do OAuth. Read-only is chosen in the OAuth consent screen or by adding readonly=true to the URL, and in read-only mode get_connection_string is withheld because the string carries a privileged role password. If IP Allow is on, add 34.192.103.46 and 23.22.233.166 to the allowlist. Neon recommends this for local development and IDE work rather than production.
One command plus a key — npx add-mcp https://mcp.neon.tech/mcp, then supply credentials
