连接器指南阅读约 3 分钟17 个 MCP 工具7 种语言

如何通过 MCP 将 Neon 连接到 Claude

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

HC作者:HelpCode 团队更新于 3 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Neon

Neon

Let your AI manage Neon serverless Postgres: projects, branches, compute endpoints, databases, roles, schemas, operations and consumption. It can create branches and start or suspend computes after your confirmation. Never returns passwords. With a Neon API key.

个工具

17

区域

INTL

类别

数据库

身份验证

Bearer Token

所需环境变量

NEON_API_KEY
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 Neon,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

AnythingMCP 已收录在 Claude 的连接器目录中:一键添加到 Claude (在新标签页中打开),然后登录并选择 Claude 可以使用哪些 MCP 服务器。

摘要

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

试试这样问

Neon 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Neon · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Neon、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Neon + Claude

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

NEON_API_KEY

步骤 1 — 获取凭证

  1. 在 Neon Console 中打开 Account settings → API keys 创建个人密钥(它以你的身份在你所属的所有组织中操作),或打开 Organization settings → API keys 创建只能访问该组织项目的密钥。项目级密钥只能访问一个项目。
  2. 创建密钥后立即复制:Neon 只显示一次。把它粘贴到 NEON_API_KEY,然后安装连接器。密钥只会发送到 console.neon.tech。
  3. 用 neon_list_organizations 检查设置:它会列出密钥所属的组织及其 org_id。

覆盖范围:通过 Neon API v2 访问组织、项目、分支、计算端点、数据库、角色、数据库架构、操作和用量。AI 从 neon_list_projects 开始,依次使用 neon_get_project、neon_list_branches、neon_list_endpoints、neon_list_databases、neon_list_roles 和 neon_get_database_schema;后者会显示数据库的表、列、索引和约束,也可以查看过去某个时间点的状态。使用个人密钥时,组织下的项目需要提供 org_id。

每次更改前都会先问你:neon_create_branch、neon_start_endpoint 和 neon_suspend_endpoint 会更改你的项目,所以 AI 会先说明将发生什么,并等你同意。

  • 运行中的计算实例会消耗计算时长,计入套餐额度,付费套餐会按量计费。neon_start_endpoint 会启动计费;计算实例在空闲超时后会自动缩容到零。
  • neon_suspend_endpoint 会立即关闭该计算实例上的所有连接。
  • neon_create_branch 会立即创建写时复制分支,也可以基于过去某个时间点创建。超出套餐额度的分支可能产生费用,加到分支上的计算实例会立刻启动。临时分支请设置过期时间。
  • 每次更改都作为后台操作运行;neon_list_operations 和 neon_get_operation 会显示它何时完成。

安装时默认关闭:neon_delete_branch 会删除分支及其计算实例。需要管理员有意识地开启。根分支和默认分支永远不能删除。

用量和费用:neon_get_consumption 按小时、天或月返回每个项目的计算时间、存储、分支数量和网络传输量。它需要 org_id,仅适用于付费套餐(Launch、Scale、Business、Enterprise),并且不会唤醒任何计算实例。项目和分支详情也会显示本周期的计算时间、活跃时间、写入数据量和数据传输量。

不返回密码,不执行 SQL:角色密码和连接字符串永远不会返回,因此数据库密码不会传给 AI。这个连接器也不执行 SQL:Neon 的 HTTP SQL 需要包含角色密码的连接字符串,而不是 API 密钥。要查询数据,请在你的 Neon 主机上创建专用的只读 Postgres 角色,并添加 PostgreSQL 连接器(端口 5432,必须使用 SSL)。neon_get_database_schema 依然可以在不需要任何密码的情况下显示结构。

常见错误:401:API 密钥错误或已被撤销;请新建一个。403:密钥无权访问该项目或组织(项目级或组织级密钥被用在别处),或者你的套餐不包含该功能,例如用量历史。404:项目、分支或端点 ID 错误。423 Locked:项目上正在运行另一个操作;请等它完成后重试。429:请求过多;请稍候重试。

该连接器不会创建或删除项目、数据库和角色,不会重置密码,也不涉及 Neon Auth、Data API、快照和组织管理。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 Claude 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

