Neon MCP Server

Databasestdiov0.3.0
Repository

MCP server for Neon's serverless PostgreSQL platform. Enables AI agents to manage Neon projects, branches, databases, and roles. Supports creating database branches for development and testing, running SQL queries, managing connection strings, and performing schema migrations. Leverages Neon's instant branching for safe experimentation without affecting production data.

Connect

Add this configuration to .claude/mcp.json

{
  "mcpServers": {
    "neon": {
      "command": "npx",
      "args": [
        "-y",
        "@neondatabase/mcp-server-neon"
      ],
      "env": {
        "NEON_API_KEY": "<YOUR_NEON_API_KEY>"
      }
    }
  }
}

Tools (4)

list_projects

List all Neon projects in the account.

{
  "type": "object",
  "properties": {}
}

create_branch

Create a new database branch from an existing one for safe development.

{
  "type": "object",
  "required": [
    "project_id"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name for the new branch"
    },
    "project_id": {
      "type": "string",
      "description": "Neon project ID"
    },
    "parent_branch_id": {
      "type": "string",
      "description": "Branch to create from (defaults to main)"
    }
  }
}

run_sql

Execute a SQL query against a Neon database branch.

{
  "type": "object",
  "required": [
    "project_id",
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "SQL query to execute"
    },
    "database": {
      "type": "string",
      "description": "Database name (defaults to neondb)"
    },
    "branch_id": {
      "type": "string",
      "description": "Branch to run the query on"
    },
    "project_id": {
      "type": "string",
      "description": "Neon project ID"
    }
  }
}

get_connection_string

Get the connection string for a Neon database branch.

{
  "type": "object",
  "required": [
    "project_id"
  ],
  "properties": {
    "database": {
      "type": "string",
      "description": "Database name"
    },
    "branch_id": {
      "type": "string",
      "description": "Branch ID"
    },
    "project_id": {
      "type": "string",
      "description": "Neon project ID"
    }
  }
}

Resources

This server does not expose any resources.

Prompts

This server does not expose any prompts.

Server Information

Author
Neon (@neondatabase)
Repository
https://github.com/neondatabase/mcp-server-neon
License
MIT
Version
0.3.0
Stars
1,540
Last Updated
May 26, 2026