CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

PostgreSQL MCP Server

neverinfamous/postgresql-mcp
81 toolsSTDIOregistry active
Summary

A comprehensive PostgreSQL integration that exposes 278 tools spanning schema introspection, data manipulation, and performance monitoring. The standout feature is Code Mode, which runs multi-step database operations inside a V8 isolate to drastically cut token consumption on complex workflows. You get deterministic error translation to prevent AI hallucinations, OAuth 2.1 authentication with granular scopes, and first-class support for extensions like pgvector, PostGIS, and pg_cron. Ships with 24 resources for real-time metrics and 21 AI-optimized prompts for query tuning. Reach for this when you need an AI agent to perform production-grade database work with audit trails, migration tracking, and semantic diffing built in.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Tools

Public tool metadata for what this MCP can expose to an agent.

1 tools
execute_custom_queryExecute a custom SQL query against the database. WARNING: Use with care. Do not expose to untrusted input.4 params

Execute a custom SQL query against the database. WARNING: Use with care. Do not expose to untrusted input.

Parameters* required
querystring
SQL query to execute
valuesarray
Optional parameter values for the query
timeoutnumber
Optional query timeout in milliseconds
connectionStringstring
PostgreSQL connection string

postgres-mcp

PostgreSQL MCP Server binding the Model Context Protocol to a secure PostgreSQL sandbox.

Features Code Mode — a revolutionary approach that provides access to all 278 tools through a secure, true V8 isolate (worker_threads), eliminating the massive token overhead of multi-step tool calls. Also includes schema introspection, migration tracking, smart tool filtering, deterministic error handling, connection pooling, HTTP/SSE Transport, OAuth 2.1 authentication, and extension support for citext, ltree, pgcrypto, pg_cron, pg_stat_kcache, pgvector, PostGIS, and HypoPG.

278 Specialized Tools · 24 Resources · 21 AI-Powered Prompts

GitHub GitHub Release Docker Pulls License: MIT MCP npm Security Status TypeScript E2E Tests Coverage

Docker Hub • npm Package • MCP Registry • Wiki • Tool Reference • Changelog

🎯 What Sets Us Apart

FeatureDescription
Code Mode (V8 Isolate)Massive Token Savings: Execute complex, multi-step operations inside a secure, true V8 isolate (worker_threads). Stop burning tokens on back-and-forth tool calls and reduce your AI overhead by up to 90%.
Deterministic Error HandlingNo more cryptic database errors causing AI hallucinations. We intercept and translate raw SQL exceptions into clear, actionable advice so your agent knows exactly how to recover without guessing.
278 Token-Optimized ToolsThe largest PostgreSQL toolset on the MCP registry. Every query uses zero-cost token estimation and smart dataset truncation, ensuring agents always see the big picture without blowing their context windows.
OAuth 2.1 + Granular ControlReal enterprise security. Authenticate via OAuth 2.1 and control exactly who can read, write, or administer your database with precision scopes mapped down to the specific tool layer.
Audit Trails & Semantic DiffingTotal accountability. Track exactly what your AI is doing with detailed JSON logs, automatically snapshot schemas before mutations, and confidently review semantic row-by-row diffs before restoring data.
24 Resources & 21 PromptsInstant database meta-awareness. Agents automatically read real-time health, performance, and replication metrics, and can invoke built-in prompt workflows for query tuning and schema design.
Introspection & MigrationsPrevent costly mistakes. Let your AI simulate the cascade impact of schema changes, safely order foreign-key updates, and track migration history automatically.
8 Extension EcosystemsReady for advanced workloads. First-class API support for pgvector (AI search), PostGIS (geospatial), pg_cron, pgcrypto, and more—all strictly typed and validated out of the box.
Smart Tool FilteringGive your agent exactly what it needs without overflowing IDE limits. Dynamically compile your server with any combination of our 25 distinct tool groups.
Enterprise InfrastructureBuilt for production. Blazing fast (millions of ops/sec), protected against SQL injection, features high-performance connection pooling, and supports both Streamable HTTP and Legacy SSE protocols simultaneously.

Suggested Rule (Add to AGENTS.md, GEMINI.md, etc)

