Run read-only SQL
The query tool executes SQL inside a READ ONLY transaction.
Documentation ↗MCP server / databases / source-linked
This reference server is intentionally narrow: expose a PostgreSQL database to an agent for schema discovery and read-only analysis. That boundary is useful for audits and reporting, but it is not a write-capable database operator and is not a current maintained package.
Identify the implementation and the job it supports.
This reference server is intentionally narrow: expose a PostgreSQL database to an agent for schema discovery and read-only analysis. That boundary is useful for audits and reporting, but it is not a write-capable database operator and is not a current maintained package.
The documented interface, authentication and installation path.
Use a read-only database user and configure `@modelcontextprotocol/server-postgres` with a PostgreSQL URL. The archived README's NPX example is `npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb`.
Setup reference ↗Documented setup example. Review the source and credentials before running; this command was not executed for this article.
{"mcpServers":{"postgres":{"command":"npx","args":["-y","@modelcontextprotocol/server-postgres","postgresql://localhost/mydb"]}}}Concrete capabilities with maintainer sources.
The query tool executes SQL inside a READ ONLY transaction.
Documentation ↗Resources expose discovered table names, columns and data types as JSON schema information.
Documentation ↗The reference documents NPX and Docker configurations for common desktop clients.
Documentation ↗What was checked and what was not tested.
Public maintainer documentation and repositories. This is not a hands-on product review.
Setup examples are documented examples. Suggested trials and comparison advice are editorial guidance.
Sources support the adjacent factual statements. A source review does not establish uptime, performance, security or current account eligibility. Read the editorial policy.
Concrete reports from public community discussions, kept separate from product documentation.
The user prefers a read-only database connection and reports a concrete debugging win, while implicitly avoiding write access.
“Read-only database access for debugging and analytics is perfect; it found a signup drop in two minutes.”Open community source ↗
Community evidence is anecdotal and may reflect one setup, version or account. It is included for discovery and risk-sensing, not as a representative rating or independent benchmark. Verify the current official documentation before acting on a report.
A bounded evaluation you can reproduce in your own environment.
Suggested evaluation, not an observed test result.
What to inspect: A reproducible analysis trail without database mutation. No database connection or query was executed here.
Workflow reference ↗Read these constraints before granting access.
The query transaction is read-only; inserts, updates and DDL are outside the documented capability.
Boundary reference ↗The reference server is archived, so pin versions and review maintenance before using it in a production workflow.
Boundary reference ↗Make the expected output explicit before you connect.
A reproducible analysis trail without database mutation. No database connection or query was executed here.
Keep the task inputs, tool calls, output and any errors together when you evaluate. The trial above is a proposal, not a recorded result.
Specific reasons to choose another route, with the tradeoff shown.
| Alternative | Choose it when | Tradeoff |
|---|---|---|
| SQLite MCP | Editorial choice: the data is a local SQLite file. | Also archived and includes write tools, so isolate the file. Documentation ↗ |
| MongoDB MCP | Editorial choice: the source is MongoDB or Atlas. | MongoDB's current server adds managed and write-capable paths. Documentation ↗ |
Answers specific to this implementation.
No. The documented query tool runs inside a read-only transaction.
Documentation ↗
Use a least-privileged role and a controlled network path; this reference does not provide a production governance layer.
Documentation ↗
Maintainer documentation used in this record.