推荐路径:在 claude.ai web 上工作,无需触碰任何配置文件。

  1. 在 Claude 中打开 Customize → Connectors。
  2. 点击 +,然后点击 Add custom connector。
  3. 输入名称(例如 Neon)和远程 MCP 服务器 URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,然后点击 Add。
  4. 点击 Connect,登录 AnythingMCP(OAuth)并允许访问。

下面所有工具都会出现在你的聊天中,开始输入提示。

可用工具

ToolWhat it does
neon_list_organizationsList the Neon organizations the API key belongs to, with org_id, name, handle and plan
neon_list_projectsList Neon projects with id, name, region, Postgres version, organization, storage size and last compute activity
neon_get_projectGet one Neon project: region, Postgres version, default compute settings, history retention, and this billing period's compute time, active…
neon_list_branchesList the branches of a Neon project with id, name, parent, state, default and protected flags, logical size and this period's compute time
neon_get_branchGet one Neon branch: name, parent and branch point, state, default and protected flags, expiry, logical size and this period's compute and…
neon_create_branchCreate a Neon branch (an instant copy-on-write copy of a parent branch, optionally at a point in time)
neon_delete_branchDelete a Neon branch and its computes, ending all their connections
neon_list_endpointsList the compute endpoints of a Neon project: id, branch, read-write or read-only, state (active, idle), autoscaling range in compute…
neon_get_endpointGet one Neon compute endpoint: state, branch, type, autoscaling range, suspend timeout, last activity, start and suspend times and host name
neon_start_endpointStart (wake) a Neon compute endpoint
neon_suspend_endpointSuspend a Neon compute endpoint now, which stops compute billing but closes every open connection to it
neon_list_databasesList the Postgres databases of a Neon branch with name and owner role
neon_list_rolesList the Postgres roles of a Neon branch with name, protected flag and authentication method
neon_get_database_schemaGet the schema of one database on a Neon branch (tables, columns, types, indexes, constraints, as pg_dump-style SQL), optionally as it was…
neon_list_operationsList the operations of a Neon project (branch creation, compute start and suspend, config changes), newest first, with status, error and…
neon_get_operationGet one Neon operation: action, status (scheduling, running, finished, failed, cancelled), error, retries and duration
neon_get_consumptionGet Neon consumption per project and period: compute unit seconds, root and child branch storage, instant restore storage, extra branches…

示例提示

  • “列出我们所有的 Neon 项目,包括区域、Postgres 版本和存储大小,并告诉我本月哪些项目没有计算活动。”
  • “给我看生产分支上 app 数据库的架构:表、列和索引。”
  • “基于 main 创建一个名为 feature-billing 的分支,7 天后过期。创建前先告诉我可能产生的费用。”
  • “现在哪些计算实例在运行?把 preview 分支上的那个暂停,但先问我。”
  • “上个月每个项目用了多少计算时间和存储?”

FAQ

Claude Code 和 Claude Desktop 一样工作吗? 是的,两者都指向 https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。

下一步

这份指南对你有帮助吗?

你的 Neon 智能体只差一次点击。

安装连接器,粘贴密钥,向 Claude 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 Neon 连接到 ChatGPT

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

连接器

如何通过 MCP 将 Neon 连接到 Cursor

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

连接器

如何通过 MCP 将 Neon 连接到 Gemini

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

连接器

如何通过 MCP 将 Neon 连接到 Meta Muse

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

连接器

Neon 接入 MCP:在任意 AI 代理中管理 Serverless Postgres

让你的 AI 管理 Neon Serverless Postgres:项目、分支、计算端点、数据库、角色、架构、操作和用量。经你确认后,它可以创建分支,启动或暂停计算实例。绝不返回密码。使用 Neon API 密钥连接。

连接器

如何通过 MCP 将 Avito 连接到 Claude

让你的 AI 使用你的 Avito 企业账户:列出广告并修改价格,读取浏览、联系和来电统计,检查自动上传 (autoload) 的上传记录及其错误、Feed 格式和钱包,并读取 Avito Messenger 聊天。发送消息和修改自动上传设置为可选功能,默认关闭。