# 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. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use Add to your `.mcp.json` (Claude Code) or MCP client config: ```json { "mcpServers": { "Neon": { "type": "http", "url": "https://mcp.neon.tech/mcp" } } } ``` Restart Claude Code. Then ask: "Create a new Neon database for my project." --- ## Intro Neon MCP Server connects AI agents to Neon serverless PostgreSQL databases with 574+ GitHub stars. It enables natural language database management — create projects, branch databases, run SQL queries, perform migrations, and optimize performance all through conversational commands. Features a safe migration workflow using temporary test branches before committing changes. Best for developers using Claude Code, Cursor, or any MCP client with Neon Postgres. Works with OAuth or API key authentication. Explore more MCP servers on [TokRepo MCP Hub](https://tokrepo.com/en/@MCP%20Hub). --- ## Neon MCP — Manage Serverless Postgres with AI ### What Is Neon? Neon is a serverless PostgreSQL platform with features like branching (instant database copies), autoscaling, and a generous free tier. The MCP server exposes all Neon management operations to AI agents. ### Available MCP Tools | Tool | Description | |------|------------| | **Create Project** | Spin up a new Neon Postgres project | | **List Projects** | View all your Neon projects | | **Create Branch** | Instant database branch for testing | | **Run SQL** | Execute queries against any branch | | **Schema Migration** | Safe migrations via temporary branches | | **Query Optimization** | AI-powered slow query analysis | | **Delete Project** | Clean up unused projects | | **Auth Setup** | Provision Neon Auth and Data API | ### Safe Migration Workflow 1. AI creates a temporary branch from your main database 2. Schema changes are applied to the branch 3. AI verifies the migration works correctly 4. You approve → changes are committed to main 5. Temporary branch is cleaned up This prevents accidental data loss from migrations. ### Configuration Options **Remote MCP (recommended — zero install):** ```json { "mcpServers": { "Neon": { "type": "http", "url": "https://mcp.neon.tech/mcp" } } } ``` **With API key authentication:** ```json { "mcpServers": { "Neon": { "type": "http", "url": "https://mcp.neon.tech/mcp", "headers": { "Authorization": "Bearer YOUR_NEON_API_KEY" } } } } ``` ### FAQ **Q: What is Neon MCP Server?** A: An MCP server that lets AI agents manage Neon serverless PostgreSQL databases through natural language — creating projects, branching, running SQL, and performing safe migrations. **Q: Is Neon MCP free?** A: The MCP server is free and open-source (MIT). Neon Postgres has a generous free tier with 0.5 GB storage and 190 hours of compute. **Q: Do I need to install anything?** A: No — the remote MCP endpoint at `mcp.neon.tech/mcp` works without local installation. Just add the config to your MCP client. --- ## Source & Thanks > Created by [Neon Database](https://github.com/neondatabase). Licensed under MIT. > > [mcp-server-neon](https://github.com/neondatabase/mcp-server-neon) — ⭐ 574+ Thanks to the Neon team for making serverless Postgres accessible to AI agents. --- ## Quick Use Add to your `.mcp.json` (Claude Code): ```json { "mcpServers": { "Neon": { "type": "http", "url": "https://mcp.neon.tech/mcp" } } } ``` Restart Claude Code and say: "Create a new Neon database for my project." --- ## Introduction Neon MCP Server connects AI agents to Neon serverless PostgreSQL databases, with 574+ GitHub stars. Manage databases in natural language — create projects, branch databases, execute SQL, optimize queries. Signature feature: safe database migrations via temporary branches. Ideal for developers using MCP clients like Claude Code and Cursor. --- ## Neon MCP — Manage Serverless Postgres with AI ### Available Tools | Tool | Function | |------|----------| | Create project | Spin up a new Neon Postgres project | | Create branch | Instant database branch for testing | | Execute SQL | Run queries against any branch | | Safe migration | Schema migration via temporary branches | | Query optimization | AI analyzes slow queries | ### Safe Migration Flow 1. AI creates a temporary branch from the main database 2. Schema changes execute on the branch 3. AI verifies the migration is correct 4. You confirm → changes merge into main 5. Temporary branch is cleaned up ### FAQ **Q: What is Neon MCP?** A: An MCP server that lets AI agents manage Neon serverless PostgreSQL databases through natural language. **Q: Is it free?** A: The MCP server is free and open source (MIT). Neon has a free tier with 0.5 GB storage. --- ## Source & Thanks > Created by [Neon Database](https://github.com/neondatabase). Licensed under MIT. > > [mcp-server-neon](https://github.com/neondatabase/mcp-server-neon) — ⭐ 574+ --- Source: https://tokrepo.com/en/workflows/neon-mcp-serverless-postgres-via-ai-agents-439d1fdb Author: MCP Hub