Back to MCP Catalog

Neon Database MCP Server

DatabasesTypeScript
Interact with Neon Postgres databases using natural language
Available Tools

createProject

Creates a new Neon project

listProjects

Lists all Neon projects

getProject

Gets details about a specific Neon project

createBranch

Creates a new branch in a Neon project

listBranches

Lists all branches in a Neon project

executeSQL

Executes SQL queries on a Neon database

runMigration

Runs database migrations on a Neon project

Neon Database MCP enables natural language interaction with your Neon Postgres databases. This tool bridges the gap between conversational requests and the Neon API, allowing you to manage database projects, run queries, and perform migrations without writing SQL or API calls directly. It empowers both developers and non-technical users to work with Neon's serverless Postgres platform through intuitive language commands.

Overview

Neon Database MCP allows you to interact with Neon's serverless Postgres platform using natural language. Instead of writing SQL queries or API calls, you can simply describe what you want to do with your database, and the MCP server will translate your requests into the appropriate actions.

With this MCP, you can:

  • Create and manage Neon projects and database branches
  • Create, modify, and query database tables
  • Run database migrations
  • Get summaries of your projects and their contents
  • Perform other Neon management tasks through conversation

Installation

You have two options for connecting to Neon through MCP:

Option 1: Remote Hosted MCP Server (Recommended)

This option connects to Neon's managed MCP server using OAuth authentication. It's the easiest setup with no local installation required.

  1. Add the following configuration to your MCP client's configuration file:
{
    "mcpServers": {
      "Neon": {
        "command": "npx",
        "args": ["-y", "mcp-remote", "https://mcp.neon.tech/sse"]
      }
    }
}
  1. Restart your MCP client
  2. An OAuth window will open in your browser
  3. Follow the prompts to authorize access to your Neon account

Option 2: Local MCP Server

Run the Neon MCP server locally on your machine using your Neon API key.

Prerequisites:

  • Node.js (v18.0.0 or higher) and npm
  • A Neon account and API key (generate from Neon dashboard)

Setup via Smithery:

npx -y @smithery/cli@latest install neon --client <client_name>

Replace <client_name> with your MCP client (e.g., claude, cursor, etc.). You'll be prompted to enter your Neon API key during setup.

Manual Setup:

  1. Install the package:
npm install -g @neondatabase/mcp-server-neon
  1. Add the following to your MCP client's configuration file:
{
  "mcpServers": {
    "Neon": {
      "command": "neon-mcp-server",
      "args": [],
      "env": {
        "NEON_API_KEY": "YOUR_NEON_API_KEY"
      }
    }
  }
}
  1. Replace YOUR_NEON_API_KEY with your actual Neon API key
  2. Restart your MCP client

Usage Examples

Once connected, you can interact with your Neon databases using natural language. Here are some example commands:

  • "Create a new Postgres database called 'my-app' with tables for users, products, and orders"
  • "Show me all my Neon projects"
  • "Run a migration on my 'blog' project to add a 'published_date' column to the posts table"
  • "Query the users table in my 'customer-data' project and show me users who signed up in the last month"
  • "Create a new branch of my 'production' database for testing"

Security Considerations

The Neon MCP server grants powerful database management capabilities through natural language. Always:

  • Review and authorize actions requested by the LLM before execution
  • Ensure only authorized users have access to the MCP server and Neon API keys
  • Be cautious when running data-modifying operations

Troubleshooting

If you encounter issues:

  1. Verify your Neon API key is valid and has appropriate permissions
  2. Check that your MCP client configuration is correct
  3. Ensure you're using a compatible Node.js version
  4. For OAuth issues with the remote server, try logging out and back in

For additional help, visit the Neon documentation or GitHub repository.

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.