MCP TOKEN MANAGEMENT:

  • Token Visibility: When interacting with postgres-mcp, always monitor the _meta.tokenEstimate (or metrics.tokenEstimate in Code Mode) returned in tool responses.
  • Audit Resource: Use the postgres://audit resource to review session-level token consumption and identify high-cost operations.
  • Proactive Efficiency: If operations are consuming high token counts, prefer code mode and proactively use limit parameters.

🚀 Quick Start

Prerequisites

  • PostgreSQL 12-18 (tested with PostgreSQL 18.1)
  • Docker (recommended) or Node.js 24+ (LTS)

Docker (Recommended)

docker pull writenotenow/postgres-mcp:latest

Add to your ~/.cursor/mcp.json or Claude Desktop config:

{
  "mcpServers": {
    "postgres-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "POSTGRES_HOST",
        "-e",
        "POSTGRES_PORT",
        "-e",
        "POSTGRES_USER",
        "-e",
        "POSTGRES_PASSWORD",
        "-e",
        "POSTGRES_DATABASE",
        "writenotenow/postgres-mcp:latest",
        "--tool-filter",
        "codemode",
        "--audit-log",
        "/tmp/postgres-logs/audit.jsonl"
      ],
      "env": {
        "POSTGRES_HOST": "host.docker.internal",
        "POSTGRES_PORT": "5432",
        "POSTGRES_USER": "your_username",
        "POSTGRES_PASSWORD": "your_password",
        "POSTGRES_DATABASE": "your_database"
      }
    }
  }
}

Note for Docker: Use host.docker.internal to connect to PostgreSQL running on your host machine.

📖 Full Docker guide: DOCKER_README.md · Docker Hub

npm

npm install -g @neverinfamous/postgres-mcp
postgres-mcp --transport stdio --postgres postgres://user:password@localhost:5432/database

From Source

git clone https://github.com/neverinfamous/postgres-mcp.git
cd postgres-mcp
npm install
npm run build
node dist/cli.js --transport stdio --postgres postgres://user:password@localhost:5432/database

Development

See From Source above for setup. After cloning:

npm run lint && npm run typecheck  # Run checks
npm run bench                      # Run performance benchmarks
node dist/cli.js info              # Test CLI
node dist/cli.js list-tools        # List available tools

Benchmarks

Run npm run bench to execute the performance benchmark suite (10 files, 93+ scenarios) powered by Vitest Bench. Use npm run bench:verbose for detailed table output.

Performance Highlights (Node.js 24, Windows 11):

AreaBenchmarkThroughput
Tool DispatchMap.get() single tool lookup~6.9M ops/sec
WHERE ValidationSimple clause (combined regex fast-path)~3.7M ops/sec
Identifier SanitizationvalidateIdentifier()~4.4M ops/sec
Auth — Token ExtractionextractBearerToken()~2.7M ops/sec
Auth — Scope CheckinghasScope()~5.3M ops/sec
Rate LimitingSingle IP check~2.3M ops/sec
LoggerFiltered debug (no-op path)~5.4M ops/sec
Schema ParsingMigrationInitSchema.parse()~2.1M ops/sec
Metadata CacheCache hit + miss pattern~1.7M ops/sec
Sandbox CreationCodeModeSandbox.create() cold start~863 ops/sec

Full benchmark results and methodology are available on the Performance wiki page.

🔗 Database Connection Scenarios

ScenarioHost to UseExample Connection String
PostgreSQL on host machinelocalhost or host.docker.internalpostgres://user:pass@localhost:5432/db
PostgreSQL in DockerContainer name or networkpostgres://user:pass@postgres-container:5432/db
Remote/Cloud PostgreSQLHostname or IPpostgres://user:pass@db.example.com:5432/db
ProviderExample Hostname
AWS RDS PostgreSQLyour-instance.xxxx.us-east-1.rds.amazonaws.com
Google Cloud SQLproject:region:instance (via Cloud SQL Proxy)
Azure PostgreSQLyour-server.postgres.database.azure.com
Supabasedb.xxxx.supabase.co
Neonep-xxx.us-east-1.aws.neon.tech

🛠️ Tool Filtering

[!IMPORTANT] All tool groups include Code Mode (pg_execute_code) by default. To exclude it, add -codemode to your filter: --tool-filter cron,pgcrypto,-codemode

