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