
Mcp Postgres Nl Query
Let Claude Code or Cursor explore your Postgres schema and run guarded read-only queries—including natural language to SQL—without handing the agent unrestricted write access.
Overview
mcp-postgres-nl-query is a Build-phase MCP server that exposes tenant-aware, read-only PostgreSQL schema and SQL—including NL→SQL—with safety rails for AI agents.
What is this MCP server?
- RLS- and tenant-aware context so agents respect row-level security boundaries
- Schema introspection for tables, columns, and relationships
- Read-only SQL execution with safety rails against destructive statements
- Natural language to SQL translation on top of the guarded query path
- npm stdio package @infoinlet/mcp-postgres-nl-query v0.1.1
- Server version 0.1.1 on npm as @infoinlet/mcp-postgres-nl-query
- stdio transport per MCP server schema 2025-12-11
- Capability surface: schema, read-only SQL, NL→SQL with safety rails
What problem does it solve?
You need your agent to query real Postgres data and schema, but raw SQL access feels too risky for RLS, tenants, and accidental mutations.
Who is it for?
Solo builders shipping Postgres-backed SaaS who want NL and SQL exploration in the agent with read-only and RLS-aware constraints.
Skip if: Teams that need migrations, bulk writes, or ETL orchestration entirely inside the agent without a separate admin path.
What do I get? / Deliverables
After registering the server, your agent can inspect schema and run vetted read-only queries from natural language without write-capable database tools.
- Agent-callable schema introspection and read-only SQL tools
- NL→SQL flows bounded by the server’s safety rails
- Reduced need to paste query results manually into the chat
Recommended MCP Servers
Journey fit
Solo builders wire production data into coding agents during integration work, before they can safely debug or ship features that depend on real rows. MCP registration and database tooling belong on the integrations shelf: it connects your agent to Postgres as an external system, not to frontend or PM docs.
How it compares
MCP read-only Postgres bridge with NL→SQL, not a full database admin GUI or ORM skill.
Common Questions / FAQ
Who is mcp-postgres-nl-query for?
Solo and indie developers using Claude Code, Cursor, or Codex who store app data in PostgreSQL and want safe, agent-driven schema and query access.
When should I use mcp-postgres-nl-query?
Use it during build and integration when you are debugging features, validating analytics questions, or exploring schema with an agent that must stay read-only and tenant-aware.
How do I add mcp-postgres-nl-query to my agent?
Install @infoinlet/mcp-postgres-nl-query from npm, configure stdio MCP in your agent, and supply a Postgres connection with credentials scoped to read-only and RLS policies you trust.