MCP server by tharaka911
Postgres Read MCP Server
A Model Context Protocol (MCP) server that provides read-only access to a PostgreSQL database. It allows AI assistants like Antigravity, Claude, or Cursor to safely query your database and inspect schemas.
Documentation
-
Local Development Guide
Instructions for setting up the project locally, installing dependencies, and running tests. -
IDE Configuration Guide
How to configure this MCP server with AI clients like:- Antigravity
- Claude Desktop
- Cursor
-
Contribution Guide
Guidelines for contributing to the project, reporting issues, and submitting pull requests.
Features
- Read-Only Access: Safely query your database without risk of modification.
- Schema Inspection: List tables and view table definitions.
- Secure: Uses environment variables for connection strings.
- Fast: Built on the Bun runtime.
Available Tools
list_tables: List all tables in the public schema.describe_table: Get schema details for a specific table.query: Execute a read-only SQL query (SELECTonly).
Troubleshooting
macOS: "App is damaged and can't be opened"
If you see this error when running the binary on macOS, it's due to Gatekeeper blocking unsigned binaries. Run the following command to allow execution:
xattr -d com.apple.quarantine postgres-read-macos-arm64