Neon MCP Server
Neon's official, remote MCP server for its serverless Postgres platform, letting an agent create and branch databases, test migrations on a temporary branch first, and tune slow queries, all through natural language.
Overview
Neon MCP Server is Neon's own remote MCP server, hosted at
mcp.neon.tech, for managing Postgres projects on Neon's serverless platform.
It leans on Neon's branching model to make schema changes and query tuning
reversible instead of applying them straight to production.
How it works
- It manages projects, branches and compute endpoints directly: creating a project, branching a database, resetting a branch to its parent's current state, or restoring from a snapshot.
- Migrations follow a two-step pattern:
prepare_database_migrationcreates a temporary branch, applies the migration there, and hints the agent to test it beforecomplete_database_migrationmerges it into the main branch and cleans up the temporary one. - Query tuning works the same way: it analyzes a slow query, proposes optimizations like new indexes on a temporary branch, and only applies them for real once you approve the results.
- Fifteen built-in diagnostics (
inspect_database) cover relation and index sizes, cache hit rate, autovacuum and bloat, and replication state, the same checks behind Neon's ownneon inspect dbCLI command. - Read-only mode is available at the OAuth scope level or via a
?readonly=trueURL parameter, disabling every tool that could create, delete or modify data.
Examples
"Add a created_at column to the users table on the my-project database.
Test it on a branch first before touching the main branch."
Notes
Neon's own docs say this server is meant for local development and IDE integrations, not for production environments, since an agent connected to it can run real schema changes and SQL against your databases.
Installation
You need Node.js for the npx setup command, or nothing locally if you
connect straight to the remote hosted server. Either way, you need a Neon
account.
- Quickest path: run
npx neon@latest init. It detects Cursor, VS Code or Claude Code and configures the connection for you, including OAuth login. - Or add the remote server manually using the block in the sidebar, then sign in with OAuth when your client prompts you.
- Restart your client and confirm it can list your Neon projects.
- Treat this as a development and IDE tool. Per Neon's own guidance, don't connect it to a production workflow without review.
Related assets
Awesome MCP Servers
The largest community catalog of MCP servers: thousands of entries across dozens of categories (databases, browser automation, cloud, communication and more), tagged by language and scope.
Context7
Pulls updated, version-specific documentation and code examples straight from the source into your prompt, so agents stop citing outdated APIs or hallucinating ones that don't exist.
PostgreSQL Database Administrator
Acts as a hands-on PostgreSQL DBA through the official VS Code PostgreSQL extension: connects to a real server, inspects schemas, runs and optimizes queries, and handles backups, instead of guessing from application code.