# 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. --- ## 快速使用 添加到你的 `.mcp.json`(Claude Code): ```json { "mcpServers": { "Neon": { "type": "http", "url": "https://mcp.neon.tech/mcp" } } } ``` 重启 Claude Code,然后说:"为我的项目创建一个新的 Neon 数据库。" --- ## 简介 Neon MCP Server 将 AI Agent 连接到 Neon 无服务器 PostgreSQL 数据库,GitHub 574+ star。支持用自然语言管理数据库 — 创建项目、分支数据库、执行 SQL、优化查询。特色功能:通过临时分支进行安全的数据库迁移。适合使用 Claude Code、Cursor 等 MCP 客户端的开发者。 --- ## Neon MCP — 用 AI 管理无服务器 Postgres ### 可用工具 | 工具 | 功能 | |------|------| | 创建项目 | 新建 Neon Postgres 项目 | | 创建分支 | 即时数据库分支用于测试 | | 执行 SQL | 在任意分支上运行查询 | | 安全迁移 | 通过临时分支进行 schema 迁移 | | 查询优化 | AI 分析慢查询 | ### 安全迁移流程 1. AI 从主数据库创建临时分支 2. 在分支上执行 schema 变更 3. AI 验证迁移正确 4. 你确认 → 变更合并到主库 5. 清理临时分支 ### FAQ **Q: Neon MCP 是什么?** A: 让 AI Agent 通过自然语言管理 Neon 无服务器 PostgreSQL 数据库的 MCP 服务器。 **Q: 免费吗?** A: MCP 服务器免费开源(MIT)。Neon 有免费层(0.5 GB 存储)。 --- ## 来源与感谢 > 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/439d1fdb-33ce-11f1-9bc6-00163e2b0d79 Author: MCP Hub