💡 Code Mode (--tool-filter codemode) is the recommended configuration — it exposes pg_execute_code, a secure, true V8 isolate sandbox providing access to all 278 tools' worth of capability with up to 90% token savings. See Tool Filtering for alternatives.

  • Requires admin OAuth scope — execution is logged for audit

📖 See Full Installation Guide →

What Can You Filter?

The --tool-filter argument accepts groups or tool names — mix and match freely:

Filter PatternExampleDescription
Groups onlycore,jsonb,transactionsCombine individual groups
Tool namespg_read_query,pg_explainCustom tool selection
Group + Toolcore,+pg_stat_statementsExtend a group
Group - Toolcore,-pg_drop_tableRemove specific tools

Tool Groups (25 Available)

GroupToolsDescription
codemode1Code Mode (sandboxed code execution) 🌟 Recommended
core21Read/write queries, tables, indexes, convenience/drop tools
transactions9BEGIN, COMMIT, ROLLBACK, savepoints, status
jsonb21JSONB manipulation, queries, and pretty-print
text14Full-text search, fuzzy matching
performance25EXPLAIN, query analysis, optimization, diagnostics, anomaly detection
admin12VACUUM, ANALYZE, REINDEX, insights
monitoring12Database sizes, connections, status
backup13pg_dump, COPY, restore, audit backups
schema13Schemas, views, sequences, functions, triggers
introspection7Dependency graphs, cascade simulation, schema analysis
migration7Schema migration tracking and management
partitioning7Native partition management
stats20Statistical analysis, window functions, outlier detection
vector17pgvector (AI/ML similarity search)
postgis16PostGIS (geospatial)
cron9pg_cron (job scheduling)
partman11pg_partman (auto-partitioning)
kcache8pg_stat_kcache (OS-level stats)
citext7citext (case-insensitive text)
ltree9ltree (hierarchical data)
pgcrypto10pgcrypto (encryption, UUIDs)
security10Security auditing, SSL, firewall, data masking, privilege analysis
roles13Role management, privileges, membership, RLS
docstore10JSONB document collections (NoSQL-style CRUD, indexing)

Syntax Reference

PrefixTargetExampleEffect
(none)GroupcoreWhitelist Mode: Enable ONLY this group
(none)Toolpg_read_queryWhitelist Mode: Enable ONLY this tool
+Group+vectorAdd tools from this group to current set
-Group-adminRemove tools in this group from current set
+Tool+pg_explainAdd one specific tool
-Tool-pg_drop_tableRemove one specific tool

🌐 HTTP/SSE Transport (Remote Access)

For remote access, web-based clients, or HTTP-compatible MCP hosts, use the HTTP transport:

node dist/cli.js \
  --transport http \
  --port 3000 \
  --postgres "postgres://user:pass@localhost:5432/db"

Docker:

docker run --rm -p 3000:3000 \
  -e POSTGRES_URL=postgres://user:pass@host:5432/db \
  writenotenow/postgres-mcp:latest \
  --transport http --port 3000

The server supports two MCP transport protocols simultaneously, enabling both modern and legacy clients to connect:

Streamable HTTP (Recommended)

Modern protocol (MCP 2025-03-26) — single endpoint, session-based:

MethodEndpointPurpose
POST/mcpJSON-RPC requests (initialize, tools/list, etc.)
GET/mcpSSE stream for server notifications
DELETE/mcpSession termination

Sessions are managed via the Mcp-Session-Id header.

Stateless Mode

For serverless/stateless deployments where sessions are not needed:

node dist/cli.js --transport http --port 3000 --stateless --postgres "postgres://..."

In stateless mode: GET /mcp returns 405, DELETE /mcp returns 204, /sse and /messages return 404. Each POST /mcp creates a fresh transport.

Legacy SSE (Backward Compatibility)

Legacy protocol (MCP 2024-11-05) — for clients like Python mcp.client.sse:

MethodEndpointPurpose
GET/sseOpens SSE stream, returns /messages?sessionId=<id> endpoint
POST/messages?sessionId=<id>Send JSON-RPC messages to the session

Utility Endpoints

MethodEndpointPurpose
GET/healthHealth check (bypasses rate limiting, always available for monitoring)

🔐 Authentication

postgres-mcp supports two authentication mechanisms for HTTP transport:

Simple Bearer Token (--auth-token)

Lightweight authentication for development or single-tenant deployments:

