Run SQL queries, list databases and tables, describe schemas, and manage branches on Neon serverless Postgres
95+ deploysYour AI agent gets 6 capabilities in one connection. Deploy once, use from any client.
POST endpoints
run_query
Execute a SQL query against a Neon Postgres branch. Body: query (SQL string), params (optional array for parameterized queries). Returns rows, columns, rowCount, and command (SELECT/INSERT/UPDATE/DELETE). Max 1000 rows returned.
https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/sql
create_branch
Create a new branch from a parent branch (instant copy-on-write). Body: branch.name (string), branch.parent_id (source branch). Branches are free and instant. Use for testing migrations, previewing changes, or isolating workloads.
https://console.neon.tech/api/v2/projects/{project_id}/branches
GET endpoints
list_branches
List all branches in a Neon project. Returns id, name, current_state (ready/init), created_at, updated_at, primary (boolean), and parent branch info. Use branch_id with run_query to target specific branches.
https://console.neon.tech/api/v2/projects/{project_id}/branches
list_projects
List all Neon projects. Returns id, name, region_id, pg_version, created_at, and current compute endpoint status. Use project_id with other endpoints.
https://console.neon.tech/api/v2/projects
list_databases
List databases on a branch. Returns name, owner_name, created_at. Default database is usually 'neondb'. Use database name in SQL queries (SET search_path or qualified table names).
https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/databases
list_roles
List database roles (users) on a branch. Returns name, protected (system roles), created_at. The default role is 'neondb_owner'. Use roles for connection strings and permission management.
https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/roles
Connect Neon Postgres to Claude Code with one command:
claude mcp add neon_postgres https://datafaucet.dev/api/mcp/t/neon-postgres{notion_token}) with your real credentialsNeed API keys? Try our free sandbox templates first to see MCP in action with zero setup.
Replace these placeholders with your real values before deploying:
{branch_id}Resource identifier{branch_name}Your value{neon_api_key}API settings page{parent_branch_id}Resource identifier{project_id}Resource identifier{sql_query}Your valuePreview:
POST https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/sql Authorization: Bearer {neon_api_key} Content-Type: application/json {"query":"{sql_query}"}
claude mcp add neon_postgres --url https://datafaucet.dev/api/mcp/t/neon-postgres
Paste into your client's MCP configuration file · most users connect in under 60s
claude mcp add neon_postgres --url https://datafaucet.dev/api/mcp/t/neon-postgresWhat your AI agent sees
I have access to 6 tools from Neon Postgres: run_query, list_branches, list_projects, and 3 more.
“Execute a SQL query against a Neon Postgres branch. Body: query (SQL string), params (optional array for parameterized queries). Returns rows, columns, rowCount, and command (SELECT/INSERT/UPDATE/DELETE). Max 1000 rows returned.”
Calling run_query... Done. Here are the results.
Try these prompts
“Execute a SQL query against a Neon Postgres branch. Body: query (SQL string), params (optional array for parameterized queries). Returns rows, columns, rowCount, and command (SELECT/INSERT/UPDATE/DELETE). Max 1000 rows returned”
Copy“List all branches in a Neon project. Returns id, name, current_state (ready/init), created_at, updated_at, primary (boolean), and parent branch info. Use branch_id with run_query to target specific branches”
Copy“List all Neon projects. Returns id, name, region_id, pg_version, created_at, and current compute endpoint status. Use project_id with other endpoints”
CopyClick any prompt to copy, then paste into your AI client.