# Neon — MCP Server

> Query serverless Postgres, manage branches and run migrations with AI.

**Source:** https://mcpplaygroundonline.com/mcp-servers/neon  
**Transport:** http  
**Requires auth:** Yes

---

## What it does

The Neon MCP server exposes Neon's platform API and SQL execution layer as MCP tools. Models can list projects and branches, run arbitrary SQL queries, create and delete database branches for isolated testing, apply schema migrations, inspect table structures and query row data. Neon's branching model makes it especially powerful for AI-driven development: the agent can create a branch, run a migration on it, verify the results, and then ask you to promote it — all in one conversation. The server is hosted by Neon, so there is nothing to run locally.

## Tools exposed

- run_sql — execute any SQL query against a Neon database
- list_projects / get_project — enumerate and inspect Neon projects
- list_branches / create_branch / delete_branch — manage database branches
- get_database_schema — introspect tables, columns and constraints
- run_migration — apply a SQL migration on the current or a new branch
- get_connection_string — retrieve a connection URI for a branch

## Example queries you can run

- "List all tables in the main branch and their row counts."
- "Create a new branch called "feature-pricing" and run this migration on it."
- "Show me the last 10 rows inserted into the "events" table."
- "What indexes exist on the "orders" table and are any missing for common queries?"

## Details

- **Recommended model:** anthropic/claude-sonnet-4.5 — Claude Sonnet 4.5 handles multi-step SQL reasoning and branching workflows reliably. Haiku is sufficient for simple data queries on smaller projects.
- **Transport:** http
- **Authentication:** Required — Neon API key from console.neon.tech → Account Settings → API Keys. The key scopes access to all projects in your Neon account.
- **Hosted endpoint:** https://mcp.neon.tech/sse
- **Official source:** [Neon MCP Server — official docs](https://neon.tech/docs/ai/neon-mcp-server)

## Frequently asked questions

### What is the Neon MCP server?

It is an official hosted MCP server from Neon that lets AI models interact with your serverless Postgres databases. It covers SQL execution, schema inspection, branch management and migrations — all accessible from any MCP-compatible AI client.

### How is Neon MCP different from the standard Postgres MCP server?

Standard Postgres MCP servers connect to any Postgres instance via a connection string and focus on SQL queries. Neon MCP additionally exposes Neon's branching API — create isolated database branches for testing, run migrations safely and delete branches when done.

### Is the Neon MCP server free?

The MCP server is free to use. Neon has a generous free tier (0.5 GiB storage, unlimited branches). You pay for AI model usage separately — or use MCP Agent Studio's credit system.

### Can I use Neon MCP with my existing Postgres database?

Only if your database is hosted on Neon. For other Postgres providers (Supabase, Railway, self-hosted), use the generic Postgres MCP server instead.

### Is it safe to give an AI agent access to my Neon database?

Use a read-only Postgres role for query-only workflows. The Neon API key does grant write access at the platform level (branch creation). For production data, point the agent at a branch rather than the main branch.

---

_Test this server across 40+ models on MCP Playground: https://mcpplaygroundonline.com/mcp-servers/neon — free, no install._
