Best for
- Analysts and developers exploring PostgreSQL data through natural language
- Teams exposing schema and query access through a dedicated read-only account
The read-only interface reduces destructive risk, but database credentials, sensitive query results, and query load still need controls; no live database handshake is recorded yet.
Strongest · Security and permissions 16/20 Weakest · Maintenance 10/20
Reviewed by an editorListed 2026-07-13
Read the FMRS scoring method →Runtime:Node.js
Pass a PostgreSQL connection string as a startup argument. Use a dedicated read-only database account.
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://readonly:pwd@localhost/db"
]
}
}
}
Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://readonly:pwd@localhost/db"
]
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://readonly:pwd@localhost/db
Run it in a terminal; replace any <…> placeholders with your own values first.
The client's tool list should show query, list_schemas, list_tables, and describe_table; calling list_tables and getting back table names from the connected database confirms the install works.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
This server connects to PostgreSQL in read-only mode and exposes schema information alongside query access. It helps models write and explain SQL without modifying production data, making it useful for analysis and troubleshooting.
Connect ClickHouse to your AI assistants
Unofficial MCP server providing advanced access to the ChEMBL chemical database
Google's official database MCP toolbox — define AI-accessible database tools via config
Bytebase's official, minimalist two-tool database MCP server
Source revision 9be4674d1ddf Data synced 2026-10-14 Read the FMRS scoring method