pg-mcp
Provides read-only access to PostgreSQL databases, allowing querying tables, listing tables, and describing table schemas via SQL.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pg-mcpList all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides read-only access to PostgreSQL databases, enabling LLMs to inspect database schemas and execute read-only SQL queries.Last updated120,645MIT
- Alicense-qualityDmaintenanceProvides read-only access to PostgreSQL databases, enabling users to list tables, view table structures and statistics, and execute SELECT queries safely through natural language.Last updated199MIT
- Alicense-qualityAmaintenanceEnables 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.Last updated4834MIT
- Alicense-qualityDmaintenanceRead-only access to PostgreSQL databases, enabling schema inspection and safe SQL queries.Last updated15MIT
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Comprehensive PostgreSQL documentation and best practices, including ecosystem tools
Explore your Messages SQLite database to browse tables and inspect schemas with ease. Run flexible…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NeuroviaLabs/pg-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server