Skip to content

Databases & warehouses

Postgres MCP server for business questions on your application database

PostgreSQL is the open-source relational database behind a large share of business applications, and the database under Amazon RDS for PostgreSQL, Aurora PostgreSQL, Azure Database for PostgreSQL, Cloud SQL and many reporting replicas. Orders, subscriptions, users and events often live there first.

PostgreSQL

Available now: Nexatron answers PostgreSQL questions with user-level access that inherits your existing PostgreSQL permissions.

Updated

Can Claude, ChatGPT or Copilot access PostgreSQL data?

Yes. To connect Claude, ChatGPT or Copilot to PostgreSQL, add Nexatron from Claude’s connector directory, or by its MCP server URL in ChatGPT and Copilot. Then connect it in Nexatron. Users sign in with their own PostgreSQL account (or your SSO), and Nexatron inherits their existing permissions.

What Postgres data a question reads

Schemas, tables and views
Application tables and the reporting views your team defines, including materialized views.
Foreign keys
Declared relationships, which setup reads so questions join tables the way the application does.
Row-level security policies
CREATE POLICY rules that PostgreSQL applies to each role’s queries.
JSONB columns
Semi-structured attributes stored next to relational data, such as settings or event payloads.
information_schema and pg_catalog
The system catalog, read at setup to learn columns, types and comments.

Postgres questions people ask

  • How many new subscriptions started each week this quarter, by plan?
  • Which accounts have had no logins in the last 30 days but are still paying?
  • What is average order value by country for the last 90 days?
  • Which invoices are unpaid more than 45 days after their due date?
  • How many support tickets did each product area receive last month?

Who asks Postgres questions

Product and operations teams
Usage, orders and customer questions on the application’s own data, without asking an engineer to write SQL.
Engineering leads
A read-only path to the reporting replica that keeps every user inside their database role.

How to set up Postgres in Nexatron

  1. An administrator adds the database

    A workspace administrator adds the PostgreSQL host once, over TLS, and chooses whether people authenticate by password or by AWS IAM for RDS and Aurora.

  2. The administrator sets who can ask and adds access rules

    The administrator chooses which people may ask, approves definitions, and can add Nexatron’s row filters and column masks on top of database grants.

  3. Users connect with their own role

    The first time a user asks, they connect with their own PostgreSQL role, so table grants and row-level security apply as they would in psql.

  4. People ask in their own words

    Questions come from the Nexatron app, Teams, Slack, or Claude, ChatGPT and Copilot through the MCP server.

Read the PostgreSQL setup guide

Postgres permissions model

AuthenticationThe user’s own PostgreSQL role, by password or AWS IAM authentication for RDS and Aurora.
What the administrator grantsThe database connection, who may ask, approved definitions, and any Nexatron row filters or column masks.
What each user seesTables their role is granted, with row-level security policies applied.
MaskingNexatron’s column masks can hide a column fully or show its last characters, and totals over a masked column are refused.
AuditEvery query is checked as a single read-only SELECT before it runs, and governed answers go to Nexatron’s hash-chained audit log.

Worked example: a governed Postgres answer

One question, and everything the answer shows so you can check it. The figures are invented sample data.

Which subscriptions renew in the next 30 days, and what revenue do they carry?

Approved definition: Upcoming renewals

Active, non-deleted subscriptions with a renewal date in the next 30 days, valued at their current annual contract value in USD.

Source

  • billing.subscriptions
  • billing.plans

Query (SQL (PostgreSQL))

SELECT p.name AS plan,
       COUNT(*) AS subscriptions,
       SUM(s.annual_value_cents) / 100.0 AS annual_value_usd
FROM billing.subscriptions s
JOIN billing.plans p ON p.id = s.plan_id
WHERE s.status = 'active'
  AND s.deleted_at IS NULL
  AND s.renews_at >= now()
  AND s.renews_at <  now() + interval '30 days'
GROUP BY p.name
ORDER BY annual_value_usd DESC;

Result

Sample data: renewals due in the next 30 days, invented figures
PlanSubscriptionsAnnual value
Enterprise9$486,000
Team52$187,200
Starter140$50,400

Postgres questions and what Nexatron returns

How many new subscriptions started each week this quarter, by plan?
A line chart by week with one series per plan, the definition of a new subscription, the SQL, and its trust level.
Which accounts have had no logins in 30 days but are still paying?
A table of accounts with last login and plan, linked to the rows, and the join used.
What is average order value by country for the last 90 days?
A table by country with the average-order-value definition and the SQL.
Which invoices are unpaid more than 45 days after their due date?
A table of invoices with customer, amount and days overdue.
How many support tickets did each product area receive last month?
A bar chart by product area, with the SQL and the tables read.
Which customers in the JSONB settings column have a feature flag turned on?
A table of customers and the SQL showing how the JSONB column was read.
What is monthly recurring revenue by plan from the subscriptions table?
A table by plan with the MRR definition stated, the SQL, and its trust level.

Common pitfalls when asking Postgres questions