node dist/cli.js --transport http --port 3000 --auth-token my-secret --postgres "postgres://..."

# Or via environment variable
export MCP_AUTH_TOKEN=my-secret
node dist/cli.js --transport http --port 3000 --postgres "postgres://..."

Clients must include Authorization: Bearer my-secret on all requests. /health and / are exempt. Unauthenticated requests receive 401 with WWW-Authenticate: Bearer headers per RFC 6750.

OAuth 2.1 (Enterprise)

Full OAuth 2.1 with RFC 9728/8414 compliance for production multi-tenant deployments:

node dist/cli.js \
  --transport http \
  --port 3000 \
  --postgres "postgres://user:pass@localhost:5432/db" \
  --oauth-enabled \
  --oauth-issuer http://localhost:8080/realms/postgres-mcp \
  --oauth-audience postgres-mcp-client

Additional flags: --oauth-jwks-uri <url> (auto-discovered if omitted), --oauth-clock-tolerance <seconds> (default: 60).

OAuth Scopes

Access control is managed through OAuth scopes:

ScopeAccess Level
readRead-only queries (SELECT, EXPLAIN)
writeRead + write operations
adminFull administrative access
fullGrants all access
db:{name}Access to specific database
schema:{name}Access to specific schema
table:{schema}:{table}Access to specific table

RFC Compliance

This implementation follows:

  • RFC 9728 — OAuth 2.1 Protected Resource Metadata
  • RFC 8414 — OAuth 2.1 Authorization Server Metadata
  • RFC 7591 — OAuth 2.1 Dynamic Client Registration

The server exposes metadata at /.well-known/oauth-protected-resource.

Note for Keycloak users: Add an Audience mapper to your client (Client → Client scopes → dedicated scope → Add mapper → Audience) to include the correct aud claim in tokens.

[!NOTE] Per-tool scope enforcement: Scopes are enforced at the tool level — each tool group maps to a required scope (read, write, or admin). When OAuth is enabled, every tool invocation checks the calling token's scopes before execution. When OAuth is not configured, scope checks are skipped entirely.

[!WARNING] HTTP without authentication: When using --transport http without enabling OAuth or --auth-token, all clients have full unrestricted access. Always enable authentication for production HTTP deployments. See SECURITY.md for details.

Priority: When both --auth-token and --oauth-enabled are set, OAuth 2.1 takes precedence. If neither is configured, the server warns and runs without authentication.

🔧 Configuration

Environment Variables

VariableDefaultDescriptionCLI Flag
POSTGRES_HOSTlocalhostDatabase host--host
POSTGRES_PORT5432Database port--pg-port
POSTGRES_USERpostgresDatabase username--user
POSTGRES_PASSWORD(empty)Database password--password
POSTGRES_DATABASEpostgresDatabase name--database
POSTGRES_URL—Connection string (overrides individual vars)--postgres
MCP_HOSTlocalhostServer bind host (0.0.0.0 for containers)--server-host
MCP_TRANSPORTstdioTransport type: stdio, http, sse--transport
PORT3000HTTP port for http/sse transports--port
MCP_AUTH_TOKEN—Simple bearer token for HTTP auth--auth-token
LOG_LEVELinfoLog level: debug, info, warning, error--log-level
METADATA_CACHE_TTL_MS30000Schema cache TTL (ms)—
POSTGRES_TOOL_FILTER—Tool filter string (also MCP_TOOL_FILTER)--tool-filter
MCP_RATE_LIMIT_MAX100Rate limit per IP per 15min window—
MCP_REQUEST_TIMEOUT300000HTTP request timeout (ms) for Slowloris protection—
MCP_HEADERS_TIMEOUT60000HTTP headers timeout (ms)—
TRUST_PROXYfalseTrust X-Forwarded-For for client IP--trust-proxy
OAUTH_ENABLEDfalseEnable OAuth 2.1 authentication--oauth-enabled
OAUTH_ISSUER—Authorization server URL--oauth-issuer
OAUTH_AUDIENCE—Expected token audience--oauth-audience
OAUTH_JWKS_URI(auto)JWKS URI (auto-discovered from issuer)--oauth-jwks-uri
OAUTH_CLOCK_TOLERANCE60Clock tolerance in seconds--oauth-clock-tolerance
AUDIT_LOG_PATH—Audit log file path (stderr for container logs)--audit-log
AUDIT_REDACTfalseOmit tool arguments from audit entries--audit-redact
AUDIT_BACKUPfalseEnable pre-mutation DDL snapshots--audit-backup
AUDIT_BACKUP_DATAfalseInclude sample data rows in snapshots--audit-backup-data
AUDIT_BACKUP_MAX_AGE30Maximum snapshot age in days--audit-backup-max-age
AUDIT_BACKUP_MAX_COUNT1000Maximum number of snapshots to retain--audit-backup-max-count
AUDIT_BACKUP_MAX_DATA_SIZE52428800Maximum table size for data capture (bytes)--audit-backup-max-data-size
AUDIT_READSfalseLog read-scoped tool calls (compact entries)--audit-reads
AUDIT_LOG_MAX_SIZE10485760Max log file size before rotation (bytes). Keeps up to 5 files.--audit-log-max-size

