About Postgresai
Postgresai is an MCP server published by postgres-ai in the Healthcare category: postgresai – Postgres observability built for humans and AI agents. Conduid read 16 tools from its source: create_action_item, create_issue, deploy_monitoring, download_file, get_report_data, list_action_items and 10 more. No package is published for it, so it installs from a source checkout.
The repository has 142 stars and 10 forks, is licensed Apache-2.0, and its last commit was on 1 Dec 2026. The latest release is 0.15.0 (2 Jun 2026): Release 0.15.0 Release Date: 2026-06-02 AI-native PostgreSQL observability - monitoring, health checks, and root cause analysis for engineers and AI agents. It follows 0.14.0 (23 Jan 2026), and the 5 most recent releases go back to 0.11 (30 Oct 2025). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include cli, grafana, health-check, monitoring, observability and postgres.
Install
git clone https://github.com/postgres-ai/postgresaiTools (16)
create_action_itemCreate a new action item for an issue| Parameter | Type | Description |
|---|---|---|
| configs | array | Configuration parameter changes |
| debug | boolean | Enable verbose debug logs |
| description | string | Detailed description |
| issue_id * | string | Issue ID (UUID) |
| sql_action | string | SQL command to execute, e.g. 'DROP INDEX CONCURRENTLY idx_unused;' |
| title * | string | Action item title |
create_issueCreate a new issue in PostgresAI. Local files passed via 'attachments' are uploaded to PostgresAI storage and the resulting markdown links are appended to the issue description.| Parameter | Type | Description |
|---|---|---|
| attachments | array | Local file paths to upload and append as markdown links to the description (images render inline) |
| debug | boolean | Enable verbose debug logs |
| description | string | Issue description (supports \n as newline) |
| is_hidden | boolean | Create as a hidden, staff-internal issue (PostgresAI staff only; same as CLI --hidden) |
| labels | array | Labels to apply to the issue |
| org_id | number | Organization ID. Optional with a per-organization token (uses the config value); REQUIRED with a global token, which can reach every organization the user belongs to and will not assume one. Use orgs_list / `pgai orgs` to discover valid values. |
| project_id | number | Project ID to associate the issue with |
| title * | string | Issue title (required) |
deploy_monitoringPut a Postgres database under PostgresAI Cloud monitoring (same as `pgai mon deploy`): prepares the monitoring role (an admin URL creates it; otherwise returns the SQL), provisions the monitoring box, and returns JSON with status (ready | in_progress | deleting | deleted | inactive | action_required | failed: the same words as pgai dblab deploy), health_url (the project's Database health in the console), dashboard_url (Grafana, signing in with PostgresAI) and next (the exact next action). A billed box is provisioned only with yes: true: without it the result is action_required with the price (and requires_payment_method), so show the price to the user first. It does not wait for the box: call it again to see the status. Safe to call again. When PostgresAI can't reach the database the way an IP allowlist refuses (or with ip_first), the box's IP is reserved first and the result is action_required with step allow_ip (ip, cidr, host, port, reserved_until): give the user the cidr and port to allow on the database, then call again with ip_allowed: true. ClickHouse Managed Postgres, RDS and Supabase are detected from the host. An RDS instance that is not publicly accessible is monitored over AWS PrivateLink (no public IP, nothing opened): the user creates a CloudFormation stack in their AWS account from a link. Until the stack exists the result is action_required with step privatelink_stack and cfn_url: give the user the link to open in the RDS's AWS account (the stack keeps its name); once they say it is created, call again. When this machine's aws CLI can read the RDS (read-only; aws_profile picks the profile, no_aws: true skips it), the link is filled in and the stack is found by itself; otherwise pass vpce_service, the stack's VpceServiceName output. When the URL's user can't create the monitoring role, or this machine can't reach the database (a private RDS seen from outside its VPC), the result is action_required with step prepare_db, sql, nonce and monitoring_password: the user runs the SQL as the master user in that database, then call again with monitoring_password and nonce. host_stats: true adds host CPU, memory, disk and IOPS through a read-only role the stack creates (host_stats_role: its HostStatsRoleArn output, when not read from AWS). Aurora and RDS Proxy endpoints are not supported over PrivateLink. Supabase needs no password (PostgresAI prepares the database through the Supabase Management API): the first time, the result is action_required with a consent link in next; give it to the user to open and approve, then call again. Elsewhere the URL must carry its password, and only these query parameters: sslmode, channel_binding, application_name. PGAI_MON_PASSWORD, PGPASSWORD and CLICKHOUSE_KEY_ID + CLICKHOUSE_KEY_SECRET of the server process are not used (pass clickhouse_key), and a TLS failure is not retried in plaintext (say sslmode=disable for a server without TLS). For another database on a server PostgresAI already monitors for the org, an admin URL with sslmode=require (or verify-*), each query parameter once, is enough: PostgresAI fills in the password of postgres_ai_mon it keeps, over TLS only (on a server without TLS, pass the postgres_ai_mon URL; if nobody has its password, the user runs in a terminal: pgai mon instances delete the server's other databases, then pgai mon deploy <admin-url> --reset-password with PGAI_MON_PASSWORD set to a new one, then deploys them again with it).download_fileDownload a file from PostgresAI storage by URL (full URL under the storage base, or a relative path like /files/123/foo.png).| Parameter | Type | Description |
|---|---|---|
| debug | boolean | Enable verbose debug logs |
| output_path | string | Local destination path (default: derive filename from URL, save in CWD). When omitted, the path-traversal guard restricts the destination to CWD. |
| url * | string | Full URL (must be under the configured storage base) or relative storage path (e.g. /files/123/foo.png) |
get_report_dataGet checkup report file content: the JSON data of each check, in a 'data' field. Either report_id or check_id must be provided. For findings and recommendations, use the issues tools (list_issues, view_issue).| Parameter | Type | Description |
|---|---|---|
| check_id | string | Filter by check ID (e.g., 'H002', 'F004') |
| debug | boolean | Enable verbose debug logs |
| report_id | number | Checkup report ID (optional if check_id is provided) |
| type | string | File type: 'json' (default), or 'md' for markdown that the legacy postgres-checkup tool uploaded |
list_action_itemsList action items for an issue| Parameter | Type | Description |
|---|---|---|
| debug | boolean | Enable verbose debug logs |
| issue_id * | string | Issue ID (UUID) |
list_issuesList issues from PostgresAI API (same as CLI 'issues list')| Parameter | Type | Description |
|---|---|---|
| debug | boolean | Enable verbose debug logs |
| hidden_only | boolean | List only hidden issues (PostgresAI staff; same as CLI --hidden-only) |
| limit | number | Max number of issues to return (default: ${DEFAULT_ISSUES_LIMIT}; the API returns at most ${MAX_ISSUES_PER_REQUEST}). A second text block says which rows of how many were returned and how to get the rest. |
| offset | number | Number of issues to skip (default: 0) |
| org_id | number | Organization ID. Optional with a per-organization token (falls back to config); REQUIRED with a global token, which can reach every organization the user belongs to and will not assume one. Use orgs_list / `pgai orgs` to discover valid values. |
| status | string | Filter by status: 'open', 'closed', or omit for all (note: the CLI defaults to open). Rows carry status as 'open'/'closed'. |
list_report_filesList files in a checkup report (metadata only, no content). Checkup reports are JSON, one file per check. Either report_id or check_id must be provided. For findings and recommendations, use the issues tools (list_issues, view_issue).| Parameter | Type | Description |
|---|---|---|
| check_id | string | Filter by check ID (e.g., 'H002', 'F004') |
| debug | boolean | Enable verbose debug logs |
| report_id | number | Checkup report ID (optional if check_id is provided) |
| type | string | File type: 'json' (default), or 'md' for markdown that the legacy postgres-checkup tool uploaded |
list_reportsList checkup reports. Returns report metadata: id, project, status, timestamps. Use get_report_data to fetch actual report content. Supports date-based filtering with before_date.| Parameter | Type | Description |
|---|---|---|
| all | boolean | Fetch all reports (paginated automatically) |
| before_date | string | Show reports created before this date (YYYY-MM-DD, DD.MM.YYYY, YYYY-MM-DD HH:mm, etc.) |
| debug | boolean | Enable verbose debug logs |
| limit | number | Max number of reports to return (default: 20) |
| project_id | number | Filter by project ID |
| status | string | Filter by status (e.g., 'completed') |
post_issue_commentPost a new comment to an issue (optionally as a reply). Local files passed via 'attachments' are uploaded to PostgresAI storage and the resulting markdown links are appended to the comment body (image extensions render inline).| Parameter | Type | Description |
|---|---|---|
| attachments | array | Local file paths to upload and append as markdown links (images render inline). Either 'content' or 'attachments' must be non-empty. |
| content | string | Comment text (supports \n as newline) |
| debug | boolean | Enable verbose debug logs |
| issue_id * | string | Issue ID (UUID) |
| parent_comment_id | string | Parent comment ID (UUID) for replies |
update_action_itemUpdate an action item: mark as done/not done, approve/reject, or edit title/description| Parameter | Type | Description |
|---|---|---|
| action_item_id * | string | Action item ID (UUID) |
| debug | boolean | Enable verbose debug logs |
| description | string | New description |
| is_done | boolean | Mark as done (true) or not done (false) |
| status | string | Approval status: 'waiting_for_approval', 'approved', or 'rejected' |
| status_reason | string | Reason for approval/rejection |
| title | string | New title |
update_issueUpdate an existing issue (title, description, status, labels, is_hidden). Use status=1 to close, status=0 to reopen. Local files passed via 'attachments' are uploaded and appended to 'description'; if 'description' is omitted, the existing description is fetched first and appended to.| Parameter | Type | Description |
|---|---|---|
| attachments | array | Local file paths to upload and append as markdown links (images render inline). When provided without 'description', the existing description is fetched and appended to. |
| debug | boolean | Enable verbose debug logs |
| description | string | New description (supports \n as newline) |
| is_hidden | boolean | true hides the issue, false unhides it (PostgresAI staff only; same as CLI --hidden / --no-hidden). Omit (or pass null) to leave unchanged. |
| issue_id * | string | Issue ID (UUID) |
| labels | array | Labels to set on the issue |
| notify | boolean | With is_hidden=false: send the new-issue email and Slack post (same as CLI --notify). Sent only the first time the issue becomes visible; the result says whether it was requested. |
| status | number | Status: 0=open, 1=closed |
| title | string | New title (supports \n as newline) |
update_issue_commentUpdate an existing issue comment. Local files passed via 'attachments' are uploaded and appended to 'content' as markdown links.| Parameter | Type | Description |
|---|---|---|
| attachments | array | Local file paths to upload and append as markdown links (images render inline) |
| comment_id * | string | Comment ID (UUID) |
| content | string | New comment text (supports \n as newline). Either 'content' or 'attachments' must be non-empty. |
| debug | boolean | Enable verbose debug logs |
upload_fileUpload a local file to PostgresAI storage. Returns the storage URL and a ready-to-paste markdown link (image extensions get the inline `` form, others get `[](url)`). For posting attachments alongside an issue or comment, prefer the 'attachments' parameter on the issue/comment tools — this tool is for ad-hoc uploads or when you need the URL out of band.| Parameter | Type | Description |
|---|---|---|
| debug | boolean | Enable verbose debug logs |
| path * | string | Local file path to upload (absolute or relative to CWD) |
view_action_itemView action item(s) with all details. Supports single ID or multiple IDs.| Parameter | Type | Description |
|---|---|---|
| action_item_id | string | Single action item ID (UUID) |
| action_item_ids | array | Multiple action item IDs (UUIDs) |
| debug | boolean | Enable verbose debug logs |
view_issueView a specific issue with its comments and who has seen it (seen_by). Viewing records the token owner in the issue's seen-by list as an AI agent.| Parameter | Type | Description |
|---|---|---|
| debug | boolean | Enable verbose debug logs |
| issue_id * | string | Issue ID (UUID) |
Security checks
- ✓README presentThe repository's README runs to about 3.2K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- !No dynamic code executionScanned 89 source files and found 4 calls to eval or shell execution, in cli/bin/postgres-ai.ts, cli/lib/connect.ts and cli/lib/privatelink.ts among others. Review how tool inputs reach them before granting credentials.
1 check has not been run yet.
Releases
README
The repository's README runs to about 3.2K words, fetched 13 days ago. The original in the repository is authoritative.
Read full README