← All integrations
Databases

PostgreSQL AI Agent

Let an AI agent query your PostgreSQL database in plain English. Scheduled reports, anomaly alerts, and ad-hoc answers with Oido — read-only and self-hostable.

What you can automate with PostgreSQL + Oido

  • Answer 'how many signups yesterday?' from a Telegram message — no SQL, no dashboard.
  • Email a revenue summary every Monday by querying live and formatting the result.
  • Watch a metric on a schedule and alert a channel when it crosses a threshold.
  • Explore an unfamiliar schema — the agent reads table structure before it queries.

Oido connects to PostgreSQL through the Postgres MCP server, which exposes your schema and a read-only query tool. Your agent can answer data questions in natural language and, with Oido's scheduler, deliver recurring reports without anyone opening a BI tool.

How it works

The Postgres MCP server inspects your database schema and runs read-only SQL on the agent's behalf — a safe default that prevents writes. Oido passes the connection string at install time. Combined with a channel, anyone on your team can ask a data question in plain English and get an answer grounded in live data.

Point it at a read replica for production safety. Because the agent sees the real schema, its queries are grounded in your actual tables, not guesses.

Setup

Install the PostgreSQL MCP server as an Oido extension:

oido extensions install @modelcontextprotocol/server-postgres

Or add it directly to ~/.config/oido/mcp-servers.json:

{
  "servers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://USER:PASS@HOST:5432/DB"
      ],
      "env": {},
      "transport": "stdio"
    }
  }
}

Confirm the exact source and env vars against the PostgreSQL MCP server — package names occasionally change.

Related integrations
GitHubGoogle Drive
Run PostgreSQL agents with Oido →← All integrations