Aliases: PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE are also supported (standard PostgreSQL client env vars).

Pool Tuning for IAM Auth: For cloud-managed databases with IAM authentication (e.g., AWS RDS, Google Cloud SQL), use --pool-max to control pool size.

CLI Reference

FlagDescription
--postgres <url>Connection string
--host <host>PostgreSQL host
--pg-port <port>PostgreSQL port
--user <user>Username
--password <pw>Password (prefer PGPASSWORD)
--database <db>Database name
--sslEnable SSL
--pool-max <n>Max pool connections (default: 10)
--transport <type>stdio | http | sse
--port <n>HTTP port
--server-host <host>Server bind host
--auth-token <token>Simple bearer token for HTTP auth
--statelessStateless HTTP mode (no sessions, no SSE)
--tool-filter <filter>Tool filter string
--log-level <level>Log verbosity
--oauth-enabledEnable OAuth 2.1
--trust-proxyTrust reverse proxy headers
--audit-log <path>Enable JSONL audit trail (stderr for container logs)
--audit-redactOmit tool arguments from audit entries
--audit-backupEnable pre-mutation DDL snapshots
--audit-backup-dataInclude sample data rows in snapshots
--audit-backup-max-age <days>Maximum snapshot age in days (default: 30)
--audit-backup-max-count <count>Maximum number of snapshots to retain (default: 1000)
--audit-backup-max-data-size <bytes>Maximum table size for data capture (default: 52428800)
--audit-readsLog read-scoped tool calls (compact entries)
--audit-log-max-size <bytes>Max log file size before rotation (default: 10MB). System retains up to 5 rotated historical archives before oldest deletion (.1 through .5).

🤖 AI-Powered Prompts

Prompts provide step-by-step guidance for complex database tasks. Instead of figuring out which tools to use and in what order, simply invoke a prompt and follow its workflow — great for learning PostgreSQL best practices or automating repetitive DBA tasks.

This server includes 21 intelligent prompts for guided workflows:

PromptDescriptionRequired Groups
pg_query_builderConstruct queries with CTEs and window functionscore
pg_schema_designDesign schemas with constraints and indexescore
pg_performance_analysisAnalyze queries with EXPLAIN and optimizationcore, performance
pg_migrationGenerate migration scripts with rollback supportcore
pg_tool_indexLazy hydration - compact index of all tools—
pg_quick_queryQuick SQL query guidance for common operationscore
pg_quick_schemaQuick reference for exploring database schemacore
pg_database_health_checkComprehensive database health assessmentcore, performance, monitoring
pg_backup_strategyEnterprise backup planning with RTO/RPOcore, monitoring, backup
pg_index_tuningIndex analysis and optimization workflowcore, performance
pg_extension_setupExtension installation and configuration guidecore
pg_setup_pgvectorComplete pgvector setup for semantic searchcore, vector
pg_setup_postgisComplete PostGIS setup for geospatial operationscore, postgis
pg_setup_pgcronComplete pg_cron setup for job schedulingcore
pg_setup_partmanComplete pg_partman setup for partition managementcore, partman
pg_setup_kcacheComplete pg_stat_kcache setup for OS monitoringcore, kcache
pg_setup_citextComplete citext setup for case-insensitive textcore, citext
pg_setup_ltreeComplete ltree setup for hierarchical datacore, ltree
pg_setup_pgcryptoComplete pgcrypto setup for cryptographic funcscore, pgcrypto
pg_safe_restore_workflow6-step safe restore playbook with restoreAsbackup
pg_setup_docstoreComplete docstore setup for document collectionscore, docstore

