Get the FREE Ultimate OpenClaw Setup Guide →

mcp -neon

MCP server for interacting with Neon Management API and databases

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio neondatabase-mcp-server-neon npx neonctl@latest init

How to use

The Neon MCP Server lets you interact with Neon Postgres databases using natural language. It acts as a bridge between your LLM-enabled client and Neon’s API, translating conversational requests into Neon API calls for tasks such as creating projects and branches, running queries, and performing migrations. With Neon’s MCP setup, you can manage Neon resources, run ad-hoc queries, and orchestrate schema changes via natural language prompts, all through a supported MCP client. The server is designed for local development and IDE integrations, and it can operate with OAuth-based or API key-based authentication when used as a remote hosted MCP server.

To use it, run the quick setup command provided by Neon (npx neonctl@latest init) to configure the MCP server, agent skills, and editor integrations. You can also connect to Neon’s remote MCP server using OAuth or an API key, depending on your workflow. Once configured, you can issue natural language requests like creating a new database, applying a migration, or listing projects, and the MCP client will forward those commands to Neon through the MCP server.

How to install

Prerequisites:

Option A: Quick Setup (local, with API key or OAuth)

  1. Install and run the Neon MCP setup command:
    npx neonctl@latest init
    
    This configures the Neon MCP Server, agent skills, and editor integrations.
  2. Follow prompts to authenticate and connect to your Neon account.
  3. Restart your MCP client or refresh its configuration to apply changes.

Option B: Use Neon’s Remote MCP Server (OAuth)

  1. Add Neon’s MCP server to your workspace:
    npx add-mcp https://mcp.neon.tech/mcp
    
  2. Alternatively, configure in a JSON file (e.g., mcp.json or mcp_config.json):
    {
      "mcpServers": {
        "Neon": {
          "type": "http",
          "url": "https://mcp.neon.tech/mcp"
        }
      }
    }
    
  3. Restart the MCP client and authorize when prompted.

Option C: Use Neon’s Remote MCP Server (API Key)

  1. Create a Neon API key in the Neon Console.
  2. Add Neon MCP with the API key:
    npx add-mcp https://mcp.neon.tech/mcp --header "Authorization: Bearer <$NEON_API_KEY>"
    
  3. Or configure via JSON including the header:
    {
      "mcpServers": {
        "Neon": {
          "type": "http",
          "url": "https://mcp.neon.tech/mcp",
          "headers": {
            "Authorization": "Bearer <$NEON_API_KEY>"
          }
        }
      }
    }
    

Prerequisite note: If you’re enabling Read-Only mode, configure your client or the server headers accordingly (x-read-only).

Additional notes

Security: The Neon MCP Server grants powerful database management capabilities through natural language prompts. Always review and authorize actions requested by the LLM before execution. The server is intended for local development and IDE integrations only, not recommended for production. If you enable Read-Only mode, only non-destructive tools are available; run_sql remains usable, so ensure appropriate database roles for true read-only access. When using remote hosting, consider OAuth scopes or API keys to control access to projects and orgs. If you encounter connectivity issues, verify that your mcp.json or mcp_config.json correctly points to the Neon MCP endpoint and that any required headers (Authorization, x-read-only) are properly configured.

Related MCP Servers

Sponsor this space

Reach thousands of developers