Scout your PostgreSQL databases with AI - safety features, monitoring, and data quality
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Scout your PostgreSQL databases with AI - A production-ready Model Context Protocol server with built-in safety features, monitoring, and data quality tools.
You ask:
"How healthy is my production database? Any urgent issues?"
Postgres Scout returns:
Component Breakdown
| Component | Score | Status |
|---|---|---|
| Cache Performance | 94/100 | Healthy |
| Index Efficiency | 82/100 | Good |
| Table Bloat | 61/100 | Needs Attention |
| Connection Usage | 75/100 | Fair |
Issues Found
orders has 34% bloat (2.1 GB wasted). VACUUM FULL recommended.sessions consuming 890 MB.analytics_events is 71% (target: >90%).Recommendations
VACUUM FULL orders during maintenance windowidx_sessions_legacy, idx_sessions_old_token, idx_sessions_tempanalytics_events to shared_buffers or partitioning by dateThat's getHealthScore β one of 38 tools covering exploration, diagnostics, optimization, monitoring, data quality, and safe writes.
Then ask: "Show me the largest tables and whether they have any bloat issues."
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Add to your MCP settings:
The server runs in read-only mode by default. For write operations, run a separate instance:
listDatabases β databases the user has access togetDatabaseStats β size, cache hit ratio, connection infolistSchemas β all schemas in the current databaselistTables β tables with size and row statisticsdescribeTable β columns, constraints, indexes, and moreexecuteQuery β run SELECT queries (or writes in read-write mode)explainQuery β EXPLAIN plans for performance analysisoptimizeQuery β optimization recommendations for a specific querygetHealthScore β overall health score with component breakdowndetectAnomalies β anomalies in performance, connections, and dataanalyzeTableBloat β bloat analysis for VACUUM planninggetSlowQueries β slow query analysis (requires pg_stat_statements)suggestVacuum β VACUUM recommendations based on dead tuples and bloatsuggestIndexes β missing index recommendations from query patternssuggestPartitioning β partitioning strategies for large tablesgetIndexUsage β identify unused or underused indexesgetCurrentActivity β active queries and connectionsanalyzeLocks β lock contention and blocking queriesgetLiveMetrics β real-time metrics over a time windowgetHottestTables β tables with highest activitygetTableMetrics β comprehensive per-table I/O and scan statsfindDuplicates β duplicate rows by column combinationfindMissingValues β NULL analysis across columnsfindOrphans β orphaned records with invalid foreign keyscheckConstraintViolations β test constraints before adding themanalyzeTypeConsistency β type inconsistencies in text columnsexploreRelationships β multi-hop foreign key traversalanalyzeForeignKeys β foreign key health and performancefindRecent β rows within a time windowanalyzeTimeSeries β window functions and anomaly detectiondetectSeasonality β seasonal pattern detectionexportTable β CSV, JSON, JSONL, or SQLgenerateInsertStatements β INSERT statements for migrationpreviewUpdate / previewDelete β see what would change before committingsafeUpdate β UPDATE with dry-run, row limits, empty WHERE protectionsafeDelete β DELETE with dry-run, row limits, empty WHERE protectionsafeInsert β INSERT with validation, batching, ON CONFLICT support"What are the largest tables and do they have bloat?"
"Find duplicate emails in the users table."
"Which queries are slowest and how can I speed them up?"
"Show me what's happening on the database right now."
"Find orphaned orders that reference deleted customers."
| Variable | Default | Description |
|---|---|---|
QUERY_TIMEOUT | 30000 | Query timeout in milliseconds |
MAX_RESULT_ROWS | 10000 | Maximum rows returned per query |
ENABLE_RATE_LIMIT | true | Enable rate limiting |
RATE_LIMIT_MAX_REQUESTS | 100 | Requests per window |
RATE_LIMIT_WINDOW_MS | 60000 | Rate limit window (ms) |
PGMAXPOOLSIZE | 10 | Connection pool max size |
PGMINPOOLSIZE | 2 | Connection pool min size |
PGIDLETIMEOUT | 10000 | Idle connection timeout (ms) |
ENABLE_LOGGING | false | Enable file logging |
LOG_DIR | ./logs | Log file directory |
LOG_LEVEL | info | Log verbosity: debug, info, warn, error |
CLI flags: --read-only (default), --read-write, --mode <mode>
File logging is disabled by default. Set ENABLE_LOGGING=true to enable. Two log files are created in LOG_DIR:
Connection strings are automatically redacted in all output.
Apache-2.0
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/postgres-scout-mcp)<a href="https://allmcps.com/mcp/postgres-scout-mcp"><img src="https://allmcps.com/api/badge/postgres-scout-mcp?style=directory" alt="Postgres Scout MCP on AllMCPs" /></a>