Each one is settled once in an approved definition, so every person and every assistant gets the same answer.

  • Querying the primary

    Long analytical queries on the primary compete with application traffic. Point the connection at a read replica where you have one.

  • timestamp versus timestamptz

    A timestamp without time zone is read as whatever zone the session uses. The definition fixes the reporting time zone, so day and month boundaries are stable.

  • Soft-deleted rows

    Many applications keep deleted rows with a deleted_at or status flag. A definition that forgets the filter counts records the application no longer shows.

Ways to connect Postgres to Claude

The PostgreSQL project publishes no MCP server; the closest is the archived reference server from the Model Context Protocol project. How that server and Nexatron differ on user-level access, approved definitions and cross-system answers, using only what the vendor’s page states.

CriterionReference Postgres MCP server (archived)Nexatron
User-level accessConnects with the database connection string it is started with.Each user’s own PostgreSQL role, so grants and row-level security apply.
Approved definitionsNot stated in the repository.Approved definitions, named in each answer with its SQL.
Cross-system answersOne database.Yes, with other connected sources, each one listed in the answer.

Statements about other products come from their public pages as read on and may have changed since. Sources:

How Nexatron connects to PostgreSQL

API and sign-in
A direct PostgreSQL connection over TLS, with each user’s own database role authenticated by password or by AWS IAM authentication for RDS and Aurora.
User-level access
Questions run as the user’s own role, so table grants and row-level security policies apply as they would in psql. Every query is checked as a single read-only SELECT before it runs and is shown with the answer, and Nexatron’s access rules can narrow results further.
Read-only
Questions only read PostgreSQL; asking a question never changes PostgreSQL data.
Setup
An administrator enables PostgreSQL in Nexatron. Users link their own PostgreSQL account, or sign in through your SSO, the first time they ask. Queries run in PostgreSQL, with no warehouse to load.

PostgreSQL in Claude’s connector directory

Nexatron is listed in Claude’s MCP connector directory, so a Claude user can add it without a custom server URL. Its hosted MCP server answers PostgreSQL questions for Claude, ChatGPT and Microsoft Copilot with user-level access, and the same governed answer as the Nexatron app. It is Nexatron’s own server, not one published by the vendor.

  1. Connect PostgreSQL to your Nexatron workspace.
  2. In Claude, add Nexatron from Claude’s connector directory. In ChatGPT or Copilot, add a custom MCP connector with Nexatron’s server URL.
  3. Sign in with your own Nexatron identity (OAuth 2.1), then ask your PostgreSQL questions.

Server URL for a custom connector: https://api.nexatron.io/api/v1/mcp

Postgres questions and answers

What is a Postgres MCP server?
An MCP server that lets an AI assistant query PostgreSQL. Nexatron’s hosted server is listed in Claude’s connector directory and runs each question under the requesting user’s database role, with definitions and the SQL shown.
Should I point it at the primary database or a replica?
A read replica is usually the better choice for analytical questions, so ad hoc queries never compete with the application. Queries are read-only either way.
Does it work with Aurora, RDS and Cloud SQL?
Yes, with any PostgreSQL-compatible endpoint reachable over the network, including Amazon RDS and Aurora PostgreSQL, where IAM authentication is supported too.
Can Claude connect to a Postgres database?
Yes. Add Nexatron from Claude’s connector directory and connect your PostgreSQL database to your workspace. Users connect with their own database role, and Claude gets read-only answers with the SQL behind them.
Is the official Postgres MCP server still maintained?
The reference Postgres server from the Model Context Protocol project was archived on May 29, 2025. Nexatron is a maintained, hosted alternative that runs each question as the user’s own database role.
Can an AI assistant change data in Postgres through Nexatron?
No. Every query is checked as a single read-only SELECT before it runs, and anything else is refused. The answer shows the exact query so it can be reviewed.
Do Postgres row-level security policies apply to AI questions?
Yes. Questions run as the user’s own PostgreSQL role, so the same policies that limit them in psql limit their answers, and Nexatron’s row filters can narrow results further.
Is Postgres a good source for analytics questions?
For operational questions about current orders, customers or subscriptions, yes. Heavy historical analysis often sits better in a warehouse. Nexatron connects to both, and each definition says which source a metric reads.
How do I keep AI-written SQL on Postgres safe?
Questions are read-only, and each user’s database role is the outer limit: grant it SELECT on only the schemas you want answered, ideally on a read replica. Every answer shows its SQL so it can be reviewed.

Try Nexatron with your PostgreSQL

Tell us the PostgreSQL questions you want answered and who asks them, and we plan the demo around them. Do not include credentials or confidential records.

Book a demo for PostgreSQL

Tell us the PostgreSQL questions you want answered and who asks them, and we plan the demo around them. Do not include credentials or confidential records.

  • User-level access: Nexatron inherits your existing PostgreSQL permissions
  • Read-only: questions only read PostgreSQL
  • SOC 2 Type I
  • ISO 27001 Certified
  • GDPR Aligned

PostgreSQL is a trademark of its owner.