Skip to content
MCP server
Registry

mcp-postgres-nl-query MCP Server

RLS/tenant-aware Postgres for AI agents — schema, read-only SQL, NL→SQL with safety rails.

mcp-postgres-nl-query scores 45 (Fair), with no SPDX license recorded. It installs as a local process. It does not declare tools yet. Filed under Databases. Package registries report about 44 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

Trust score
45Fair
Trust score 45 of 100, Fair

Fair trust

45 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • No license recorded.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 45 comes from

22 + 10 + 0 + 0 + 10 + 3 = 45. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance10 / 20

How recently the repository saw a commit or release.

Maintenance: 10 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License0 / 10

A clear, OSI-style open-source license.

License: 0 of 10 points.
Security10 / 10

Not archived, a secure install path, a pinned version.

Security: 10 of 10 points.
Docs3 / 10

A real summary, a README with depth, listed tools.

Docs: 3 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "infoinlet-marketplace-postgres-nl-query": {      "command": "npx",      "args": [        "-y",        "@infoinlet/mcp-postgres-nl-query@0.1.1"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

postgres-nl-query

RLS/tenant-aware Postgres access for AI agents, as an MCP server. Five tools: list_tables, describe_table, query_sql, query_nl (NL→SQL via OpenRouter), explain_query.

Design doc: ../../docs/06-POSTGRES-NL-QUERY-MCP.md.

Safety model (defense in depth)

  1. Connect with a least-privilege role. RLS policies on your DB apply to it automatically — that's the real guard.
  2. Read-only by default (PG_WRITE_ALLOWED=false): query_sql rejects anything that isn't a single SELECT/WITH/EXPLAIN (static guard in sql-guard.ts), and runs it inside a BEGIN READ ONLY transaction.
  3. Row cap + timeout: every read is wrapped in an outer LIMIT (PG_MAX_ROWS) and a statement_timeout (PG_STATEMENT_TIMEOUT_MS).
  4. Tenant guard: set PG_TENANT_COLUMN/PG_TENANT_VALUE and NL→SQL is instructed to filter every tenant-scoped table (RLS still backs it).
  5. Human-in-the-loop: PG_NL_REQUIRE_APPROVAL=true makes query_nl return the generated SQL without executing — the agent (or a human) then runs it via query_sql.

Run

cp .env.example .env   # set PG_URL (+ OPENROUTER_API_KEY for query_nl)
npm install
npm run build
node dist/server.js    # stdio MCP server

MCP client config (e.g. Claude Desktop / Code):

{
  "mcpServers": {
    "postgres-nl-query": {
      "command": "node",
      "args": ["/opt/postgres-nl-query/dist/server.js"],
      "env": { "PG_URL": "postgres://agent_readonly:...@host:5432/appdb", "OPENROUTER_API_KEY": "sk-or-..." }
    }
  }
}

Why it's differentiated

Generic Postgres MCP servers exist; this one is multi-tenant aware (per-tenant filtering), read-only-by-default with a real static guard + READ ONLY tx, and supports an approval gate for NL→SQL — the things enterprises need before letting an agent near production data.

Frequently asked questions

What is mcp-postgres-nl-query MCP Server?

RLS/tenant-aware Postgres for AI agents — schema, read-only SQL, NL→SQL with safety rails.

How do I install mcp-postgres-nl-query MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. mcp-postgres-nl-query MCP Server runs locally from the npm package @infoinlet/mcp-postgres-nl-query with the command npx -y @infoinlet/mcp-postgres-nl-query@0.1.1.

Does mcp-postgres-nl-query MCP Server support remote (HTTP) connections?

No remote endpoint is listed for mcp-postgres-nl-query MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is mcp-postgres-nl-query MCP Server's trust score calculated?

mcp-postgres-nl-query MCP Server scores 45 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server