
Read Only Local Postgres Mcp Server
This server connects Claude to PostgreSQL databases with read-only access, exposing a connect tool that accepts standard Postgres connection strings and a query tool limited to SELECT statements. You get JSON-formatted results and can switch between databases at runtime without restarting Claude. The security model is straightforward: query validation blocks anything that isn't a SELECT, so you can safely point it at production databases for analysis work. Useful when you want to explore schemas, run analytics queries, or debug data issues through natural language without writing SQL directly. Works via npx for quick setup or manual installation if you need more control over the Node runtime.
- GitHub stars
- 2
- tools
- 3
- transport
- STDIO
- last updated
- Jan 29, 2026
Tools
3 toolsPublic tool metadata for what this MCP can expose to an agent.
connectConnect to a PostgreSQL database using a connection string. The connection persists for subsequent queries until changed or disconnected.
Connect to a PostgreSQL database using a connection string. The connection persists for subsequent queries until changed or disconnected.
No parameter schema in public metadata yet.
disconnectDisconnect from the current runtime database and revert to the default environment-configured connection.
Disconnect from the current runtime database and revert to the default environment-configured connection.
No parameter schema in public metadata yet.
queryRun a read-only SQL query against the currently connected database. Optionally override the connection for a single query.
Run a read-only SQL query against the currently connected database. Optionally override the connection for a single query.
No parameter schema in public metadata yet.
Sponsors
Readme
PostgreSQL MCP Server
A Model Context Protocol (MCP) server that enables Claude Desktop to interact with PostgreSQL databases through natural language queries.
Features
- Execute read-only SQL queries through Claude Desktop or Claude Code
- Dynamic database connections - connect to any PostgreSQL database at runtime
- Built-in security: statement validation plus database-enforced
READ ONLYtransactions - Easy integration with Claude Desktop and Claude Code
- JSON formatted query results
- Environment-based default configuration with runtime override support
Quick Start
For Claude Code Users (Recommended - Easiest Method)
claude mcp add postgres -s user -- npx -y @hovecapital/read-only-postgres-mcp-server
Then set your database environment variables:
Details
- Repository
- github.com/hovecapital/read-only-local-postgres-mcp-server
- Website
- hove.capital
- Category
- Databases
- Package
@hovecapital/read-only-postgres-mcp-server- Transport
- STDIO
- Registry
- MCP registry, active