Run SQL queries, list databases and tables, describe schemas, and manage branches on Neon serverless Postgres
95+ deploysclaude mcp add neon_postgres --url https://datafaucet.dev/api/mcp/t/neon-postgres
Run this command in your terminal · most users connect in under 60s
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
get_branch_schema
Get the database schema for a branch. Returns tables, columns, types, and constraints. Useful for comparing schemas across branches or understanding the current state before running migrations.
https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/schema
DELETE endpoints
delete_branch
Delete a branch. Returns the deleted branch object. Cannot delete the primary branch. Use to clean up test/preview branches after they are no longer needed. Deleting a branch also removes its compute endpoint.
https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}
Run this in your terminal:
claude mcp add neon_postgres https://datafaucet.dev/api/mcp/t/neon-postgres
Connect Neon Postgres to your AI agent in under 60 seconds. No account required.
{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-postgresWhat your AI agent sees
I have access to 8 tools from Neon Postgres: run_query, list_branches, list_projects, and 5 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
“List all databases and their current size”
Copy“Run a query to find the 10 most recent orders with customer info”
Copy“Show me the active connections and their running queries”
CopyClick any prompt to copy, then paste into your AI client.