Neon Serverless Postgresby Neon

Guides and best practices for working with Neon Serverless Postgres.

Neon Serverless Postgres

Neon is a serverless Postgres platform that separates compute and storage to offer autoscaling, branching, instant restore, and scale-to-zero. It's fully compatible with Postgres and works with any language, framework, or ORM that supports Postgres.

Neon Documentation

The Neon documentation is the source of truth for all Neon-related information. Always verify claims against the official docs before responding. Neon features and APIs evolve, so prefer fetching current docs over relying on training data.

Fetching docs as markdown

Any Neon doc page can be fetched as markdown in two ways:

  1. Append .md to the URL (simplest): https://neon.com/docs/introduction/branching.md
  2. Request text/markdown on the standard URL: curl -H "Accept: text/markdown" https://neon.com/docs/introduction/branching

Both return the same markdown content. Use whichever method your tools support.

Finding the right page

The docs index lists every available page with its URL and a short description:

https://neon.com/docs/llms.txt

Common doc URLs are listed in the tables below. If you need a page not listed here, search the docs index — don't guess URLs.

Common Documentation Paths

TopicURL
Introductionhttps://neon.com/docs/introduction.md
Branchinghttps://neon.com/docs/introduction/branching.md
Autoscalinghttps://neon.com/docs/introduction/autoscaling.md
Scale to Zerohttps://neon.com/docs/introduction/scale-to-zero.md
Instant Restorehttps://neon.com/docs/introduction/branch-restore.md
Read Replicashttps://neon.com/docs/introduction/read-replicas.md
Connection Poolinghttps://neon.com/docs/connect/connection-pooling.md
IP Allow Listshttps://neon.com/docs/introduction/ip-allow.md
Neon Authhttps://neon.com/docs/auth/overview.md
Data APIhttps://neon.com/docs/data-api/overview.md
Serverless Driverhttps://neon.com/docs/serverless/serverless-driver.md
JavaScript SDKhttps://neon.com/docs/reference/javascript-sdk.md
API Referencehttps://neon.com/docs/reference/api-reference.md
TypeScript SDKhttps://neon.com/docs/reference/typescript-sdk.md
Python SDKhttps://neon.com/docs/reference/python-sdk.md
Neon CLIhttps://neon.com/docs/reference/neon-cli.md
Logical Replicationhttps://neon.com/docs/guides/logical-replication-guide.md

Framework & Language Guides

Framework/LanguageURL
Next.jshttps://neon.com/docs/guides/nextjs.md
Djangohttps://neon.com/docs/guides/django.md
Drizzle ORMhttps://neon.com/docs/guides/drizzle.md
Prismahttps://neon.com/docs/guides/prisma.md
ORMs Guidehttps://neon.com/docs/get-started/orms.md

Platform API

For managing Neon resources programmatically (projects, branches, endpoints, databases, roles):

MethodDocumentation
REST APIhttps://neon.com/docs/reference/api-reference.md
Interactive APIhttps://api-docs.neon.tech/reference/getting-started-with-neon-api
OpenAPI Spechttps://neon.com/api_spec/release/v2.json
TypeScript SDKhttps://neon.com/docs/reference/typescript-sdk.md
Python SDKhttps://neon.com/docs/reference/python-sdk.md
CLIhttps://neon.com/docs/reference/neon-cli.md

Quick cross-reference (common operations across interfaces):

OperationREST APITypeScript SDKPython SDK
List projectsGET /projects?org_id=...listProjects({ org_id })projects(org_id=...)
Create projectPOST /projectscreateProject({...})project_create(...)
Get connection URIGET .../connection_urigetConnectionUri({...})connection_uri(...)
Create branchPOST .../branchescreateProjectBranch(...)branch_create(...)
Start endpointPOST .../endpoints/.../startstartProjectEndpoint(...)endpoint_start(...)

Overview of Resources

Reference the appropriate resource file based on the user's needs:

Core Guides

AreaResourceWhen to Use
What is Neonreferences/what-is-neon.mdUnderstanding Neon concepts, architecture, core resources
Featuresreferences/features.mdBranching, autoscaling, scale-to-zero, connection pooling
Getting Startedreferences/getting-started.mdSetting up a project, connection strings, dependencies, schema
Connection Methodsreferences/connection-methods.mdChoosing drivers based on platform and runtime
Developer Toolsreferences/devtools.mdVSCode extension, MCP server, Neon CLI (neon init)

Database Drivers & ORMs

HTTP/WebSocket queries for serverless/edge functions.

AreaResourceWhen to Use
Serverless Driverreferences/neon-serverless.md@neondatabase/serverless - HTTP/WebSocket queries
Drizzle ORMreferences/neon-drizzle.mdDrizzle ORM integration with Neon

Auth & Data API SDKs

Authentication and PostgREST-style data API for Neon.

AreaResourceWhen to Use
Neon Authreferences/neon-auth.md@neondatabase/auth or @neondatabase/neon-js - Setup, UI components, auth methods, common mistakes
Neon JS SDKreferences/neon-js.md@neondatabase/neon-js - Auth + Data API (PostgREST-style queries)

Neon Platform API & CLI

Managing Neon resources programmatically via REST API, SDKs, or CLI.

AreaResourceWhen to Use
REST APIreferences/neon-rest-api.mdDirect HTTP calls - auth, endpoints, rate limits
Neon CLIreferences/neon-cli.mdTerminal workflows, scripts, CI/CD pipelines
TypeScript SDKreferences/neon-typescript-sdk.md@neondatabase/api-client
Python SDKreferences/neon-python-sdk.mdneon-api package

Related Skills

Canvas Design
by Anthropic
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. license: Complete terms in LICENSE.txt
Remotion Best Practices
by Remotion
Best practices for Remotion - Video creation in React
React Best Practices
by Vercel
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
MCP Builder
by Anthropic
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). license: Complete terms in LICENSE.txt
Webapp Testing
by Anthropic
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs. license: Complete terms in LICENSE.txt
Git Commit
by Zapier
Generates storytelling-focused Conventional Commits messages with Jira context integration, then commits and pushes changes. Use when the user says "commit", "git commit", or asks to commit changes, wants to create a commit, or when work is complete and ready to commit.
Building MCP Servers on Cloudflare
by Cloudflare
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment. Generates server code, configures auth providers, and deploys to Workers. Use when: user wants to "build MCP server", "create MCP tools", "remote MCP", "deploy MCP", add "OAuth to MCP", or mentions Model Context Protocol on Cloudflare. Also triggers on "MCP authentication" or "MCP deployment".
YouTube Transcript Downloader
by michalparkola
Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.