{"name":"io.github.neverinfamous/postgres-mcp","slug":"neverinfamous-postgres-mcp","title":"PostgreSQL MCP Server","description":"PostgreSQL MCP server with 203 tools, connection pooling, HTTP/SSE, OAuth 2.1, and tool filtering","url":"https://mcp.market/server/neverinfamous-postgres-mcp","rating":null,"grade":"A","score":85,"certified":false,"status":"active","category":"data","tags":["data"],"presence":{"score":35,"stars":12,"forks":3,"downloads_week":65,"last_push_at":"2026-09-28T07:17:13.000Z","license":"MIT"},"uptime":null,"claimed":false,"transport":"mixed","callable_via_gateway":false,"default_price_micros":0,"repository":"https://github.com/neverinfamous/postgresql-mcp.git","website":null,"version":"1.0.2","remotes":[],"packages":[{"registryType":"npm","identifier":"@neverinfamous/postgres-mcp","version":"1.0.2","transport":{"type":"stdio"}},{"registryType":"oci","identifier":"docker.io/writenotenow/postgres-mcp:v1.0.2","transport":{"type":"stdio"}}],"tools":[{"name":"pg_alert_threshold_set","description":"Get recommended alert thresholds for monitoring key database metrics. Note: This is informational only - returns suggested warning/critical thresholds for external monitoring tools. Does not configure alerts in PostgreSQL itself.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_analyze","description":"Update table statistics for the query planner.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_analyze_db_health","description":"Comprehensive database health analysis including cache hit ratio, bloat, replication, and connection stats.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_analyze_query_indexes","description":"Analyze a specific query for index recommendations using EXPLAIN ANALYZE.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_analyze_workload_indexes","description":"Analyze database workload using pg_stat_statements to recommend missing indexes.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_backup_physical","description":"Generate pg_basebackup command for physical (binary) backup.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_backup_schedule_optimize","description":"Analyze database activity patterns and recommend optimal backup schedule.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_batch_insert","description":"Insert multiple rows in a single statement. More efficient than individual inserts. Rows array must not be empty.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_cancel_backend","description":"Cancel a running query (graceful, preferred over terminate).","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_capacity_planning","description":"Analyze database growth trends and provide capacity planning forecasts. Note: Growth estimates are based on pg_stat_user_tables counters since last stats reset; accuracy depends on how long stats have been accumulating.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_citext_analyze_candidates","description":"Find TEXT columns that may benefit from case-insensitive comparisons. Looks for common patterns like email, username, name, slug, etc.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_citext_compare","description":"Compare two values using case-insensitive semantics. Useful for testing citext behavior before converting columns.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_citext_convert_column","description":"Convert an existing TEXT column to CITEXT for case-insensitive comparisons. This is useful for retrofitting case-insensitivity to existing columns like email or username. Note: If views depend on this column, you must drop and recreate them manually before conversion.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_citext_create_extension","description":"Enable the citext extension for case-insensitive text columns. citext is ideal for emails, usernames, and other identifiers where case shouldn't matter.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_citext_list_columns","description":"List all columns using the citext type in the database. Useful for auditing case-insensitive columns.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_citext_schema_advisor","description":"Analyze a specific table and recommend which columns should use citext. Provides schema design recommendations based on column names and existing data patterns. Requires the 'table' parameter to specify which table to analyze.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_cluster","description":"Physically reorder table data based on an index. Call with no args to re-cluster all previously-clustered tables.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_connection_stats","description":"Get connection statistics by database and state.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_copy_export","description":"Export query results using COPY TO. Use query/sql for custom query or table for SELECT *.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_copy_import","description":"Generate COPY FROM command for importing data.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_count","description":"Count rows in a table, optionally with a WHERE clause or specific column.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_create_backup_plan","description":"Generate a backup strategy recommendation with cron schedule.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_create_index","description":"Create an index on a table. Supports btree, hash, gin, gist, brin index types.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_create_table","description":"Create a new table with specified columns and constraints. Supports composite primary keys and table-level constraints.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_cron_alter_job","description":"Modify an existing cron job. Can change schedule, command, database, username, or active status. Only specify the parameters you want to change.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_cron_cleanup_history","description":"Delete old job run history records. Helps prevent the cron.job_run_details table from growing too large. By default, removes records older than 7 days.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_cron_create_extension","description":"Enable the pg_cron extension for job scheduling. Requires superuser privileges.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_cron_job_run_details","description":"View execution history for cron jobs. Shows start/end times, status, and return messages. Useful for monitoring and debugging scheduled jobs.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_cron_list_jobs","description":"List all scheduled cron jobs. Shows job ID, name, schedule, command, and status. Jobs without names (jobname: null) must be referenced by jobId. Default limit: 50 rows.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_cron_schedule","description":"Schedule a new cron job. Supports standard cron syntax (e.g., \"0 2 * * *\" for 2 AM daily) or interval syntax (e.g., \"30 seconds\"). Note: pg_cron allows duplicate job names; use unique names to avoid confusion. Returns the job ID.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_cron_schedule_in_database","description":"Schedule a cron job to run in a different database. Useful for cross-database maintenance tasks. Returns the job ID.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_cron_unschedule","description":"Remove a scheduled cron job by its ID or name. If both are provided, jobName takes precedence. Job ID accepts numbers or numeric strings. Works for both active and inactive jobs.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_database_size","description":"Get the size of a database.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_describe_table","description":"Get detailed table structure including columns, types, and constraints. For tables/views only, not sequences.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_drop_index","description":"Drop an index from a table. Supports IF EXISTS, CASCADE, and CONCURRENTLY options.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_drop_table","description":"Drop a table from the database.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_dump_schema","description":"Get the pg_dump command for a schema or database.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_dump_table","description":"Generate DDL for a table or sequence. Returns CREATE TABLE for tables, CREATE SEQUENCE for sequences.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_execute_code","description":"Execute TypeScript/JavaScript code in a sandboxed environment with access to all PostgreSQL tools via the pg.* API. Available API groups: - pg.core: readQuery, writeQuery, listTables, describeTable, createTable, createIndex, etc. (18 methods) - pg.transactions: begin, commit, rollback, savepoint, execute (7 methods) - pg.jsonb: extract, set, insert, delete, contains, pathQuery (19 methods) - pg.te","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_exists","description":"Check if rows exist in a table. WHERE clause is optional: with WHERE = checks matching rows; without WHERE = checks if table has any rows at all. For table *schema* existence, use pg_list_tables.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_get_indexes","description":"List indexes with usage statistics. When table is omitted, lists ALL database indexes (can be large). Use schema/limit to filter.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_agg","description":"Aggregate rows into a JSONB array. With groupBy, returns all groups with their aggregated items.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_array","description":"Build a JSONB array from values. Accepts {values: [...]} or {elements: [...]}. Returns {array: [...]}.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_contains","description":"Find rows where JSONB column contains the specified value. Note: Empty object {} matches all rows.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_delete","description":"Delete a key or array element from a JSONB column. Accepts path as string or array. Note: rowsAffected reflects matched rows, not whether key existed.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_diff","description":"Compare two JSONB objects. Returns top-level key differences only (shallow comparison, not recursive).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_extract","description":"Extract value from JSONB at specified path. Returns null if path does not exist in data structure. Use select param to include identifying columns.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_index_suggest","description":"Analyze JSONB column and suggest indexes. Only works on object-type JSONB (not arrays).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_insert","description":"Insert value into JSONB array. Index -1 inserts BEFORE last element; use insertAfter:true with -1 to append at end.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_keys","description":"Get all unique keys from a JSONB object column (deduplicated across rows).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_merge","description":"Merge two JSONB objects. deep=true (default) recursively merges. mergeArrays=true concatenates arrays.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_normalize","description":"Normalize JSONB to key-value pairs. Use idColumn to specify row identifier (default: \"id\" if exists, else ctid).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_object","description":"Build a JSONB object. Use data: {name: \"John\", age: 30} or object: {name: \"John\"}. Returns {object: {...}}.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_path_query","description":"Query JSONB using SQL/JSON path expressions (PostgreSQL 12+). Note: Recursive descent (..) syntax is not supported by PostgreSQL.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_security_scan","description":"Scan JSONB for security issues. Only works on object-type JSONB (not arrays). Use larger sampleSize for thorough scans.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_set","description":"Set value in JSONB at path. Uses dot-notation by default; for literal dots in keys use array format [\"key.with.dots\"]. Use empty path ('' or []) to replace entire column value.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_stats","description":"Get statistics about JSONB column usage. Note: topKeys only applies to object-type JSONB, not arrays.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_strip_nulls","description":"Remove null values from a JSONB column. Use preview=true to see changes without modifying data.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_typeof","description":"Get JSONB type at path. Uses dot-notation (a.b.c), not JSONPath ($). Response includes columnNull to distinguish NULL columns.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_jsonb_validate_path","description":"Validate a JSONPath expression and test it against sample data. Supports vars for parameterized paths.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_kcache_create_extension","description":"Enable the pg_stat_kcache extension for OS-level performance metrics. Requires pg_stat_statements to be installed first. Both extensions must be in shared_preload_libraries.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_kcache_database_stats","description":"Get aggregated OS-level statistics for a database. Shows total CPU time, I/O, and page faults across all queries.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_kcache_query_stats","description":"Get query statistics with OS-level CPU and I/O metrics. Joins pg_stat_statements with pg_stat_kcache to show what SQL did AND what system resources it consumed. orderBy options: 'total_time' (default), 'cpu_time', 'reads', 'writes'. Use minCalls parameter to filter by call count.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_kcache_reset","description":"Reset pg_stat_kcache statistics. Use this to start fresh measurements. Note: This also resets pg_stat_statements statistics.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_kcache_resource_analysis","description":"Analyze queries to classify them as CPU-bound, I/O-bound, or balanced. Helps identify the root cause of performance issues - is the query computation-heavy or disk-heavy?","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_kcache_top_cpu","description":"Get top CPU-consuming queries. Shows which queries spend the most time in user CPU (application code) vs system CPU (kernel operations).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_kcache_top_io","description":"Get top I/O-consuming queries. Shows filesystem-level reads and writes, which represent actual disk access (not just shared buffer hits).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_list_extensions","description":"List installed PostgreSQL extensions with versions.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_list_objects","description":"List database objects filtered by type. Use type: \"table\" (singular) or types: [\"table\",\"view\"] (array). Supports: table, view, materialized_view, function, procedure, sequence, index, trigger.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_list_partitions","description":"List all partitions of a partitioned table. Returns warning if table is not partitioned.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_list_tables","description":"List all tables, views, and materialized views with metadata. Use limit to restrict results.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_ltree_convert_column","description":"Convert an existing TEXT column to LTREE type. Note: If views depend on this column, you must drop and recreate them manually before conversion.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_ltree_create_extension","description":"Enable the ltree extension for hierarchical tree-structured labels.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_ltree_create_index","description":"Create a GiST index on an ltree column for efficient tree queries.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_ltree_lca","description":"Find the longest common ancestor of multiple ltree paths.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_ltree_list_columns","description":"List all columns using the ltree type in the database.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_ltree_match","description":"Match ltree paths using lquery pattern syntax.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_ltree_query","description":"Query hierarchical relationships in ltree columns. Supports exact paths (descendants/ancestors) and lquery patterns with wildcards.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_ltree_subpath","description":"Extract a portion of an ltree path.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_object_details","description":"Get detailed metadata for a specific database object (table, view, function, sequence, index).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_read_query","description":"Execute a read-only SQL query (SELECT, WITH). Returns rows as JSON. Pass transactionId to execute within a transaction.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_recovery_status","description":"Check if server is in recovery mode (replica).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_reindex","description":"Rebuild indexes to improve performance. For target: database, name defaults to the current database if omitted.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_reload_conf","description":"Reload PostgreSQL configuration without restart.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_replication_status","description":"Check replication status and lag.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_reset_stats","description":"Reset statistics counters (requires superuser).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_resource_usage_analyze","description":"Analyze current resource usage including CPU, memory, and I/O patterns.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_restore_command","description":"Generate pg_restore command for restoring backups.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_restore_validate","description":"Generate commands to validate backup integrity and restorability.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_server_version","description":"Get PostgreSQL server version information.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_set_config","description":"Set a configuration parameter for the current session.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_show_settings","description":"Show current PostgreSQL configuration settings. Filter by name pattern or exact setting name. Accepts: pattern, setting, or name parameter.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_table_sizes","description":"Get sizes of all tables with indexes and total.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_terminate_backend","description":"Terminate a database connection (forceful, use with caution).","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_truncate","description":"Truncate a table, removing all rows quickly. Use cascade to truncate dependent tables.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_upsert","description":"Insert a row or update if it already exists (INSERT ... ON CONFLICT DO UPDATE). Specify conflict columns for uniqueness check. Use data or values for column-value pairs.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_uptime","description":"Get server uptime and startup time.","write_action":false,"price_micros":0,"input_schema":null},{"name":"pg_vacuum","description":"Run VACUUM to reclaim storage and update visibility map. Use analyze: true to also update statistics. Verbose output goes to PostgreSQL server logs.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_vacuum_analyze","description":"Run VACUUM and ANALYZE together for optimal performance. Verbose output goes to PostgreSQL server logs.","write_action":true,"price_micros":0,"input_schema":null},{"name":"pg_write_query","description":"Execute a write SQL query (INSERT, UPDATE, DELETE). Returns affected row count. Pass transactionId to execute within a transaction.","write_action":true,"price_micros":0,"input_schema":null}],"scan":{"score":85,"grade":"A","scanned_at":"2026-10-01T13:50:59.416Z","report":{"scannerVersion":"0.1.10","scannedAt":"2026-10-01T13:50:59.409Z","components":{"code":{"score":20,"max":25,"notes":["279 source files scanned"]},"reliability":{"score":-1,"max":20,"notes":["no gateway calls yet and no remote to probe"]},"poisoning":{"score":-1,"max":15,"notes":["tools not inspected (local package is not executed); not counted"]},"auth":{"score":12,"max":15,"notes":["local package, no credentials required"]},"maintenance":{"score":15,"max":15,"notes":["last push 3 days ago"]},"identity":{"score":8,"max":10,"notes":["registry namespace matches repository owner","GitHub account older than a year"]}},"findings":[{"id":"exec.eval","severity":"medium","component":"code","title":"eval / new Function used","evidence":"dist/codemode/types.js: …his access /\\beval\\s*\\(/, // No eval() /\\bFunction\\s*\\(/, // No Funct…"}],"inputs":{"packages":[{"registryType":"npm","identifier":"@neverinfamous/postgres-mcp","version":"1.0.2","found":true,"license":"MIT","hasInstallScripts":false,"dependencyCount":5,"publishedAt":"2026-01-25T05:58:56.486Z","repositoryUrl":"git+https://github.com/neverinfamous/postgresql-mcp.git","weeklyDownloads":65}],"repo":{"found":true,"owner":"neverinfamous","repo":"postgresql-mcp","archived":false,"pushedAt":"2026-09-28T07:17:13Z","stars":12,"forks":3,"openIssues":11,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/187553399?v=4","ownerCreatedAt":"2024-11-06T17:54:28Z","license":"MIT"},"icon":{"url":"https://avatars.githubusercontent.com/u/187553399?v=4&s=128","source":"github"},"presence":{"stars":12,"forks":3,"downloadsWeek":65,"license":"MIT","lastPushAt":"2026-09-28T07:17:13.000Z","score":35}}}},"grade_history":[],"reviews":[]}