Neon — Serverless Postgres with Database Branching
Serverless PostgreSQL with instant database branching, autoscaling, and a generous free tier. Branch your database like git branches — test schema changes without touching production. 16,000+ stars.
Staging sûr pour cet actif
Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.
npx -y tokrepo@latest install a561d526-fcb0-474b-a566-82b45e889f68 --target codexStage les fichiers d'abord; l'activation exige la revue du README et du plan staged.
What it is
Neon is a serverless PostgreSQL platform that separates compute from storage, enabling instant database branching, autoscaling to zero, and a generous free tier. You can branch your database like git branches: create an isolated copy of production data to test schema changes without touching the real database.
This tool targets developers and teams who need PostgreSQL with modern cloud-native features. It is especially useful for CI/CD pipelines where each test run needs its own database copy, and for preview environments where each PR gets a dedicated database.
How it saves time or tokens
Database branching eliminates the need to maintain separate staging databases or restore backups for testing. A branch is created in milliseconds via copy-on-write, regardless of database size. Autoscaling to zero means you pay nothing when the database is idle. The estimated token cost for the MCP configuration is around 2,600 tokens.
How to use
- Create a Neon account and project.
- Get your connection string from the Neon dashboard.
- Connect with any PostgreSQL client or ORM.
- Create branches for testing and development.
# Connect with psql
psql 'postgresql://user:pass@ep-xxx.us-east-1.aws.neon.tech/dbname'
# Create a branch via Neon CLI
neonctl branches create --name feature-auth
# Get connection string for the branch
neonctl connection-string feature-auth
# Delete branch when done
neonctl branches delete feature-auth
Example
Using Neon branches in a CI pipeline:
# GitHub Actions: create a branch per PR
steps:
- name: Create Neon branch
id: neon
uses: neondatabase/create-branch-action@v5
with:
project_id: ${{ secrets.NEON_PROJECT_ID }}
branch_name: pr-${{ github.event.number }}
api_key: ${{ secrets.NEON_API_KEY }}
- name: Run migrations
run: npx prisma migrate deploy
env:
DATABASE_URL: ${{ steps.neon.outputs.db_url }}
- name: Run tests
run: npm test
env:
DATABASE_URL: ${{ steps.neon.outputs.db_url }}
Each PR gets an isolated database branch with production data.
Related on TokRepo
- Database tools — More database management tools
- MCP integrations — PostgreSQL MCP server
Common pitfalls
- Neon is PostgreSQL-compatible but not all extensions are supported. Check extension availability before migrating from self-hosted Postgres.
- Branch creation is instant, but branches share the same compute endpoint by default. Simultaneous access to many branches may need endpoint configuration.
- The free tier has compute hour limits. Development branches left running consume hours even when idle. Use autoscaling to zero.
- Connection pooling behavior differs from traditional Postgres. Use Neon's built-in connection pooler for serverless workloads.
- Data in branches is a point-in-time snapshot. Changes to the parent branch after branching are not reflected in child branches.
Questions fréquentes
Database branching creates an isolated copy of your database using copy-on-write technology. The branch starts with all the data from the parent. Changes to the branch do not affect the parent. It works like git branches but for databases.
Yes. Neon is wire-compatible with PostgreSQL. Any PostgreSQL client, ORM, or tool works with Neon. It supports PostgreSQL 14, 15, and 16 with most popular extensions.
Neon offers a free tier with sufficient resources for development and small projects. Paid plans start at low monthly rates and scale with compute hours and storage. Autoscaling to zero means you only pay for active usage.
Yes. Neon is designed for production with high availability, point-in-time recovery, and autoscaling. Many companies run production databases on Neon. The platform handles failover and storage replication.
Branch creation takes milliseconds regardless of database size because it uses copy-on-write at the storage level. No data is physically copied until changes are made to the branch.
Sources citées (3)
- Neon GitHub— Neon serverless Postgres with database branching
- Neon Docs— Neon database branching documentation
- PostgreSQL Documentation— PostgreSQL wire protocol compatibility
En lien sur TokRepo
Source et remerciements
Fil de discussion
Actifs similaires
Neon MCP — Serverless Postgres via AI Agents
MCP server for Neon serverless Postgres. Create projects, branch databases, run SQL, optimize queries via natural language. Safe migration workflow with branching. MIT, 574+ stars.
Turbopuffer MCP — Serverless Vector DB for AI Agents
MCP server for Turbopuffer serverless vector database. Sub-10ms search, zero ops, auto-scaling. Perfect for AI agent memory and RAG without managing infrastructure. 1,200+ stars.
Claude Code Agent: Neon Migration Specialist
Safe Postgres migrations with zero-downtime using Neon's branching workflow. Test schema changes in isolated database branches, validate thoroughly, then apply to...
pgEdge Postgres MCP — Read-Only by Default + Web UI
pgEdge Postgres MCP is a Go MCP server for Postgres with read-only defaults, optional HTTP auth, and a web UI for database exploration and diagnostics.