PostgreSQL MCP Server
PostgreSQL database schemas and read-only query execution for AI assistants.
Data last scanned today · Reviewed yesterday
Overview
This server provides LLMs with the ability to inspect database schemas and execute read-only queries against PostgreSQL instances. It maps table metadata into accessible resources and enables users to interface with database contents directly through natural language prompts. Deployment options include running the server via Docker or using NPX for direct execution. Configuration requires a valid connection string, which the server uses to authenticate with your target database.
Our verdict
With a security score of 0/100, this tool carries a high risk level and is not recommended for new projects. The repository is officially archived, meaning no further updates or vulnerability patches will be released. Additionally, the tool lacks any authentication method, allowing anyone with access to your configuration to interact with the database.
- Supports read-only SQL transaction execution.
- Provides automatic schema discovery from database metadata.
- Includes minimal supply-chain surface with only two direct dependencies.
- Repository is officially archived and unmaintained.
- No built-in authentication for local configuration access.
- Last commit occurred over 400 days ago.
Setup
{
"mcpServers": {
"postgres": {
"args": [
"-y",
"@modelcontextprotocol/server-postgres"
],
"command": "npx"
}
}
}Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.
- No read-only mode — running this grants full read/write access.
- No built-in authentication — anyone with access to this config can invoke every tool it exposes.
Tools
| Tool | Description | Risk |
|---|---|---|
| query | Execute read-only SQL queries against the connected database | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf | ||||
| ChatGPT |
Alternatives
Badge
Maintain this server? Add the live badge to your README.