list_projects
List all Neon projects in your account.
limitorg_idsearch
io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 1, 2026
Neon Postgres projects, branches, SQL, and migrations from your MCP client.
在 MCP 客户端中管理 Neon Postgres 的项目、分支与 SQL,并支持在临时分支上分两阶段执行迁移和查询调优。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
pgcloud puts a Neon Postgres account within reach of an MCP client or a terminal. Projects and their branches can be listed, described, created, and deleted; compute endpoints and organizations can be inspected; and any database in a project can be queried directly — single statements, multi-statement transactions, table and column introspection, slow-query reports, and execution plans. Schema changes follow Neon's two-phase pattern: a migration or tuning session is prepared on a temporary branch, exercised there, and only then completed onto the original branch.
A Neon API key is required. Put it in the NEON_API_KEY environment
variable; it is sent to the Neon API as a Bearer token and never
appears in output. When the variable is missing, every call fails with
an error that names it.
Or run the container image:
The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
Every MCP tool is also a CLI subcommand. Tool arguments are passed as
one JSON object with --json:
Results print as JSON. Exit codes: 0 on success, 1 when an API or
SQL call fails (including a missing NEON_API_KEY), 2 for usage
errors.
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
MCP client configuration:
Management calls go to https://api.neon.tech/api/v2. SQL calls first
resolve the branch's connection URI from the API, then POST the
statement to the database host's HTTP SQL endpoint with the URI in the
Neon-Connection-String header; SQL text is passed through as given.
Migration and tuning sessions are held in the server process, so a
session must be completed by the same process that prepared it.
MIT — see LICENSE.
来源:README.md,提交 67b8c9e
List all Neon projects in your account.
limitorg_idsearchDescribes a Neon project
projectId必填Create a new Neon project.
nameorg_idregion_idDelete a Neon project
projectId必填Create a branch in a Neon project
projectId必填branchNameparentBranchIdDelete a branch from a Neon project
branchId必填projectId必填Get a tree view of all objects in a branch, including databases, schemas, tables, views, and functions
branchId必填projectId必填List compute endpoints for a project or a specific branch, including compute ID, type, and size.
branchIdprojectId必填List all organizations that the current user has access to, optionally filtered by a search term.
searchGet a PostgreSQL connection string for a Neon database with all parameters being optional
pooledbranchIdroleNameprojectId必填databaseNameExecute a single SQL statement against a Neon database.
sql必填branchIdroleNameprojectId必填databaseNameExecute a SQL transaction against a Neon database, should be used for multiple SQL statements.
sql必填branchIdroleNameprojectId必填databaseNameGet all tables in a Neon database
branchIdprojectId必填databaseNameDescribe the schema of a table in a Neon database
branchIdprojectId必填tableName必填databaseNameList slow queries from pg_stat_statements, ordered by mean execution time.
limitbranchIdprojectId必填databaseNameDescribe the PostgreSQL query execution plan for a SQL statement by running EXPLAIN in the database
sql必填branchIdprojectId必填databaseNamePerform a database schema migration by executing the given SQL on a temporary branch for safety, ready to complete onto the main branch.
branchIdprojectId必填databaseNamemigrationSql必填Complete a database migration when the user confirms the migration is ready to be applied to the main branch.
projectId必填migrationId必填databaseNameAnalyze a slow query or DML statement on a temporary branch, returning its execution plan to suggest optimizations.
sql必填branchIdprojectId必填databaseNameComplete a query tuning session by either applying the changes to the main branch or discarding them.
tuningId必填projectId必填applyChanges必填已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
npx @reneturcios/pgcloud list_projectsdocker run -i -e NEON_API_KEY ghcr.io/cloudcorprecords/pgcloudexport NEON_API_KEY=<your Neon API key>
pgcloud list_projectspgcloud list_projects --json '{"limit": 5, "search": "billing"}'pgcloud describe_project --json '{"projectId": "snowy-pond-12345678"}'pgcloud create_branch --json '{"projectId": "snowy-pond-12345678", "branchName": "dev"}'pgcloud run_sql --json '{"projectId": "snowy-pond-12345678", "sql": "select now()"}'pgcloud get_connection_string --json '{"projectId": "snowy-pond-12345678", "pooled": true}'
pgcloud --versionnpx -y @reneturcios/pgcloud mcp{ "mcpServers": { "pgcloud": { "command": "npx", "args": ["-y", "@reneturcios/pgcloud", "mcp"], "env": { "NEON_API_KEY": "your Neon API key" } } }}npm installnpm run build # tsc -> dist/npm test # node test runner over test/*.test.ts, no network (fake fetch fixtures)npm run dev # run the CLI from source via tsx