PostgreSQL
Rank #25,670io.github.antonorlov/mcp-postgres-server
MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.
What you can do with PostgreSQL
PostgreSQL is a Model Context Protocol (MCP) server published by antonorlov. It ranks #25,670 of 144,396 active servers on MCP Toplist, and its repository has 23 GitHub stars. PostgreSQL is listed on Official MCP, with 2 tracked versions. It was first listed on Sep 13, 2026 and most recently updated on Sep 14, 2026.
Not verifiedMCP Toplist has not yet written a checked profile for this server, so the paragraph above is assembled from registry data only. The repository README is the authority on what it does.
What PostgreSQL can and cannot do
Not verifiedMCP Toplist has not catalogued this server's tools or limitations. The repository README lists them.
What you need before using PostgreSQL
The registry listing declares no required environment variables or authentication. This is declared metadata, not a verified install — the repository README is the authority.
Declared by the Official MCP Registry, last synced Oct 16, 2026. Not independently verified by MCP Toplist.
- DATABASE_URL · optional
- PG_HOST · optional
- PG_PORT · optional
- PG_USER · optional
- PG_PASSWORD · optional
- PG_DATABASE · optional
- PG_ALLOW_WRITE · optional
- PG_SSLMODE · optional
- PG_SSL_CA · optional
- PG_ENABLE_RUNTIME_CONNECT · optional
- PG_MAX_RESULT_BYTES · optional
- PG_STATEMENT_TIMEOUT · optional
- PG_CONNECT_TIMEOUT · optional
- PG_SSH_HOST · optional
- PG_SSH_PORT · optional
- PG_SSH_USER · optional
- PG_SSH_PRIVATE_KEY · optional
- PG_SSH_PASSPHRASE · optional
- PG_SSH_AGENT · optional
- PG_SSH_PASSWORD · optional
- PG_SSH_FINGERPRINT · optional
- PG_SSH_KEEPALIVE_INTERVAL · optional
Connect PostgreSQL and confirm it works
claude mcp add mcp-postgres-server -e "DATABASE_URL=<your DATABASE_URL>" -e "PG_HOST=<your PG_HOST>" -e "PG_PORT=<your PG_PORT>" -e "PG_USER=<your PG_USER>" -e "PG_PASSWORD=<your PG_PASSWORD>" -e "PG_DATABASE=<your PG_DATABASE>" -e "PG_ALLOW_WRITE=<your PG_ALLOW_WRITE>" -e "PG_SSLMODE=<your PG_SSLMODE>" -e "PG_SSL_CA=<your PG_SSL_CA>" -e "PG_ENABLE_RUNTIME_CONNECT=<your PG_ENABLE_RUNTIME_CONNECT>" -e "PG_MAX_RESULT_BYTES=<your PG_MAX_RESULT_BYTES>" -e "PG_STATEMENT_TIMEOUT=<your PG_STATEMENT_TIMEOUT>" -e "PG_CONNECT_TIMEOUT=<your PG_CONNECT_TIMEOUT>" -e "PG_SSH_HOST=<your PG_SSH_HOST>" -e "PG_SSH_PORT=<your PG_SSH_PORT>" -e "PG_SSH_USER=<your PG_SSH_USER>" -e "PG_SSH_PRIVATE_KEY=<your PG_SSH_PRIVATE_KEY>" -e "PG_SSH_PASSPHRASE=<your PG_SSH_PASSPHRASE>" -e "PG_SSH_AGENT=<your PG_SSH_AGENT>" -e "PG_SSH_PASSWORD=<your PG_SSH_PASSWORD>" -e "PG_SSH_FINGERPRINT=<your PG_SSH_FINGERPRINT>" -e "PG_SSH_KEEPALIVE_INTERVAL=<your PG_SSH_KEEPALIVE_INTERVAL>" -- npx -y mcp-postgres-serverReplace each placeholder with your own value before saving.
[mcp_servers.mcp-postgres-server]
command = "npx"
args = ["-y", "mcp-postgres-server"]
[mcp_servers.mcp-postgres-server.env]
DATABASE_URL = "<your DATABASE_URL>"
PG_HOST = "<your PG_HOST>"
PG_PORT = "<your PG_PORT>"
PG_USER = "<your PG_USER>"
PG_PASSWORD = "<your PG_PASSWORD>"
PG_DATABASE = "<your PG_DATABASE>"
PG_ALLOW_WRITE = "<your PG_ALLOW_WRITE>"
PG_SSLMODE = "<your PG_SSLMODE>"
PG_SSL_CA = "<your PG_SSL_CA>"
PG_ENABLE_RUNTIME_CONNECT = "<your PG_ENABLE_RUNTIME_CONNECT>"
PG_MAX_RESULT_BYTES = "<your PG_MAX_RESULT_BYTES>"
PG_STATEMENT_TIMEOUT = "<your PG_STATEMENT_TIMEOUT>"
PG_CONNECT_TIMEOUT = "<your PG_CONNECT_TIMEOUT>"
PG_SSH_HOST = "<your PG_SSH_HOST>"
PG_SSH_PORT = "<your PG_SSH_PORT>"
PG_SSH_USER = "<your PG_SSH_USER>"
PG_SSH_PRIVATE_KEY = "<your PG_SSH_PRIVATE_KEY>"
PG_SSH_PASSPHRASE = "<your PG_SSH_PASSPHRASE>"
PG_SSH_AGENT = "<your PG_SSH_AGENT>"
PG_SSH_PASSWORD = "<your PG_SSH_PASSWORD>"
PG_SSH_FINGERPRINT = "<your PG_SSH_FINGERPRINT>"
PG_SSH_KEEPALIVE_INTERVAL = "<your PG_SSH_KEEPALIVE_INTERVAL>"Add to ~/.codex/config.toml. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"mcp-postgres-server": {
"command": "npx",
"args": [
"-y",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "<your DATABASE_URL>",
"PG_HOST": "<your PG_HOST>",
"PG_PORT": "<your PG_PORT>",
"PG_USER": "<your PG_USER>",
"PG_PASSWORD": "<your PG_PASSWORD>",
"PG_DATABASE": "<your PG_DATABASE>",
"PG_ALLOW_WRITE": "<your PG_ALLOW_WRITE>",
"PG_SSLMODE": "<your PG_SSLMODE>",
"PG_SSL_CA": "<your PG_SSL_CA>",
"PG_ENABLE_RUNTIME_CONNECT": "<your PG_ENABLE_RUNTIME_CONNECT>",
"PG_MAX_RESULT_BYTES": "<your PG_MAX_RESULT_BYTES>",
"PG_STATEMENT_TIMEOUT": "<your PG_STATEMENT_TIMEOUT>",
"PG_CONNECT_TIMEOUT": "<your PG_CONNECT_TIMEOUT>",
"PG_SSH_HOST": "<your PG_SSH_HOST>",
"PG_SSH_PORT": "<your PG_SSH_PORT>",
"PG_SSH_USER": "<your PG_SSH_USER>",
"PG_SSH_PRIVATE_KEY": "<your PG_SSH_PRIVATE_KEY>",
"PG_SSH_PASSPHRASE": "<your PG_SSH_PASSPHRASE>",
"PG_SSH_AGENT": "<your PG_SSH_AGENT>",
"PG_SSH_PASSWORD": "<your PG_SSH_PASSWORD>",
"PG_SSH_FINGERPRINT": "<your PG_SSH_FINGERPRINT>",
"PG_SSH_KEEPALIVE_INTERVAL": "<your PG_SSH_KEEPALIVE_INTERVAL>"
}
}
}
}Add to claude_desktop_config.json (Settings → Developer → Edit Config). Replace each placeholder with your own value before saving.
{
"mcpServers": {
"mcp-postgres-server": {
"command": "npx",
"args": [
"-y",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "<your DATABASE_URL>",
"PG_HOST": "<your PG_HOST>",
"PG_PORT": "<your PG_PORT>",
"PG_USER": "<your PG_USER>",
"PG_PASSWORD": "<your PG_PASSWORD>",
"PG_DATABASE": "<your PG_DATABASE>",
"PG_ALLOW_WRITE": "<your PG_ALLOW_WRITE>",
"PG_SSLMODE": "<your PG_SSLMODE>",
"PG_SSL_CA": "<your PG_SSL_CA>",
"PG_ENABLE_RUNTIME_CONNECT": "<your PG_ENABLE_RUNTIME_CONNECT>",
"PG_MAX_RESULT_BYTES": "<your PG_MAX_RESULT_BYTES>",
"PG_STATEMENT_TIMEOUT": "<your PG_STATEMENT_TIMEOUT>",
"PG_CONNECT_TIMEOUT": "<your PG_CONNECT_TIMEOUT>",
"PG_SSH_HOST": "<your PG_SSH_HOST>",
"PG_SSH_PORT": "<your PG_SSH_PORT>",
"PG_SSH_USER": "<your PG_SSH_USER>",
"PG_SSH_PRIVATE_KEY": "<your PG_SSH_PRIVATE_KEY>",
"PG_SSH_PASSPHRASE": "<your PG_SSH_PASSPHRASE>",
"PG_SSH_AGENT": "<your PG_SSH_AGENT>",
"PG_SSH_PASSWORD": "<your PG_SSH_PASSWORD>",
"PG_SSH_FINGERPRINT": "<your PG_SSH_FINGERPRINT>",
"PG_SSH_KEEPALIVE_INTERVAL": "<your PG_SSH_KEEPALIVE_INTERVAL>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). Replace each placeholder with your own value before saving.
{
"servers": {
"mcp-postgres-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "<your DATABASE_URL>",
"PG_HOST": "<your PG_HOST>",
"PG_PORT": "<your PG_PORT>",
"PG_USER": "<your PG_USER>",
"PG_PASSWORD": "<your PG_PASSWORD>",
"PG_DATABASE": "<your PG_DATABASE>",
"PG_ALLOW_WRITE": "<your PG_ALLOW_WRITE>",
"PG_SSLMODE": "<your PG_SSLMODE>",
"PG_SSL_CA": "<your PG_SSL_CA>",
"PG_ENABLE_RUNTIME_CONNECT": "<your PG_ENABLE_RUNTIME_CONNECT>",
"PG_MAX_RESULT_BYTES": "<your PG_MAX_RESULT_BYTES>",
"PG_STATEMENT_TIMEOUT": "<your PG_STATEMENT_TIMEOUT>",
"PG_CONNECT_TIMEOUT": "<your PG_CONNECT_TIMEOUT>",
"PG_SSH_HOST": "<your PG_SSH_HOST>",
"PG_SSH_PORT": "<your PG_SSH_PORT>",
"PG_SSH_USER": "<your PG_SSH_USER>",
"PG_SSH_PRIVATE_KEY": "<your PG_SSH_PRIVATE_KEY>",
"PG_SSH_PASSPHRASE": "<your PG_SSH_PASSPHRASE>",
"PG_SSH_AGENT": "<your PG_SSH_AGENT>",
"PG_SSH_PASSWORD": "<your PG_SSH_PASSWORD>",
"PG_SSH_FINGERPRINT": "<your PG_SSH_FINGERPRINT>",
"PG_SSH_KEEPALIVE_INTERVAL": "<your PG_SSH_KEEPALIVE_INTERVAL>"
}
}
}
}Save as .vscode/mcp.json in your workspace. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"mcp-postgres-server": {
"command": "npx",
"args": [
"-y",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "<your DATABASE_URL>",
"PG_HOST": "<your PG_HOST>",
"PG_PORT": "<your PG_PORT>",
"PG_USER": "<your PG_USER>",
"PG_PASSWORD": "<your PG_PASSWORD>",
"PG_DATABASE": "<your PG_DATABASE>",
"PG_ALLOW_WRITE": "<your PG_ALLOW_WRITE>",
"PG_SSLMODE": "<your PG_SSLMODE>",
"PG_SSL_CA": "<your PG_SSL_CA>",
"PG_ENABLE_RUNTIME_CONNECT": "<your PG_ENABLE_RUNTIME_CONNECT>",
"PG_MAX_RESULT_BYTES": "<your PG_MAX_RESULT_BYTES>",
"PG_STATEMENT_TIMEOUT": "<your PG_STATEMENT_TIMEOUT>",
"PG_CONNECT_TIMEOUT": "<your PG_CONNECT_TIMEOUT>",
"PG_SSH_HOST": "<your PG_SSH_HOST>",
"PG_SSH_PORT": "<your PG_SSH_PORT>",
"PG_SSH_USER": "<your PG_SSH_USER>",
"PG_SSH_PRIVATE_KEY": "<your PG_SSH_PRIVATE_KEY>",
"PG_SSH_PASSPHRASE": "<your PG_SSH_PASSPHRASE>",
"PG_SSH_AGENT": "<your PG_SSH_AGENT>",
"PG_SSH_PASSWORD": "<your PG_SSH_PASSWORD>",
"PG_SSH_FINGERPRINT": "<your PG_SSH_FINGERPRINT>",
"PG_SSH_KEEPALIVE_INTERVAL": "<your PG_SSH_KEEPALIVE_INTERVAL>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"mcp-postgres-server": {
"command": "npx",
"args": [
"-y",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "<your DATABASE_URL>",
"PG_HOST": "<your PG_HOST>",
"PG_PORT": "<your PG_PORT>",
"PG_USER": "<your PG_USER>",
"PG_PASSWORD": "<your PG_PASSWORD>",
"PG_DATABASE": "<your PG_DATABASE>",
"PG_ALLOW_WRITE": "<your PG_ALLOW_WRITE>",
"PG_SSLMODE": "<your PG_SSLMODE>",
"PG_SSL_CA": "<your PG_SSL_CA>",
"PG_ENABLE_RUNTIME_CONNECT": "<your PG_ENABLE_RUNTIME_CONNECT>",
"PG_MAX_RESULT_BYTES": "<your PG_MAX_RESULT_BYTES>",
"PG_STATEMENT_TIMEOUT": "<your PG_STATEMENT_TIMEOUT>",
"PG_CONNECT_TIMEOUT": "<your PG_CONNECT_TIMEOUT>",
"PG_SSH_HOST": "<your PG_SSH_HOST>",
"PG_SSH_PORT": "<your PG_SSH_PORT>",
"PG_SSH_USER": "<your PG_SSH_USER>",
"PG_SSH_PRIVATE_KEY": "<your PG_SSH_PRIVATE_KEY>",
"PG_SSH_PASSPHRASE": "<your PG_SSH_PASSPHRASE>",
"PG_SSH_AGENT": "<your PG_SSH_AGENT>",
"PG_SSH_PASSWORD": "<your PG_SSH_PASSWORD>",
"PG_SSH_FINGERPRINT": "<your PG_SSH_FINGERPRINT>",
"PG_SSH_KEEPALIVE_INTERVAL": "<your PG_SSH_KEEPALIVE_INTERVAL>"
}
}
}
}Replace each placeholder with your own value before saving.
After adding the config, ask your client to list this server's tools. A tool list confirms the connection; an empty list or an error means the server did not start or needs credentials.
When to choose another server
No task-specific alternatives are catalogued for PostgreSQLyet; the list above is its publisher's other servers.
What changed, and when this was checked
- First listed
- Sep 13, 2026
- Latest version published
- Sep 14, 2026
- Version history
- 2 versions tracked (below)
- Requirements evidence
- Declared by the Official MCP Registry, last synced Oct 16, 2026. Not independently verified by MCP Toplist.
- Profile checked
- Not yet — purpose, capabilities and requirements above come from registry data only
- Ranking data as of
- Sep 14, 2026
- Official MCP ↗listed since Sep 15, 2026 · still listed
Do you maintain PostgreSQL? to correct or enrich this profile.
Available versions (2)
| Version | Published |
|---|---|
| 0.3.1 | Sep 14, 2026 |
| 0.3.0 | Sep 14, 2026 |
Ranks ahead of 118,726 of 144,396 servers on MCP Toplist.
Show your rank
Maintain this server? Add the live rank badge to your README — it updates automatically as the leaderboard changes.
[](https://mcptoplist.com/server/io.github.antonorlov%2Fmcp-postgres-server)<a href="https://mcptoplist.com/server/io.github.antonorlov%2Fmcp-postgres-server"><img src="https://mcptoplist.com/badge/io.github.antonorlov%2Fmcp-postgres-server.svg" alt="MCP Toplist: Top 25% of 144,396" /></a>Variants: append ?metric=score or ?metric=stars to the image URL.
Frequently asked questions
- Who maintains PostgreSQL?
- PostgreSQL is maintained by antonorlov, which publishes 5 MCP servers (5 total versions) tracked on MCP Toplist.
- Is PostgreSQL listed on the Official MCP Registry?
- Yes — PostgreSQL is listed on the Official MCP Registry.
- How many versions does PostgreSQL have?
- MCP Toplist tracks 2 versions of PostgreSQL, most recently published on Sep 14, 2026.
- Where can I find the source code for PostgreSQL?
- The source code for PostgreSQL is hosted at github.com/antonorlov/mcp-postgres-server.
Do you run this server?
Community projects list the MCP servers behind real agents and apps. Publish yours and this page will link to it.