# Neon サーバーレス Postgres MCP — 一時的な分岐と安全な DDL 移行 (`neon-serverless-mcp`)

> コピーオンライト PostgreSQL ブランチを作成し、スキーマ移行を安全に検証し、遅い SQL クエリを説明し、Neon サーバーレス プロジェクトを管理します。

- **Canonical URL:** https://syndipath.com/ja/mcp/neon-serverless-mcp
- **Runtime:** `npm` | **Transport:** STDIO | **License:** MIT | **Package:** `@neondatabase/mcp-server-neon`
- **Upvotes:** 498 | **GitHub Stars:** 3890 | **Weekly Installs:** 29400
- **Security Note:** HTTP-200 は NPM レジストリ (@neondatabase/mcp-server-neon) で検証されました。ワークスペーススコープの STDIO セッション内で npx 経由で実行します。

## Quick CLI Setup
```bash
# Run directly via Node npx
npx -y @neondatabase/mcp-server-neon

# Add to Claude Code CLI
claude mcp add -e NEON_API_KEY=${NEON_API_KEY} neon-serverless-mcp -- npx -y @neondatabase/mcp-server-neon
```

## MCP Manifest (`mcp.json`)
```json
{
  "mcpServers": {
    "neon-serverless-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@neondatabase/mcp-server-neon"
      ],
      "env": {
        "NEON_API_KEY": "${NEON_API_KEY}"
      }
    }
  }
}
```

## Exposed MCP Tools
- `neon_serverless_mcp_query(sql_or_filter: string, limit?: number)`: Create copy-on-write PostgreSQL branches, validate schema migrations safely, explain slow SQL queries, and manage Neon serverless proje.
- `neon_serverless_mcp_inspect_schema(namespace?: string)`: Enumerates tables, collections, column types, and active index definitions.
