by @neon
Official open-source Neon MCP Server that enables natural language interaction with Neon Postgres databases. Acts as a bridge between natural language requests and the Neon API, translating conversational commands into API calls for managing projects, branches, databases, queries, and migrations. Provides 33 tools organized into eight categories: Project Management (6 tools for listing, creating, deleting, describing projects and organizations), Branch Management (6 tools for creating, deleting, comparing schemas, resetting, listing computes), SQL Query Execution (5 tools for running queries, transactions, listing tables, describing schemas, connection strings), Database Migrations (2 tools for safe schema changes via prepare/complete pattern with temporary branches), Query Performance Optimization (4 tools for slow query analysis, explain plans, tuning with prepare/complete pattern), Neon Auth (1 tool for provisioning authentication), Neon Data API (1 tool for HTTP-based access with JWT), and Search & Discovery (3 tools for searching resources, fetching details, loading documentation). Supports two deployment modes: Remote MCP Server (Preview) with OAuth authentication (mcp.neon.tech), or Local MCP Server with API key (npm package @neondatabase/mcp-server-neon). Remote server supports Streamable HTTP and SSE transports, with optional read-only mode via OAuth scope selection or x-read-only header. Built with Next.js (landing directory) and Bun runtime, deployed to Vercel. Features safe migration workflow (prepare temporary branch, test, commit), guided onboarding (load_resource tool), and comprehensive search across organizations/projects/branches. Installation via npx neonctl@latest init (one-command setup for Cursor, VS Code, Claude Code) or manual configuration. Requires Node.js >= v18.0.0. Supports Cursor (one-click install), Claude Desktop/Code, Cline, Windsurf, Zed, ChatGPT, VS Code (GitHub Copilot). Security considerations: local development/IDE only, human oversight required, not recommended for production, review actions before execution, restrict access to authorized users. GitHub: 540 stars, 97 forks, MIT license. Active development with 176 commits, TypeScript (94.6%), 20 contributors.
This server provides the following tools for AI assistants:
List the first 10 Neon projects in your account with summary information (increase limit parameter for more)
List Neon projects shared with the current user, with optional search and limit parameters (default: 10)
Fetch detailed information about a specific Neon project, including ID, name, branches, and databases
List all organizations the current user has access to, with optional search by name or ID
Initiate a safe database migration by creating a temporary branch to test changes before affecting main branch
Finalize and apply a prepared database migration to the main branch, merging changes and cleaning up temporary resources
Retrieve details about a specific branch, including name, ID, and parent branch
Analyze query performance and suggest optimizations like index creation, creating a temporary branch for safe testing
Show the schema diff between a child branch and its parent branch
Finalize query tuning by applying optimizations to main branch or discarding them, cleaning up temporary tuning branch
Return the database connection string for a Neon database
Provision Neon Auth for a project, enabling authentication infrastructure with Auth provider integration
Provision the Neon Data API for HTTP-based database access with optional JWT authentication via Neon Auth or external JWKS
List all tables within a specified Neon database
Retrieve the schema definition of a specific table, including columns, data types, and constraints
Identify performance bottlenecks by finding the slowest queries in a database (requires pg_stat_statements extension)
Provide detailed execution plans for SQL queries to identify performance bottlenecks
Search across organizations, projects, and branches matching a query, returning IDs, titles, and Neon Console links
Create a new Neon project (container for branches, databases, roles, and computes)
Fetch detailed information about a specific organization, project, or branch using an ID (typically from search tool)
Load comprehensive Neon documentation and usage guidelines, including "neon-get-started" guide for setup and best practices
Create a new branch within a Neon project for development, testing, or migrations
Reset the current branch to its parent's state, discarding local changes (auto-preserves backup if branch has children)
Execute a single SQL query against a Neon database (supports read and write operations)
Execute a series of SQL queries within a single transaction against a Neon database
List compute endpoints for a project or branch, including compute ID, type, size, last active time, and autoscaling
Delete an existing Neon project and all its associated resources
Delete an existing branch from a Neon project