pg-checkup
Workspace
HomeReports
Automate
GitHub & CIAI assistants (MCP)
Learn
Help
File a ticketRequest a featurePricing
PrivacyTerms
Docs/AI assistants (MCP)
Sign inNew checkupC

Use it from your AI assistant

Your assistant can run a pg-checkup checkup and tell you what to fix first. It works with Claude Code, Cursor, VS Code and other tools that support MCP.

Set it up

You need Node 20 or newer. In Claude Code:

claude mcp add pg-checkup \
  -e DATABASE_URL=postgres://user:password@host/db \
  -- npx -y pg-checkup-mcp

In Cursor, add this to .cursor/mcp.json:

{
  "mcpServers": {
    "pg-checkup": {
      "command": "npx",
      "args": ["-y", "pg-checkup-mcp"],
      "env": { "DATABASE_URL": "postgres://user:password@host/db" }
    }
  }
}

VS Code uses .vscode/mcp.json, with servers instead of mcpServers and "type": "stdio" added.

Use a statistics-only login, not your admin login. pg-checkup role prints the SQL that creates one. Keep the config file out of git, because it holds the connection string.

Other tools

Any tool that can start a local MCP server works. Give it the command npx, the arguments -y pg-checkup-mcp, and DATABASE_URL as an environment variable. Each tool's own setup page:

  • Claude Code
  • Cursor
  • VS Code with GitHub Copilot
  • Windsurf
  • Zed
  • Cline
  • Codex
  • Gemini CLI
  • JetBrains AI Assistant
  • Continue

Use it

Ask your assistant:

Run a pg-checkup checkup and tell me what to fix first.

Then follow up on any finding: "Explain the first one", "Give me a brief to investigate it", or "Compare this with my last checkup."

What it can do

  • Run a checkup and list what to fix, most urgent first.
  • Explain one finding, with the evidence and the SQL.
  • Write a brief for investigating a finding.
  • Compare two checkups: what was fixed, what is new, what changed.
  • Print the SQL for a statistics-only login, and a GitHub workflow that runs checkups on a schedule.

What it will not do

  • It never asks for your password. The connection comes from your settings, not from the chat.
  • It only reads. It shows you SQL to review and never runs it.
  • It cannot tell you the app got faster. It sees the database, not your app.
PreviousGitHub & CINextStart here