LabscoMCP early access ↗
1Levick3MCP SERVER

PostgreSQL Database Query Server

Run SQL against a PostgreSQL database from Cursor, with parameterised queries and a connection pool behind it.

by 1Levick3 ↗Relational SQL DatabasesCommunity

LABSCO SUMMARY

Give it a read-only role and the rest takes care of itself.

Direct query execution is the most useful thing you can hand an assistant that is writing code against a schema, and also the sharpest — this server does not restrict statements, so the database role you connect with is the boundary. Parameterised queries and connection pooling are the right foundations; the certificate path is there for managed databases that will not take an unencrypted connection.

What it is

An MCP server that executes SQL queries against a PostgreSQL database. It takes a connection string, keeps a pool open, and runs the queries a model composes — built with the Cursor agent chat in mind, so the database becomes context the assistant can consult while writing code.

What you get

  • Custom SQL executed against the connected database
  • Parameterised queries, so values are bound rather than concatenated into the statement
  • Configurable timeouts on query execution
  • Connection pooling with connection timeouts and connection-string validation
  • TLS supported through POSTGRES_SSL_CERT_PATH, for databases that require a certificate

Requirements

Node.js 18.0.0 or higher, a reachable PostgreSQL server, and network access to it. Install through the Smithery CLI in one command, or clone the repository and run npm install then npm run build and point the client at the built entry point. The connection string goes in POSTGRES_CONNECTION_STRING; the package is postgresql-mcp-server, version 0.2.0.

Setup effort

One command plus credentials — npx -y @smithery/cli install @1Levick3/postgresql-mcp-server --client claude, then supply credentials