hovecapital avatar

Read Only Local Postgres Mcp Server

hovecapital/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 tools

Public 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

MCP Registry npm version

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 ONLY transactions
  • 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:


View the full README on GitHub

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

More from hovecapital

Related Databases MCP servers

View all
1cocaxcode avatarDatabase Mcpcocaxcode/database-mcpMCP server for database connectivity. Multi-DB (PostgreSQL, MySQL, SQLite), 19 tools.1stars
2infoinlet-marketplace avatarMcp Mysqlinfoinlet-marketplace/marketplaceRead-only MySQL/MariaDB for AI agents — query, list/describe tables, health. SQL-guarded.0stars
3yash-0620 avatarPostgres Secured (Aegis Zero-Trust)yash-0620/postgres-mcpEnterprise PostgreSQL MCP secured by Aegis Zero-Trust to block unauthorized SQL injections.0stars
4neverinfamous avatarPostgreSQL MCP Serverneverinfamous/postgresql-mcpPostgreSQL MCP server with 203 tools, connection pooling, HTTP/SSE, OAuth 2.1, and tool filtering8stars
5timescale avatarPg Aiguidetimescale/pg-aiguideComprehensive PostgreSQL documentation and best practices, including ecosystem tools1.9Kstars
6neondatabase avatarNeonneondatabase/mcp-server-neonOfficial Neon MCP server for managing Neon projects and Lakebase Postgres databases.663stars