Neon MCP Server

Databasestdiov0.3.0
代码仓库

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.

连接

将此配置添加到 .claude/mcp.json

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

工具 (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"
    }
  }
}

资源

此服务器未提供任何资源。

提示词

此服务器未提供任何提示词。

服务器信息

作者
Neon (@neondatabase)
代码仓库
https://github.com/neondatabase/mcp-server-neon
许可证
MIT
版本
0.3.0
星标
1,540
最后更新
2026年5月26日