# 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. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Sign up at [neon.tech](https://neon.tech) (free tier: 0.5 GB storage, always-on) 2. Create a project and copy your connection string 3. Connect from any app: ```typescript import { neon } from "@neondatabase/serverless"; const sql = neon(process.env.DATABASE_URL); const users = await sql`SELECT * FROM users WHERE active = true`; ``` Add Neon MCP to `.mcp.json`: ```json { "mcpServers": { "neon": { "command": "npx", "args": ["-y", "@neondatabase/mcp-server-neon"], "env": { "NEON_API_KEY": "your-api-key" } } } } ``` --- ## Intro Neon is a serverless PostgreSQL database with instant branching, autoscaling to zero, and a generous free tier with 16,000+ GitHub stars. Its killer feature is database branching — create a copy-on-write branch of your entire database in milliseconds, like git branches for data. Test migrations, preview deployments, and AI agent experiments without touching production. Best for modern web apps on Vercel/Cloudflare that need Postgres without server management. Works with: any PostgreSQL client, Drizzle, Prisma, Next.js. Setup time: under 2 minutes. --- ## Key Features ### Database Branching ```bash # Create a branch for testing a migration neon branches create --name feat/new-schema # Branch has full copy of data — test freely # Delete when done — production untouched neon branches delete feat/new-schema ``` Use cases: - Preview deployments (each PR gets its own DB branch) - Schema migration testing - AI agent sandboxing (let agents write to a branch, not production) ### Scale to Zero No traffic? Database sleeps and costs nothing. First query wakes it in ~500ms. ### Serverless Driver Works in edge functions (Cloudflare Workers, Vercel Edge): ```typescript import { neon } from "@neondatabase/serverless"; // Works in edge functions — no TCP connection needed const sql = neon(process.env.DATABASE_URL); const result = await sql`SELECT NOW()`; ``` ### MCP Server Tools With the Neon MCP server, AI agents can: ``` "Create a new database branch for testing" "Run this migration on the test branch" "Show all branches and their sizes" "Delete the test branch" "List all tables in the production database" ``` ### Drizzle ORM Integration ```typescript import { drizzle } from "drizzle-orm/neon-http"; import { neon } from "@neondatabase/serverless"; const sql = neon(process.env.DATABASE_URL); const db = drizzle(sql); ``` ### Free Tier | Feature | Free | Pro | |---------|------|-----| | Storage | 0.5 GB | 50 GB+ | | Compute | 190 hours/month | Unlimited | | Branches | 10 | Unlimited | | Projects | 1 | Unlimited | | Scale to zero | Yes | Yes | ### Key Stats - 16,000+ GitHub stars - Instant database branching - Scale to zero (pay nothing when idle) - Edge-compatible serverless driver - MCP server available ### FAQ **Q: What is Neon?** A: Serverless PostgreSQL with instant database branching, autoscaling, and a free tier. Branch your database like git branches for safe testing. **Q: Is Neon free?** A: Free tier includes 0.5 GB storage and 190 compute hours/month. Pro from $19/month. **Q: How fast is branching?** A: Instant — branches use copy-on-write, so creating one takes milliseconds regardless of database size. --- ## Source & Thanks > Created by [Neon](https://github.com/neondatabase). Licensed under Apache 2.0. > > [neon](https://github.com/neondatabase/neon) — stars 16,000+ Thanks for bringing git-style branching to databases. --- ## 快速使用 在 [neon.tech](https://neon.tech) 注册,复制连接字符串: ```typescript import { neon } from "@neondatabase/serverless"; const sql = neon(process.env.DATABASE_URL); const users = await sql`SELECT * FROM users`; ``` --- ## 简介 Neon 是一个无服务器 PostgreSQL 数据库,GitHub 16,000+ stars。核心功能是数据库分支 — 毫秒级创建数据库副本,像 git 分支一样测试迁移。支持自动缩放到零和边缘函数。免费层 0.5GB 存储。 --- ## 来源与感谢 > Created by [Neon](https://github.com/neondatabase). Licensed under Apache 2.0. > > [neon](https://github.com/neondatabase/neon) — stars 16,000+ --- Source: https://tokrepo.com/en/workflows/a561d526-fcb0-474b-a566-82b45e889f68 Author: MCP Hub