MCP低风险未认领
PostgreSQL
MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.
antonorlovantonorlov/mcp-postgres-server
server.json
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.antonorlov/mcp-postgres-server",
"description": "MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.",
"title": "PostgreSQL",
"repository": {
"url": "https://github.com/antonorlov/mcp-postgres-server",
"source": "github"
},
"version": "0.3.1",
"websiteUrl": "https://github.com/antonorlov/mcp-postgres-server#readme",
"packages": [
{
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"identifier": "mcp-postgres-server",
"version": "0.3.1",
"runtimeHint": "npx",
"transport": {
"type": "stdio"
},
"environmentVariables": [
{
"description": "Full connection string (preferred). Supports sslmode in the URL.",
"format": "string",
"isSecret": true,
"placeholder": "postgres://user:password@localhost:5432/mydb?sslmode=require",
"name": "DATABASE_URL"
},
{
"description": "Database host (fallback when DATABASE_URL is not set).",
"format": "string",
"name": "PG_HOST"
},
{
"description": "Database port.",
"format": "number",
"default": "5432",
"name": "PG_PORT"
},
{
"description": "Database user.",
"format": "string",
"name": "PG_USER"
},
{
"description": "Database password.",
"format": "string",
"isSecret": true,
"name": "PG_PASSWORD"
},
{
"description": "Database name.",
"format": "string",
"name": "PG_DATABASE"
},
{
"description": "When true, execute performs writes and reads are sent directly. Off (default) is read-only: execute refuses writes and each read runs in a READ ONLY transaction.",
"format": "boolean",
"default": "false",
"choices": [
"false",
"true"
],
"name": "PG_ALLOW_WRITE"
},
{
"description": "TLS mode. require/allow/prefer encrypt without verifying the certificate; verify-ca/verify-full verify it (supply a CA via PG_SSL_CA). Unlike libpq, allow/prefer do not fall back to plaintext, so a server without TLS needs disable.",
"format": "string",
"choices": [
"disable",
"allow",
"prefer",
"require",
"verify-ca",
"verify-full"
],
"name": "PG_SSLMODE"
},
{
"description": "Path to a CA certificate file. Setting it by itself implies verify-full.",
"format": "filepath",
"name": "PG_SSL_CA"
},
{
"description": "Register the connect_db tool (runtime credential switching).",
"format": "boolean",
"default": "false",
"choices": [
"false",
"true"
],
"name": "PG_ENABLE_RUNTIME_CONNECT"
},
{
"description": "Byte budget for a query result sent to the model. Whole rows are kept while they fit; over the budget returnedRows < rowCount and truncated is true.",
"format": "number",
"default": "32768",
"name": "PG_MAX_RESULT_BYTES"
},
{
"description": "Statement timeout in milliseconds, applied to every session.",
"format": "number",
"default": "30000",
"name": "PG_STATEMENT_TIMEOUT"
},
{
"description": "Timeout in milliseconds for a single connect attempt (raise it for slow links or SSH tunnels).",
"format": "number",
"default": "10000",
"name": "PG_CONNECT_TIMEOUT"
},
{
"description": "SSH bastion host. Setting it enables tunneling: the server reaches the database only through an SSH tunnel to this host. Needs the ssh2 optional dependency.",
"format": "string",
"name": "PG_SSH_HOST"
},
{
"description": "SSH bastion port.",
"format": "number",
"default": "22",
"name": "PG_SSH_PORT"
},
{
"description": "SSH username.",
"format": "string",
"name": "PG_SSH_USER"
},
{
"description": "Path to a private key file. If unset, auth falls back like ssh: a running agent (SSH_AUTH_SOCK), then a default key (~/.ssh/id_ed25519, id_rsa, id_ecdsa).",
"format": "filepath",
"name": "PG_SSH_PRIVATE_KEY"
},
{
"description": "Passphrase for the private key, if encrypted.",
"format": "string",
"isSecret": true,
"name": "PG_SSH_PASSPHRASE"
},
{
"description": "true to use the ambient agent (SSH_AUTH_SOCK), or an explicit socket path / Windows named pipe.",
"format": "string",
"name": "PG_SSH_AGENT"
},
{
"description": "SSH login password. Opt-in; a key or agent takes precedence. Prefer keys, a bastion often disables password auth.",
"format": "string",
"isSecret": true,
"name": "PG_SSH_PASSWORD"
},
{
"description": "Pinned host-key fingerprint (SHA256:...). Host-key verification is mandatory and set only this way: without it the tunnel refuses to connect. Get it with ssh-keygen -lF host.",
"format": "string",
"placeholder": "SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "PG_SSH_FINGERPRINT"
},
{
"description": "SSH keepalive interval in ms; the tunnel drops after 3 unanswered keepalives, and the next call reconnects.",
"format": "number",
"default": "15000",
"name": "PG_SSH_KEEPALIVE_INTERVAL"
}
]
}
]
}权限
声明检测
运行代码—
node安装—
npm:mcp-postgres-server@0.3.1安装时运行脚本—无
网络无无
需要的凭据
DATABASE_URLPG_PASSWORDPG_SSH_PASSPHRASEPG_SSH_PASSWORDDATABASE_URLPG_PASSWORDPG_SSH_PASSPHRASEPG_SSH_PASSWORD工作区外的路径—无
智能体工具—无
检查
低风险 · 没有发现需要提醒的地方。
未经人工审核 · 已做规则检查;模型审核尚未开启。
版本
- #10.3.1最新2026年10月7日
PostgreSQL在 Codeg 中打开