pg-mcp
Provides read-only access to PostgreSQL databases, allowing querying tables, listing tables, and describing table schemas via SQL.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
neurovia-labs-pg-mcp
A lightweight MCP server for read-only PostgreSQL access. Maintains a persistent connection pool and exposes query tools for use with Claude Code or any MCP client.
Tools
Tool | Description |
| Run a read-only SQL query (SELECT, WITH, EXPLAIN) |
| List all tables in a schema |
| Show columns and types for a table |
Related MCP server: PostgreSQL MCP Server
Usage
With npx (no install)
Add to your .mcp.json:
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["github:NeuroviaLabs/pg-mcp"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host:5432/dbname"
}
}
}
}Local
git clone git@github.com:NeuroviaLabs/pg-mcp.git
cd pg-mcp
npm installAdd to your .mcp.json:
{
"mcpServers": {
"db": {
"command": "node",
"args": ["db-server.js"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host:5432/dbname"
}
}
}
}The connection URL can also be passed as a CLI argument:
node db-server.js postgresql://user:pass@host:5432/dbnameFeatures
Persistent connection pool (max 5 connections)
Read-only enforcement (SELECT/WITH/EXPLAIN only + read-only transactions)
30s query timeout
SSL support
License
ISC
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Query your Postgres from ChatGPT or Claude without exposing the database or handing over credentials. Run npx boltschema connect next to your database and it dials out over HTTPS — no inbound firewall rule, no open port, works with localhost and VPC-private databases. Read-only is enforced by a SQL guard, a Postgres READ ONLY transaction, and a scoped role generated for you.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to PostgreSQL databases, enabling LLMs to inspect database schemas and execute read-only SQL queries.MIT
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to PostgreSQL databases, enabling users to list tables, view table structures and statistics, and execute SELECT queries safely through natural language.MIT
- AlicenseNot gradedqualityBmaintenanceEnables secure read-only access to PostgreSQL databases, allowing users to list tables, query schemas, execute SELECT statements, and inspect table structures through natural language interactions.650 npm4MIT
- AlicenseNot gradedqualityDmaintenanceRead-only access to PostgreSQL databases, enabling schema inspection and safe SQL queries.MIT