MCP/Neon MCP Server
Neon MCP Server logo

Neon MCP Server

Verified Blue (500+ GitHub stars)

Manage Neon's serverless PostgreSQL databases, branches, migrations, and queries using natural language commands.

rag-data•Databases & Storage
GitHub655
License:MIT
VERIFIED

About this Server

Lets you manage Neon's serverless PostgreSQL databases using natural language commands instead of SQL or API calls. Create serverless projects, spin up instant copy-on-write database branches for testing, run conversational SQL queries, perform migrations, and execute full Neon API operations through natural conversational commands.

Real-time Interaction

Direct low-latency RPC protocol communication with structured JSON schemas.

Scoped Sandboxing

Restricted capability bounds to prevent accidental modifications or leakage.

Security & Best Practices

API Key Isolation: Keep your NEON_API_KEY inside environment variables or editor configuration; never commit keys to git.
Branch Sandboxing: Run experimental queries and dangerous migrations inside dedicated ephemeral branches rather than production main.
Read-Only Role Scoping: Use dedicated read-only database credentials when connecting AI assistants to production databases.
Transport Security: All serverless PostgreSQL traffic and management RPCs run over encrypted TLS connections.

When to Use (and When Not To)

Best For
  • •Non-developers and developers who need instant conversational database access without writing raw SQL
  • •Database schema changes, migrations, and instant preview environments for pull requests
  • •Rapid prototyping with serverless Postgres that autoscales and scales to zero when idle
  • •AI-assisted development workflows needing isolated ephemeral database copies in seconds
Not For / Limitations
  • •Heavy continuous analytical processing (OLAP) queries across terabytes of data
  • •Self-hosted PostgreSQL installations outside of the Neon cloud platform
  • •Environments lacking a Neon API key or internet access to Neon cloud control plane endpoints

Install & Setup

terminal command
$npx add-mcp "https://mcp.neon.tech/mcp?category=projects&category=branches&category=endpoints&category=querying&category=schema"

Exposed Tools & Endpoints

7 tools

Functions your AI agent can invoke via this Model Context Protocol server

create_project

Create a new serverless PostgreSQL project with autoscaling compute on Neon.

create_branch

Spin up an instant copy-on-write database branch for isolated testing, development, or schema migrations.

list_projects

List all serverless PostgreSQL projects and active compute endpoints in your Neon account.

list_branches

Retrieve all branches, parent lineages, and storage snapshots for a selected database project.

run_sql

Execute natural language or raw SQL queries against serverless PostgreSQL databases.

run_migration

Apply database schema changes, DDL migrations, and table definitions to target branches.

get_connection_string

Retrieve pooled and direct PostgreSQL connection URIs formatted for Node.js, Prisma, or Drizzle.