📦 Resources

Resources give you instant snapshots of database state without writing queries. Perfect for quickly checking schema, health, or performance metrics — the AI can read these to understand your database context before suggesting changes.

This server provides 24 resources for structured data access:

ResourceURIDescription
Schemapostgres://schemaFull database schema
Tablespostgres://tablesTable listing with sizes
Settingspostgres://settingsPostgreSQL configuration
Statisticspostgres://statsDatabase statistics with stale detection
Activitypostgres://activityCurrent connections
Poolpostgres://poolConnection pool status
Capabilitiespostgres://capabilitiesServer version, extensions, tool categories
Performancepostgres://performancepg_stat_statements query metrics
Healthpostgres://healthComprehensive database health status
Extensionspostgres://extensionsExtension inventory with recommendations
Indexespostgres://indexesIndex usage with unused detection
Replicationpostgres://replicationReplication status and lag monitoring
Vacuumpostgres://vacuumVacuum stats and wraparound warnings
Lockspostgres://locksLock contention detection
Cronpostgres://cronpg_cron job status and execution history
Partmanpostgres://partmanpg_partman partition configuration and health
Kcachepostgres://kcachepg_stat_kcache CPU/I/O metrics summary
Vectorpostgres://vectorpgvector columns, indexes, and recommendations
PostGISpostgres://postgisPostGIS spatial columns and index status
Cryptopostgres://cryptopgcrypto availability and security recommendations
Insightspostgres://insightsAI-appended business insights and observations
Auditpostgres://auditAudit trail with token summary and top tools
Helppostgres://help/{group}Group-specific help and workflow documentation
Docstorepostgres://docstoreJSONB document collection overview

🔧 Extension Support

ExtensionPurposeTools
pg_stat_statementsQuery performance trackingpg_stat_statements
pg_trgmText similaritypg_trigram_similarity
fuzzystrmatchFuzzy matchingpg_fuzzy_match
hypopgHypothetical indexespg_index_recommendations
pgvectorVector similarity search16 vector tools
PostGISGeospatial operations15 postgis tools
pg_cronJob scheduling8 cron tools
pg_partmanAutomated partition management10 partman tools
pg_stat_kcacheOS-level CPU/memory/I/O stats7 kcache tools
citextCase-insensitive text6 citext tools
ltreeHierarchical tree labels8 ltree tools
pgcryptoHashing, encryption, UUIDs9 pgcrypto tools

Extension tools gracefully handle cases where extensions are not installed. Extension tool counts include create_extension helpers but exclude Code Mode; the Tool Groups table above adds +1 per group for Code Mode.

Contributing

Contributions are welcome! Please read our Contributing Guidelines before submitting a pull request.

Security

For security concerns, please see our Security Policy.

⚠️ Never commit credentials - Store secrets in environment variables

License

This project is licensed under the MIT License - see the LICENSE file for details.

Code of Conduct

Please read our Code of Conduct before participating in this project.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Categories
Databases
Registryactive
Package@neverinfamous/postgres-mcp
TransportSTDIO
UpdatedJan 25, 2026
View on GitHub

Related Databases MCP Servers

View all →
Postgres

ai.waystation/postgres

Connect to your PostgreSQL database to query data and schemas.
54
Read Only Local Postgres Mcp Server

hovecapital/read-only-local-postgres-mcp-server

MCP server for read-only PostgreSQL database queries in Claude Desktop
2
Database Mcp

cocaxcode/database-mcp

MCP server for database connectivity. Multi-DB (PostgreSQL, MySQL, SQLite), 19 tools.
1
Mcp Mysql

io.github.infoinlet-marketplace/mcp-mysql

Read-only MySQL/MariaDB for AI agents — query, list/describe tables, health. SQL-guarded.
Database Admin

io.github.cybeleri/database-admin

Database admin MCP: schema inspection, query optimization for PostgreSQL and MySQL
Postgres Secured (Aegis Zero-Trust)

io.github.yash-0620/postgres-mcp-secured

Enterprise PostgreSQL MCP secured by Aegis Zero-Trust to block unauthorized SQL injections.