Why does @modelcontextprotocol/server-postgres hang when connecting to AWS RDS?
I'm using @modelcontextprotocol/server-postgres with Node.js v21.1.0 and npm 10.2.0 to connect to an AWS RDS PostgreSQL instance using postgresql://user:password@your-rds-endpoint:5432/dbname. The MCP server hangs indefinitely with no output or error, even though a direct psql connection to the same RDS instance works. Enabling DEBUG=mcp:* produces nothing, and running in Docker gives similar behavior. Is there a known cause or workaround?
Originally asked on GitHub: https://github.com/modelcontextprotocol/servers/issues/1285
6 answers
Status: never fixed. The issue was closed as not planned; a maintainer replied on 2025-05-29 that @modelcontextprotocol/server-postgres had been moved to the archived repository at https://github.com/modelcontextprotocol/servers-archived (opens external site) and was no longer actively maintained.
No root cause was identified in the thread. The reporter confirmed that a direct psql connection to the same RDS instance worked, while the MCP server hung silently. Enabling DEBUG=mcp:* produced no output, running the server in Docker produced the same hang, and a downgrade attempt found no matching version.
The maintainer's comment recommends checking the alternatives listed in the modelcontextprotocol/servers Readme under official integrations. One commenter suggested the bytebase/dbhub server for RDS Postgres connections; the thread does not confirm whether that worked.
General advice: since this package is archived, further debugging is likely wasted effort; try an actively maintained Postgres MCP server instead.
General advice: the sample connection string embeds a plaintext password, so keep MCP configs out of version control or use a secret manager.
Did this work for you?What @prkhrv-sourcy tried on GitHub (Outcome unclear)
A commenter suggested using the bytebase/dbhub MCP server as an alternative for connecting to RDS Postgres.
Did this work for you?What a GitHub user tried on GitHub (Worked)
Tested a direct psql connection to the RDS PostgreSQL instance; the connection worked fine, so the database itself was reachable.
Source: https://github.com/modelcontextprotocol/servers/issues/1285 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran the server with DEBUG=mcp:* enabled, but no debugging output or error messages were produced.
Source: https://github.com/modelcontextprotocol/servers/issues/1285 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Attempted to downgrade @modelcontextprotocol/server-postgres to another version, but no matching version was found.
Source: https://github.com/modelcontextprotocol/servers/issues/1285 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran the server in Docker with a similar setup, which produced the same hang without output.
Source: https://github.com/modelcontextprotocol/servers/issues/1285 (opens external site)
Did this work for you?
Related questions
- mcp-server-fetch: 'AnyUrl' object has no attribute 'decode' error
- Does the official MCP Postgres example validate SQL before executing it?
- How to fix UTF-8 Japanese text corruption/crash in mcp-server-sqlite with Claude Desktop on Windows?
- MCP Knowledge Graph Memory Server fails with ${workspaceFolder} in MEMORY_FILE_PATH
- npx @modelcontextprotocol/server-filesystem: ERR_MODULE_NOT_FOUND for zod-to-json-schema